|
@@ -6,16 +6,23 @@ import com.qmth.boot.core.solar.model.AppInfo;
|
|
|
import com.qmth.boot.tools.signature.SignatureType;
|
|
|
import com.qmth.ops.api.constants.OpsApiConstants;
|
|
|
import com.qmth.ops.api.security.AccessDeploy;
|
|
|
+import com.qmth.ops.biz.domain.App;
|
|
|
+import com.qmth.ops.biz.service.AppService;
|
|
|
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 javax.annotation.Resource;
|
|
|
+
|
|
|
@RestController
|
|
|
@RequestMapping(OpsApiConstants.OPEN_URI_PREFIX)
|
|
|
@Aac(auth = BOOL.TRUE, signType = SignatureType.SECRET)
|
|
|
public class OpenAppDeployController {
|
|
|
|
|
|
+ @Resource
|
|
|
+ private AppService appService;
|
|
|
+
|
|
|
@PostMapping("/app/info")
|
|
|
public AppInfo getAppInfo(@RequestAttribute AccessDeploy accessDeploy) {
|
|
|
return getAppDeployInfo(accessDeploy);
|
|
@@ -23,9 +30,11 @@ public class OpenAppDeployController {
|
|
|
|
|
|
@PostMapping("/app/deploy/info")
|
|
|
public AppInfo getAppDeployInfo(@RequestAttribute AccessDeploy accessDeploy) {
|
|
|
+ App app = appService.getById(accessDeploy.getDeploy().getAppId());
|
|
|
AppInfo info = new AppInfo();
|
|
|
info.setId(accessDeploy.getDeploy().getId());
|
|
|
info.setName(accessDeploy.getDeploy().getName());
|
|
|
+ info.setCode(app.getCode());
|
|
|
if (accessDeploy.getDeploy().getControl() != null) {
|
|
|
info.setControl(accessDeploy.getDeploy().getControl());
|
|
|
}
|