Эх сурвалжийг харах

升级qmth-boot依赖版本至1.0.4,适配开放接口对象结构调整

luoshi 2 жил өмнө
parent
commit
ae983d9b58

+ 2 - 2
pom.xml

@@ -6,14 +6,14 @@
     <groupId>com.qmth.ops</groupId>
     <artifactId>ops-api</artifactId>
     <packaging>jar</packaging>
-    <version>1.0.0</version>
+    <version>1.0.1</version>
     <name>ops-api</name>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <maven.compiler.source>1.8</maven.compiler.source>
         <maven.compiler.target>1.8</maven.compiler.target>
-        <qmth.boot.version>1.0.3</qmth.boot.version>
+        <qmth.boot.version>1.0.4</qmth.boot.version>
     </properties>
 
     <!--

+ 9 - 0
src/main/java/com/qmth/ops/api/controller/open/OpenAppDeployController.java

@@ -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());
         }