徐勤民 vor 2 Monaten
Ursprung
Commit
a754e75c7e

+ 4 - 3
src/main/java/com/xuqm/server/appmanager/controller/manager/v1/ManagerV1Controller.java

@@ -2,6 +2,7 @@ package com.xuqm.server.appmanager.controller.manager.v1;
 
 import com.xuqm.server.appmanager.common.CommonHelper;
 import com.xuqm.server.appmanager.common.JWTHelper;
+import com.xuqm.server.appmanager.controller.manager.v1.data.ManagerCreateData;
 import com.xuqm.server.appmanager.controller.manager.v1.data.ManagerListData;
 import com.xuqm.server.appmanager.entitys.UserInfo;
 import com.xuqm.server.appmanager.entitys.sys.v1.ApplicationEntity;
@@ -19,8 +20,8 @@ public class ManagerV1Controller {
     @Autowired
     private ApplicationRepository applicationRepository;
 
-    @PostMapping("/manager/create")
-    public HttpResult<String> appCreate(@RequestBody ApplicationEntity application, @RequestHeader(name = "token") String token) throws Exception {
+    @PostMapping("/create")
+    public HttpResult<String> appCreate(@RequestBody ManagerCreateData application, @RequestHeader(name = "token") String token) throws Exception {
         UserInfo userInfo = JWTHelper.getUser(token);
         if (null == userInfo) {
             return new HttpResult<>(401, "登录失效", null);
@@ -43,7 +44,7 @@ public class ManagerV1Controller {
 
     }
 
-    @PostMapping("/manager/list")
+    @PostMapping("/list")
     public HttpResult<Page<ApplicationEntity>> appList(@RequestBody ManagerListData data, @RequestHeader(name = "token") String token) throws Exception {
 
         UserInfo userInfo = JWTHelper.getUser(token);

+ 11 - 0
src/main/java/com/xuqm/server/appmanager/controller/manager/v1/data/ManagerCreateData.java

@@ -0,0 +1,11 @@
+package com.xuqm.server.appmanager.controller.manager.v1.data;
+
+import com.xuqm.server.appmanager.entitys.converter.AbstractBaseTimeEntity;
+import lombok.Data;
+
+@Data
+public class ManagerCreateData extends AbstractBaseTimeEntity {
+    private String appName;
+    private String downloadUrl;
+    private String packageName;
+}

+ 1 - 1
src/main/java/com/xuqm/server/appmanager/interceptor/InterceptorConfig.java

@@ -13,7 +13,7 @@ public class InterceptorConfig implements WebMvcConfigurer {
                 //其他接口token验证
                 .addPathPatterns("/**")
                 //所有用户都放心
-                .excludePathPatterns("/tenant/create","/user/v1/login","/hello/**");
+                .excludePathPatterns("/tenant/**/create","/user/**/login","/hello/**");
     }
 }