结构调整
这个提交包含在:
父节点
95a4bf8b4e
当前提交
a754e75c7e
@ -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.CommonHelper;
|
||||||
import com.xuqm.server.appmanager.common.JWTHelper;
|
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.controller.manager.v1.data.ManagerListData;
|
||||||
import com.xuqm.server.appmanager.entitys.UserInfo;
|
import com.xuqm.server.appmanager.entitys.UserInfo;
|
||||||
import com.xuqm.server.appmanager.entitys.sys.v1.ApplicationEntity;
|
import com.xuqm.server.appmanager.entitys.sys.v1.ApplicationEntity;
|
||||||
@ -19,8 +20,8 @@ public class ManagerV1Controller {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ApplicationRepository applicationRepository;
|
private ApplicationRepository applicationRepository;
|
||||||
|
|
||||||
@PostMapping("/manager/create")
|
@PostMapping("/create")
|
||||||
public HttpResult<String> appCreate(@RequestBody ApplicationEntity application, @RequestHeader(name = "token") String token) throws Exception {
|
public HttpResult<String> appCreate(@RequestBody ManagerCreateData application, @RequestHeader(name = "token") String token) throws Exception {
|
||||||
UserInfo userInfo = JWTHelper.getUser(token);
|
UserInfo userInfo = JWTHelper.getUser(token);
|
||||||
if (null == userInfo) {
|
if (null == userInfo) {
|
||||||
return new HttpResult<>(401, "登录失效", null);
|
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 {
|
public HttpResult<Page<ApplicationEntity>> appList(@RequestBody ManagerListData data, @RequestHeader(name = "token") String token) throws Exception {
|
||||||
|
|
||||||
UserInfo userInfo = JWTHelper.getUser(token);
|
UserInfo userInfo = JWTHelper.getUser(token);
|
||||||
|
|||||||
@ -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;
|
||||||
|
}
|
||||||
@ -13,7 +13,7 @@ public class InterceptorConfig implements WebMvcConfigurer {
|
|||||||
//其他接口token验证
|
//其他接口token验证
|
||||||
.addPathPatterns("/**")
|
.addPathPatterns("/**")
|
||||||
//所有用户都放心
|
//所有用户都放心
|
||||||
.excludePathPatterns("/tenant/create","/user/v1/login","/hello/**");
|
.excludePathPatterns("/tenant/**/create","/user/**/login","/hello/**");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户