|
@@ -7,13 +7,12 @@ import com.qmth.ops.api.security.AdminSession;
|
|
|
import com.qmth.ops.api.security.Permission;
|
|
|
import com.qmth.ops.api.vo.CodeNameVO;
|
|
|
import com.qmth.ops.api.vo.EnvVO;
|
|
|
+import com.qmth.ops.biz.domain.AppEnv;
|
|
|
import com.qmth.ops.biz.domain.Env;
|
|
|
import com.qmth.ops.biz.domain.EnvType;
|
|
|
+import com.qmth.ops.biz.service.AppService;
|
|
|
import com.qmth.ops.biz.service.EnvService;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestAttribute;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.Arrays;
|
|
@@ -27,6 +26,9 @@ public class EnvController {
|
|
|
@Resource
|
|
|
private EnvService envService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private AppService appService;
|
|
|
+
|
|
|
@RequestMapping("/types")
|
|
|
@Aac(auth = BOOL.FALSE)
|
|
|
public Object types() {
|
|
@@ -48,7 +50,12 @@ public class EnvController {
|
|
|
}
|
|
|
|
|
|
@PostMapping("/list")
|
|
|
- public List<EnvVO> list(Long appId) {
|
|
|
+ public List<AppEnv> list() {
|
|
|
+ return envService.listAppEnv();
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/app/list")
|
|
|
+ public List<EnvVO> listByApp(@RequestParam Long appId) {
|
|
|
return envService.list(appId).stream().map(EnvVO::new).collect(Collectors.toList());
|
|
|
}
|
|
|
|