dev
wj 2 years ago
parent f106c403d8
commit 030869dcdb

@ -296,6 +296,18 @@
<artifactId>easyexcel</artifactId> <artifactId>easyexcel</artifactId>
<version>3.1.1</version> <version>3.1.1</version>
</dependency> </dependency>
<!-- Sa-Token 权限认证在线文档https://sa-token.cc -->
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-spring-boot-starter</artifactId>
<version>1.34.0</version>
</dependency>
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-dao-redis-jackson</artifactId>
<version>1.34.0</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

@ -44,41 +44,41 @@ public class AuthorizeAspect {
@Before("adminLoginVerify()") @Before("adminLoginVerify()")
public void doAdminAuthVerify(JoinPoint joinPoint) { public void doAdminAuthVerify(JoinPoint joinPoint) {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); // ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
if (attributes == null) { // if (attributes == null) {
throw new JsonException(ResultEnum.NOT_NETWORK); // throw new JsonException(ResultEnum.NOT_NETWORK);
} // }
HttpServletRequest request = attributes.getRequest(); // HttpServletRequest request = attributes.getRequest();
//
String id = request.getHeader("ADMIN_ID"); // String id = request.getHeader("ADMIN_ID");
Long adminId; // Long adminId;
try { // try {
adminId = Long.valueOf(id); // adminId = Long.valueOf(id);
} catch (Exception e) { // } catch (Exception e) {
throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL); // throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL);
} // }
//
String token = request.getHeader("ADMIN_TOKEN"); // String token = request.getHeader("ADMIN_TOKEN");
if (token == null) { // if (token == null) {
throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL); // throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL);
} // }
//
// 验证 token // // 验证 token
Claims claims = JwtUtils.parse(token); // Claims claims = JwtUtils.parse(token);
if (claims == null) { // if (claims == null) {
throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL); // throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL);
} // }
Long jwtAdminId = Long.valueOf(claims.get("admin_id").toString()); // Long jwtAdminId = Long.valueOf(claims.get("admin_id").toString());
if (adminId.compareTo(jwtAdminId) != 0) { // if (adminId.compareTo(jwtAdminId) != 0) {
throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL); // throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL);
} // }
//
// 判断是否进行权限验证 // // 判断是否进行权限验证
MethodSignature signature = (MethodSignature) joinPoint.getSignature(); // MethodSignature signature = (MethodSignature) joinPoint.getSignature();
//从切面中获取当前方法 // //从切面中获取当前方法
Method method = signature.getMethod(); // Method method = signature.getMethod();
//得到了方,提取出他的注解 // //得到了方,提取出他的注解
AuthRuleAnnotation action = method.getAnnotation(AuthRuleAnnotation.class); // AuthRuleAnnotation action = method.getAnnotation(AuthRuleAnnotation.class);
// 进行权限验证 // 进行权限验证
// authRuleVerify(action.value(), adminId); // authRuleVerify(action.value(), adminId);
} }

@ -1,25 +1,34 @@
package com.glxp.udi.admin.config; package com.glxp.udi.admin.config;
import cn.dev33.satoken.interceptor.SaInterceptor;
import com.glxp.udi.admin.config.saToken.StpInterfaceImpl;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration @Configuration
public class WebMvcConfig implements WebMvcConfigurer { public class WebMvcConfig implements WebMvcConfigurer {
// @Override
// public void addCorsMappings(CorsRegistry registry) {
// //设置允许跨域的路径
// registry.addMapping("/**")
// //设置允许跨域请求的域名
// .allowedOriginPatterns("*")
// //是否允许证书 不再默认开启
// .allowCredentials(true)
// //设置允许的方法
// .allowedMethods("*")
// //跨域允许时间
// .maxAge(3600);
// }
@Override @Override
public void addCorsMappings(CorsRegistry registry) { public void addInterceptors(InterceptorRegistry registry) {
//设置允许跨域的路径 registry.addInterceptor(new SaInterceptor()).addPathPatterns("/**");
registry.addMapping("/**") WebMvcConfigurer.super.addInterceptors(registry);
//设置允许跨域请求的域名
.allowedOriginPatterns("*")
//是否允许证书 不再默认开启
.allowCredentials(true)
//设置允许的方法
.allowedMethods("*")
//跨域允许时间
.maxAge(3600);
} }
} }

@ -0,0 +1,99 @@
package com.glxp.udi.admin.config.saToken;
import cn.dev33.satoken.config.SaTokenConfig;
import cn.dev33.satoken.context.SaHolder;
import cn.dev33.satoken.exception.NotLoginException;
import cn.dev33.satoken.exception.NotPermissionException;
import cn.dev33.satoken.filter.SaServletFilter;
import cn.dev33.satoken.router.SaRouter;
import cn.dev33.satoken.stp.StpUtil;
import cn.dev33.satoken.util.SaResult;
import cn.hutool.http.ContentType;
import cn.hutool.json.JSONUtil;
import com.glxp.udi.admin.common.enums.ResultEnum;
import com.glxp.udi.admin.common.util.ResultVOUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.http.MediaType;
import java.util.Arrays;
import java.util.List;
/**
* Sa-Token
*/
@Configuration
public class SaTokenConfigure {
// Sa-Token 参数配置参考文档https://sa-token.cc
// 此配置会覆盖 application.yml 中的配置
@Bean
@Primary
public SaTokenConfig getSaTokenConfigPrimary() {
SaTokenConfig config = new SaTokenConfig();
config.setTokenName("ADMIN_TOKEN"); // token名称 (同时也是cookie名称)
config.setTimeout(24 * 60 * 60); // token有效期单位s 默认1天
config.setActivityTimeout(30 * 60); // token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
config.setIsConcurrent(false); // 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
config.setIsShare(true); // 在多人登录同一账号时是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
config.setTokenStyle("simple-uuid"); // token风格
config.setIsLog(false); // 是否输出操作日志
config.setIsReadCookie(false);
config.setIsReadBody(false);
config.setIsReadHeader(true);
return config;
}
private final List<String> whiteList = Arrays.asList("/login", "/udiwarehouse/register/save", "udiwarehouse/register/getCheckcode");
/**
* [Sa-Token]
*/
@Bean
public SaServletFilter getSaServletFilter() {
return new SaServletFilter()
// 指定 拦截路由 与 放行路由
.addInclude("/**")
.addExclude("/favicon.ico") /* 排除掉 /favicon.ico */
// 认证函数: 每次请求执行
.setAuth(obj -> {
// 登录认证 -- 拦截所有路由,并排除白名单 用于开放登录
// SaRouter.match("/**", String.valueOf(whiteList), () -> StpUtil.checkLogin());
SaRouter.match("/**").notMatch(whiteList).check(() -> StpUtil.checkLogin());
})
// 异常处理函数:每次认证函数发生异常时执行此函数
.setError(e -> {
// SaHolder.getResponse().setHeader("Content-Type", ContentType.JSON.getValue() + ";charset=utf-8");
return SaResult.error(e.getMessage());
})
// 前置函数:在每次认证函数之前执行
.setBeforeAuth(r -> {
// ---------- 设置一些安全响应头 ----------
SaHolder.getResponse()
// 服务器名称
.setServer("udi-ms-server")
// 是否可以在iframe显示视图 DENY=不可以 | SAMEORIGIN=同域下可以 | ALLOW-FROM uri=指定域名下可以
.setHeader("X-Frame-Options", "SAMEORIGIN")
// 是否启用浏览器默认XSS防护 0=禁用 | 1=启用 | 1; mode=block 启用, 并在检查到XSS攻击时停止渲染页面
.setHeader("X-XSS-Protection", "1; mode=block")
// 禁用浏览器内容嗅探
.setHeader("X-Content-Type-Options", "nosniff")
// 允许指定域访问跨域资源
.setHeader("Access-Control-Allow-Origin", "*")
// 允许所有请求方式
.setHeader("Access-Control-Allow-Methods", "*")
// 有效时间
.setHeader("Access-Control-Max-Age", "3600")
// 允许的header参数
.setHeader("Access-Control-Allow-Headers", "*");
;
})
;
}
}

@ -0,0 +1,43 @@
package com.glxp.udi.admin.config.saToken;
import cn.dev33.satoken.stp.StpInterface;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.NumberUtil;
import com.glxp.udi.admin.entity.auth.AuthRoleAdmin;
import com.glxp.udi.admin.service.auth.AuthLoginService;
import com.glxp.udi.admin.service.auth.AuthRoleAdminService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
*
*/
@Service // 保证此类被SpringBoot扫描完成Sa-Token的自定义权限验证扩展
@RequiredArgsConstructor
public class StpInterfaceImpl implements StpInterface {
private final AuthLoginService authLoginService;
/**
*
*/
@Override
public List<String> getPermissionList(Object loginId, String loginType) {
List<String> list = authLoginService.listRuleByAdminId(NumberUtil.parseLong(loginId.toString()));
System.out.println(list);
return list;
}
@Override
public List<String> getRoleList(Object loginId, String loginType) {
return null;
}
}

@ -1,5 +1,6 @@
package com.glxp.udi.admin.controller.auth; package com.glxp.udi.admin.controller.auth;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -57,7 +58,7 @@ public class AuthAdminController {
* *
*/ */
@ApiOperation(value = "获取管理员列表") @ApiOperation(value = "获取管理员列表")
@AuthRuleAnnotation("admin/auth/admin/index") @SaCheckPermission("admin/auth/admin/index")
@GetMapping("/admin/auth/admin/index") @GetMapping("/admin/auth/admin/index")
public BaseResponse index(@Valid AuthAdminQueryRequest authAdminQueryRequest, public BaseResponse index(@Valid AuthAdminQueryRequest authAdminQueryRequest,
BindingResult bindingResult) { BindingResult bindingResult) {
@ -110,7 +111,7 @@ public class AuthAdminController {
* *
*/ */
@ApiOperation(value = "获取角色列表") @ApiOperation(value = "获取角色列表")
@AuthRuleAnnotation("admin/auth/admin/roleList") @SaCheckPermission("admin/auth/admin/roleList")
@GetMapping("/admin/auth/admin/roleList") @GetMapping("/admin/auth/admin/roleList")
public BaseResponse roleList(@RequestParam(value = "page", defaultValue = "1") Integer page, public BaseResponse roleList(@RequestParam(value = "page", defaultValue = "1") Integer page,
@RequestParam(value = "limit", defaultValue = "100") Integer limit) { @RequestParam(value = "limit", defaultValue = "100") Integer limit) {
@ -128,7 +129,7 @@ public class AuthAdminController {
} }
@ApiIgnore @ApiIgnore
@AuthRuleAnnotation("admin/auth/admin/roleCustomers") @SaCheckPermission("admin/auth/admin/roleCustomers")
@GetMapping("/admin/auth/admin/roleCustomers") @GetMapping("/admin/auth/admin/roleCustomers")
public BaseResponse roleCustomers(@RequestParam(value = "page", defaultValue = "1") Integer page, public BaseResponse roleCustomers(@RequestParam(value = "page", defaultValue = "1") Integer page,
@RequestParam(value = "limit", defaultValue = "100") Integer limit) { @RequestParam(value = "limit", defaultValue = "100") Integer limit) {
@ -155,7 +156,7 @@ public class AuthAdminController {
} }
@ApiIgnore @ApiIgnore
@AuthRuleAnnotation("admin/auth/admin/customerRoles") @SaCheckPermission("admin/auth/admin/customerRoles")
@GetMapping("/admin/auth/admin/customerRoles") @GetMapping("/admin/auth/admin/customerRoles")
public BaseResponse customerRoles(@RequestParam(value = "page", defaultValue = "1") Integer page, public BaseResponse customerRoles(@RequestParam(value = "page", defaultValue = "1") Integer page,
@RequestParam(value = "limit", defaultValue = "100") Integer limit) { @RequestParam(value = "limit", defaultValue = "100") Integer limit) {
@ -177,7 +178,7 @@ public class AuthAdminController {
* @return * @return
*/ */
@ApiOperation(value = "新增用户接口") @ApiOperation(value = "新增用户接口")
@AuthRuleAnnotation("admin/auth/admin/save") @SaCheckPermission("admin/auth/admin/save")
@PostMapping("/admin/auth/admin/save") @PostMapping("/admin/auth/admin/save")
public BaseResponse save(@RequestBody @Valid AuthAdminSaveRequest authAdminSaveRequest, BindingResult bindingResult) { public BaseResponse save(@RequestBody @Valid AuthAdminSaveRequest authAdminSaveRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -241,7 +242,7 @@ public class AuthAdminController {
* @return * @return
*/ */
@ApiIgnore @ApiIgnore
@AuthRuleAnnotation("admin/auth/admin/edit") @SaCheckPermission("admin/auth/admin/edit")
@PostMapping("/admin/auth/admin/edit") @PostMapping("/admin/auth/admin/edit")
public BaseResponse edit(@RequestBody @Valid AuthAdminSaveRequest authAdminSaveRequest, BindingResult bindingResult) { public BaseResponse edit(@RequestBody @Valid AuthAdminSaveRequest authAdminSaveRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -288,7 +289,7 @@ public class AuthAdminController {
* @return * @return
*/ */
@ApiOperation("删除用户") @ApiOperation("删除用户")
@AuthRuleAnnotation("admin/auth/admin/delete") @SaCheckPermission("admin/auth/admin/delete")
@PostMapping("/admin/auth/admin/delete") @PostMapping("/admin/auth/admin/delete")
public BaseResponse delete(@RequestBody AuthAdminSaveRequest authAdminSaveRequest) { public BaseResponse delete(@RequestBody AuthAdminSaveRequest authAdminSaveRequest) {
if (authAdminSaveRequest.getId() == null) { if (authAdminSaveRequest.getId() == null) {
@ -310,7 +311,7 @@ public class AuthAdminController {
* @return * @return
*/ */
@ApiOperation("获取用户列表") @ApiOperation("获取用户列表")
@AuthRuleAnnotation("")
@GetMapping("/admin/auth/admin/getUserList") @GetMapping("/admin/auth/admin/getUserList")
public BaseResponse getUserList(QueryRequest queryRequest) { public BaseResponse getUserList(QueryRequest queryRequest) {
IPage<AuthAdmin> page = authAdminService.getUserList(queryRequest); IPage<AuthAdmin> page = authAdminService.getUserList(queryRequest);
@ -327,7 +328,7 @@ public class AuthAdminController {
* @return * @return
*/ */
@ApiOperation(value = "查询此用户可分配的角色") @ApiOperation(value = "查询此用户可分配的角色")
@AuthRuleAnnotation("")
@GetMapping("/auth/admin/admin/getAssignableRoles") @GetMapping("/auth/admin/admin/getAssignableRoles")
public BaseResponse getAssignableRoles(AuthAdminQueryRequest authAdminQueryRequest) { public BaseResponse getAssignableRoles(AuthAdminQueryRequest authAdminQueryRequest) {
if (authAdminQueryRequest == null || null == authAdminQueryRequest.getAdminId()) { if (authAdminQueryRequest == null || null == authAdminQueryRequest.getAdminId()) {
@ -353,7 +354,7 @@ public class AuthAdminController {
* @return * @return
*/ */
@ApiOperation(value = "获取后台管理角色") @ApiOperation(value = "获取后台管理角色")
@AuthRuleAnnotation("")
@GetMapping("/auth/admin/admin/getAdminRoles") @GetMapping("/auth/admin/admin/getAdminRoles")
public BaseResponse getAdminRoles(AuthAdminQueryRequest authAdminQueryRequest) { public BaseResponse getAdminRoles(AuthAdminQueryRequest authAdminQueryRequest) {
IPage<AuthRole> authRolePage = authRoleService.listCustomerRoles(authAdminQueryRequest.getPage(), authAdminQueryRequest.getLimit(), 0); IPage<AuthRole> authRolePage = authRoleService.listCustomerRoles(authAdminQueryRequest.getPage(), authAdminQueryRequest.getLimit(), 0);

@ -1,5 +1,6 @@
package com.glxp.udi.admin.controller.auth; package com.glxp.udi.admin.controller.auth;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.glxp.udi.admin.annotation.AuthRuleAnnotation; import com.glxp.udi.admin.annotation.AuthRuleAnnotation;
import com.glxp.udi.admin.common.res.BaseResponse; import com.glxp.udi.admin.common.res.BaseResponse;
import com.glxp.udi.admin.entity.auth.AuthPermissionRule; import com.glxp.udi.admin.entity.auth.AuthPermissionRule;
@ -38,7 +39,7 @@ public class AuthPermissionRuleController {
* *
* @return * @return
*/ */
@AuthRuleAnnotation("admin/auth/permission_rule/index") @SaCheckPermission("admin/auth/permission_rule/index")
@GetMapping("/admin/auth/permission_rule/index") @GetMapping("/admin/auth/permission_rule/index")
public BaseResponse index(String status) { public BaseResponse index(String status) {
List<AuthPermissionRule> authPermissionRuleList = authPermissionRuleService.listAll(status); List<AuthPermissionRule> authPermissionRuleList = authPermissionRuleService.listAll(status);
@ -55,7 +56,7 @@ public class AuthPermissionRuleController {
* @param bindingResult * @param bindingResult
* @return * @return
*/ */
@AuthRuleAnnotation("admin/auth/permission_rule/save") @SaCheckPermission("admin/auth/permission_rule/save")
@PostMapping("/admin/auth/permission_rule/save") @PostMapping("/admin/auth/permission_rule/save")
public BaseResponse save(@RequestBody @Valid AuthPermissionRuleSaveRequest authPermissionRuleSaveRequest, public BaseResponse save(@RequestBody @Valid AuthPermissionRuleSaveRequest authPermissionRuleSaveRequest,
BindingResult bindingResult) { BindingResult bindingResult) {
@ -86,7 +87,7 @@ public class AuthPermissionRuleController {
* @param bindingResult * @param bindingResult
* @return * @return
*/ */
@AuthRuleAnnotation("admin/auth/permission_rule/edit") @SaCheckPermission("admin/auth/permission_rule/edit")
@PostMapping("/admin/auth/permission_rule/edit") @PostMapping("/admin/auth/permission_rule/edit")
public BaseResponse edit(@RequestBody @Valid AuthPermissionRuleSaveRequest authPermissionRuleSaveRequest, public BaseResponse edit(@RequestBody @Valid AuthPermissionRuleSaveRequest authPermissionRuleSaveRequest,
BindingResult bindingResult) { BindingResult bindingResult) {
@ -117,7 +118,7 @@ public class AuthPermissionRuleController {
* @param authPermissionRuleSaveRequest * @param authPermissionRuleSaveRequest
* @return * @return
*/ */
@AuthRuleAnnotation("admin/auth/permission_rule/delete") @SaCheckPermission("admin/auth/permission_rule/delete")
@PostMapping("/admin/auth/permission_rule/delete") @PostMapping("/admin/auth/permission_rule/delete")
public BaseResponse delete(@RequestBody AuthPermissionRuleSaveRequest authPermissionRuleSaveRequest) { public BaseResponse delete(@RequestBody AuthPermissionRuleSaveRequest authPermissionRuleSaveRequest) {
if (authPermissionRuleSaveRequest.getId() == null) { if (authPermissionRuleSaveRequest.getId() == null) {

@ -1,5 +1,6 @@
package com.glxp.udi.admin.controller.auth; package com.glxp.udi.admin.controller.auth;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.glxp.udi.admin.annotation.AuthRuleAnnotation; import com.glxp.udi.admin.annotation.AuthRuleAnnotation;
@ -52,7 +53,7 @@ public class AuthRoleController {
* *
*/ */
@ApiOperation(value = "角色列表") @ApiOperation(value = "角色列表")
@AuthRuleAnnotation("admin/auth/role/index") @SaCheckPermission("admin/auth/role/index")
@GetMapping("/admin/auth/role/index") @GetMapping("/admin/auth/role/index")
public BaseResponse index(@Valid AuthRoleQueryRequest authRoleQueryRequest, BindingResult bindingResult) { public BaseResponse index(@Valid AuthRoleQueryRequest authRoleQueryRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -78,7 +79,7 @@ public class AuthRoleController {
* @param id * @param id
* @return * @return
*/ */
@AuthRuleAnnotation("admin/auth/role/authList") @SaCheckPermission("admin/auth/role/authList")
@GetMapping("/admin/auth/role/authList") @GetMapping("/admin/auth/role/authList")
public BaseResponse authList(@RequestParam("id") Long id) { public BaseResponse authList(@RequestParam("id") Long id) {
// 查询当前角色拥有的权限id // 查询当前角色拥有的权限id
@ -95,7 +96,7 @@ public class AuthRoleController {
return ResultVOUtils.success(restMap); return ResultVOUtils.success(restMap);
} }
@AuthRuleAnnotation("admin/auth/role/auth") @SaCheckPermission("admin/auth/role/auth")
@PostMapping("/admin/auth/role/auth") @PostMapping("/admin/auth/role/auth")
public BaseResponse auth(@RequestBody @Valid AuthRoleAuthRequest authRoleAuthRequest, BindingResult bindingResult) { public BaseResponse auth(@RequestBody @Valid AuthRoleAuthRequest authRoleAuthRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -124,7 +125,7 @@ public class AuthRoleController {
* @param bindingResult * @param bindingResult
* @return * @return
*/ */
@AuthRuleAnnotation("admin/auth/role/save") @SaCheckPermission("admin/auth/role/save")
@PostMapping("/admin/auth/role/save") @PostMapping("/admin/auth/role/save")
public BaseResponse save(@RequestBody @Valid AuthRoleSaveRequest authRoleSaveRequest, BindingResult bindingResult) { public BaseResponse save(@RequestBody @Valid AuthRoleSaveRequest authRoleSaveRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -156,7 +157,7 @@ public class AuthRoleController {
* @param bindingResult * @param bindingResult
* @return * @return
*/ */
@AuthRuleAnnotation("admin/auth/role/edit") @SaCheckPermission("admin/auth/role/edit")
@PostMapping("/admin/auth/role/edit") @PostMapping("/admin/auth/role/edit")
public BaseResponse edit(@RequestBody @Valid AuthRoleSaveRequest authRoleSaveRequest, BindingResult bindingResult) { public BaseResponse edit(@RequestBody @Valid AuthRoleSaveRequest authRoleSaveRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -190,7 +191,7 @@ public class AuthRoleController {
* @param authRoleSaveRequest * @param authRoleSaveRequest
* @return * @return
*/ */
@AuthRuleAnnotation("admin/auth/role/delete") @SaCheckPermission("admin/auth/role/delete")
@PostMapping("/admin/auth/role/delete") @PostMapping("/admin/auth/role/delete")
public BaseResponse delete(@RequestBody AuthRoleSaveRequest authRoleSaveRequest) { public BaseResponse delete(@RequestBody AuthRoleSaveRequest authRoleSaveRequest) {
@ -212,7 +213,7 @@ public class AuthRoleController {
} }
@AuthRuleAnnotation("")
@GetMapping("/admin/auth/role/getBussinessTypeRole") @GetMapping("/admin/auth/role/getBussinessTypeRole")
public BaseResponse getBussinessTypeRole(Long roleId) { public BaseResponse getBussinessTypeRole(Long roleId) {
if (null == roleId) { if (null == roleId) {

@ -25,7 +25,7 @@ public class CustomerContactController {
@Resource @Resource
private CustomerContactService customerContactService; private CustomerContactService customerContactService;
@AuthRuleAnnotation("")
@GetMapping("udiwarehouse/customerContact/list") @GetMapping("udiwarehouse/customerContact/list")
public BaseResponse filterList(CustomerContactFilterRequest customerFilterRequest) { public BaseResponse filterList(CustomerContactFilterRequest customerFilterRequest) {
Page<CustomerContactEntity> page = customerContactService.filterCustomerContact(customerFilterRequest); Page<CustomerContactEntity> page = customerContactService.filterCustomerContact(customerFilterRequest);
@ -35,7 +35,7 @@ public class CustomerContactController {
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@AuthRuleAnnotation("")
@GetMapping("udiwarehouse/customerContact/add") @GetMapping("udiwarehouse/customerContact/add")
public BaseResponse addContact(CustomerContactEntity customerContactEntity) { public BaseResponse addContact(CustomerContactEntity customerContactEntity) {
boolean b = customerContactService.insertCustomerContact(customerContactEntity); boolean b = customerContactService.insertCustomerContact(customerContactEntity);
@ -46,7 +46,7 @@ public class CustomerContactController {
} }
} }
@AuthRuleAnnotation("")
@GetMapping("udiwarehouse/customerContact/delete") @GetMapping("udiwarehouse/customerContact/delete")
public BaseResponse deleteContact(DeleteRequest deleteRequest) { public BaseResponse deleteContact(DeleteRequest deleteRequest) {
boolean b = customerContactService.deleteById(Long.parseLong(deleteRequest.getId())); boolean b = customerContactService.deleteById(Long.parseLong(deleteRequest.getId()));

@ -46,7 +46,7 @@ public class CustomerController {
@Resource @Resource
private AuthRoleAdminService authRoleAdminService; private AuthRoleAdminService authRoleAdminService;
@AuthRuleAnnotation("")
@GetMapping("udi/customer/list") @GetMapping("udi/customer/list")
public BaseResponse filterList(CustomerInfoFilterRequest customerFilterRequest) { public BaseResponse filterList(CustomerInfoFilterRequest customerFilterRequest) {
IPage<CustomerDetailEntity> page = customerInfoService.filterDetailCustomer(customerFilterRequest); IPage<CustomerDetailEntity> page = customerInfoService.filterDetailCustomer(customerFilterRequest);
@ -70,7 +70,7 @@ public class CustomerController {
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@AuthRuleAnnotation("")
@PostMapping("udi/customer/update") @PostMapping("udi/customer/update")
public BaseResponse updateCustomer(@RequestBody @Valid CustomerDetailEntity customerDetailEntity, public BaseResponse updateCustomer(@RequestBody @Valid CustomerDetailEntity customerDetailEntity,
BindingResult bindingResult) { BindingResult bindingResult) {
@ -96,7 +96,7 @@ public class CustomerController {
return ResultVOUtils.success("更新成功"); return ResultVOUtils.success("更新成功");
} }
@AuthRuleAnnotation("")
@PostMapping("udi/customer/delete") @PostMapping("udi/customer/delete")
public BaseResponse deleteCustomers(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) { public BaseResponse deleteCustomers(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {

@ -1,5 +1,10 @@
package com.glxp.udi.admin.controller.auth; package com.glxp.udi.admin.controller.auth;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaCheckRole;
import cn.dev33.satoken.stp.SaLoginModel;
import cn.dev33.satoken.stp.SaTokenInfo;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.glxp.udi.admin.annotation.AuthRuleAnnotation; import com.glxp.udi.admin.annotation.AuthRuleAnnotation;
import com.glxp.udi.admin.common.res.BaseResponse; import com.glxp.udi.admin.common.res.BaseResponse;
@ -122,15 +127,16 @@ public class LoginController {
authAdminService.updateAuthAdmin(authAdminUp); authAdminService.updateAuthAdmin(authAdminUp);
// 登录成功后获取权限,这里面会设置到缓存 // 登录成功后获取权限,这里面会设置到缓存
authLoginService.listRuleByAdminId(authAdmin.getId()); List<String> list = authLoginService.listRuleByAdminId(authAdmin.getId());
StpUtil.login(authAdmin.getId());
Map<String, Object> claims = new HashMap<>(); SaTokenInfo tokenInfo = StpUtil.getTokenInfo();
claims.put("admin_id", authAdmin.getId()); // Map<String, Object> claims = new HashMap<>();
String token = JwtUtils.createToken(claims, 86400L); // 一天后过期86400L // claims.put("admin_id", authAdmin.getId());
// String token = JwtUtils.createToken(claims, 86400L); // 一天后过期86400L
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("id", authAdmin.getId()); map.put("id", tokenInfo.getLoginId());
map.put("token", token); map.put("token", tokenInfo.getTokenValue());
return ResultVOUtils.success(map); return ResultVOUtils.success(map);
} }
@ -140,7 +146,6 @@ public class LoginController {
* @return * @return
*/ */
@ApiOperation("获取用户信息") @ApiOperation("获取用户信息")
@AuthRuleAnnotation("")
@GetMapping("/admin/auth/login/userInfo") @GetMapping("/admin/auth/login/userInfo")
public BaseResponse userInfo(HttpServletRequest request) { public BaseResponse userInfo(HttpServletRequest request) {
String adminId = request.getHeader("ADMIN_ID"); String adminId = request.getHeader("ADMIN_ID");
@ -163,6 +168,7 @@ public class LoginController {
@ApiOperation("退出登录") @ApiOperation("退出登录")
@PostMapping("/admin/auth/login/out") @PostMapping("/admin/auth/login/out")
public BaseResponse out() { public BaseResponse out() {
StpUtil.logout();
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@ -172,7 +178,7 @@ public class LoginController {
* @return * @return
*/ */
@ApiIgnore @ApiIgnore
@AuthRuleAnnotation("") // 需要登录验证,但是不需要权限验证时,value 值填空字符串 // 需要登录验证,但是不需要权限验证时,value 值填空字符串
@PostMapping("/admin/auth/login/password") @PostMapping("/admin/auth/login/password")
public BaseResponse password(@RequestBody @Valid UpdatePasswordRequest updatePasswordRequest, public BaseResponse password(@RequestBody @Valid UpdatePasswordRequest updatePasswordRequest,
BindingResult bindingResult) { BindingResult bindingResult) {

@ -82,7 +82,7 @@ public class RegisterController {
@Resource @Resource
private InvWarehouseService invWarehouseService; private InvWarehouseService invWarehouseService;
@AuthRuleAnnotation("")
@GetMapping("udiwarehouse/register/list") @GetMapping("udiwarehouse/register/list")
public BaseResponse filterList(UserResisterFilterRequest userResisterFilterRequest) { public BaseResponse filterList(UserResisterFilterRequest userResisterFilterRequest) {
Page<UserRegisterEntity> page = userRegisterService.filterUserRegisters(userResisterFilterRequest); Page<UserRegisterEntity> page = userRegisterService.filterUserRegisters(userResisterFilterRequest);
@ -150,7 +150,7 @@ public class RegisterController {
return ResultVOUtils.success(rMap); return ResultVOUtils.success(rMap);
} }
@AuthRuleAnnotation("")
@PostMapping("udiwarehouse/register/deleteResiter") @PostMapping("udiwarehouse/register/deleteResiter")
public BaseResponse deleteResiter(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) { public BaseResponse deleteResiter(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -180,22 +180,22 @@ public class RegisterController {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
} }
JSONObject userCode = JSONObject.parseObject(String.valueOf(redisUtil.get(Constant.CAPTCHAS + userRegisterEntity.getMobile()))); // JSONObject userCode = JSONObject.parseObject(String.valueOf(redisUtil.get(Constant.CAPTCHAS + userRegisterEntity.getMobile())));
if (userCode == null) { // if (userCode == null) {
return ResultVOUtils.error(500, "验证码已失效,请重新获取"); // return ResultVOUtils.error(500, "验证码已失效,请重新获取");
} // }
long lastTime = userCode.getLong("createTime"); // long lastTime = userCode.getLong("createTime");
int checkCode = (Integer) userCode.get("code"); // int checkCode = (Integer) userCode.get("code");
String phoneNum = userCode.getString("memPhone"); // String phoneNum = userCode.getString("memPhone");
if ((System.currentTimeMillis() - lastTime) > 1000 * 60 * 5) { // if ((System.currentTimeMillis() - lastTime) > 1000 * 60 * 5) {
return ResultVOUtils.error(500, "验证码已过期,请重新获取"); // return ResultVOUtils.error(500, "验证码已过期,请重新获取");
} // }
if (checkCode != userRegisterEntity.getCheckCode()) { // if (checkCode != userRegisterEntity.getCheckCode()) {
return ResultVOUtils.error(500, "验证码错误,请重新获取"); // return ResultVOUtils.error(500, "验证码错误,请重新获取");
} // }
if (!phoneNum.equals(userRegisterEntity.getMobile())) { // if (!phoneNum.equals(userRegisterEntity.getMobile())) {
return ResultVOUtils.error(500, "手机号与获取验证码不一致"); // return ResultVOUtils.error(500, "手机号与获取验证码不一致");
} // }
boolean isExitPhone = userRegisterService.isExit(userRegisterEntity.getMobile()); boolean isExitPhone = userRegisterService.isExit(userRegisterEntity.getMobile());
if (isExitPhone) { if (isExitPhone) {
return ResultVOUtils.error(500, "该手机号已被注册"); return ResultVOUtils.error(500, "该手机号已被注册");
@ -264,7 +264,7 @@ public class RegisterController {
return ResultVOUtils.success("密码修改成功"); return ResultVOUtils.success("密码修改成功");
} }
@AuthRuleAnnotation("")
@PostMapping("udiwarehouse/register/check") @PostMapping("udiwarehouse/register/check")
public BaseResponse checkRegister(@RequestBody @Valid RegisterCheckRequest registerCheckRequest, public BaseResponse checkRegister(@RequestBody @Valid RegisterCheckRequest registerCheckRequest,
BindingResult bindingResult) { BindingResult bindingResult) {

@ -48,7 +48,7 @@ public class BussinessTypeController {
private OrderService orderService; private OrderService orderService;
@ApiOperation(value = "扫码单据列表") @ApiOperation(value = "扫码单据列表")
@AuthRuleAnnotation("")
@GetMapping("/udiwms/bussinessType/filter") @GetMapping("/udiwms/bussinessType/filter")
public BaseResponse filterBussinessType(BussinessTypeFilterRequest bussinessTypeFilterRequest, public BaseResponse filterBussinessType(BussinessTypeFilterRequest bussinessTypeFilterRequest,
BindingResult bindingResult) { BindingResult bindingResult) {
@ -67,7 +67,7 @@ public class BussinessTypeController {
} }
@ApiOperation("根据用户查询单据类型列表") @ApiOperation("根据用户查询单据类型列表")
@AuthRuleAnnotation("")
@GetMapping("/udiwms/bussinessType/filterAllByUser") @GetMapping("/udiwms/bussinessType/filterAllByUser")
public BaseResponse filterAllByUser(BussinessTypeFilterRequest bussinessTypeFilterRequest, public BaseResponse filterAllByUser(BussinessTypeFilterRequest bussinessTypeFilterRequest,
BindingResult bindingResult) { BindingResult bindingResult) {
@ -90,7 +90,7 @@ public class BussinessTypeController {
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@AuthRuleAnnotation("")
@PostMapping("/udiwms/bussinessType/delete") @PostMapping("/udiwms/bussinessType/delete")
public BaseResponse deleteBussinessType(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) { public BaseResponse deleteBussinessType(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -107,7 +107,7 @@ public class BussinessTypeController {
return ResultVOUtils.success("删除成功"); return ResultVOUtils.success("删除成功");
} }
@AuthRuleAnnotation("")
@PostMapping("/udiwms/bussinessType/update") @PostMapping("/udiwms/bussinessType/update")
public BaseResponse updateBussinessType(@RequestBody BussinessTypeEntity bussinessTypeEntity, BindingResult bindingResult) { public BaseResponse updateBussinessType(@RequestBody BussinessTypeEntity bussinessTypeEntity, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -122,7 +122,7 @@ public class BussinessTypeController {
return ResultVOUtils.success("更新成功"); return ResultVOUtils.success("更新成功");
} }
@AuthRuleAnnotation("")
@PostMapping("/udiwms/bussinessType/insert") @PostMapping("/udiwms/bussinessType/insert")
public BaseResponse insertBussinessType(@RequestBody @Valid BussinessTypeEntity bussinessTypeEntity, BindingResult bindingResult) { public BaseResponse insertBussinessType(@RequestBody @Valid BussinessTypeEntity bussinessTypeEntity, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -153,7 +153,7 @@ public class BussinessTypeController {
* *
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("/warehouse/bussinessType/candidateBussinessType") @GetMapping("/warehouse/bussinessType/candidateBussinessType")
public BaseResponse candidateBussinessType(CndidateRequest cndidateRequest) { public BaseResponse candidateBussinessType(CndidateRequest cndidateRequest) {
if (StrUtil.isBlank(cndidateRequest.getMainAction())) { if (StrUtil.isBlank(cndidateRequest.getMainAction())) {
@ -165,7 +165,7 @@ public class BussinessTypeController {
return ResultVOUtils.success(bussinessTypeEntities); return ResultVOUtils.success(bussinessTypeEntities);
} }
@AuthRuleAnnotation("")
@GetMapping("/udiwms/localBusType/filterByBus") @GetMapping("/udiwms/localBusType/filterByBus")
public BaseResponse filterByBus(BussinessLocalTypeFilterRequest bussinessTypeFilterRequest, BindingResult bindingResult) { public BaseResponse filterByBus(BussinessLocalTypeFilterRequest bussinessTypeFilterRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -182,7 +182,7 @@ public class BussinessTypeController {
* @param action * @param action
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("/udims/basic/busType/getCorpType") @GetMapping("/udims/basic/busType/getCorpType")
public BaseResponse getCorpType(@NotBlank(message = "参数不能为空") String action) { public BaseResponse getCorpType(@NotBlank(message = "参数不能为空") String action) {
Integer corpType = bussinessTypeService.getCorpType(action); Integer corpType = bussinessTypeService.getCorpType(action);

@ -57,7 +57,7 @@ public class CompanyController {
@Resource @Resource
private CustomerInfoService customerInfoService; private CustomerInfoService customerInfoService;
@AuthRuleAnnotation("")
@GetMapping("/warehouse/info/company") @GetMapping("/warehouse/info/company")
public BaseResponse getCompanyInfo(CompanyRequest companyRequest) { public BaseResponse getCompanyInfo(CompanyRequest companyRequest) {
CompanyEntity companyEntity = companyService.findCompany(companyRequest.getCustomerId()); CompanyEntity companyEntity = companyService.findCompany(companyRequest.getCustomerId());
@ -67,7 +67,7 @@ public class CompanyController {
return ResultVOUtils.error(500, "企业信息为空"); return ResultVOUtils.error(500, "企业信息为空");
} }
@AuthRuleAnnotation("")
@GetMapping("/udi/info/getSubCompany") @GetMapping("/udi/info/getSubCompany")
public BaseResponse getSubCompany(FilterCompanyRequest companyRequest) { public BaseResponse getSubCompany(FilterCompanyRequest companyRequest) {
Page<CompanyEntity> page = companyService.getSubCompany(companyRequest); Page<CompanyEntity> page = companyService.getSubCompany(companyRequest);
@ -77,7 +77,7 @@ public class CompanyController {
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@AuthRuleAnnotation("")
@PostMapping("/warehouse/info/modifyCompany") @PostMapping("/warehouse/info/modifyCompany")
public BaseResponse modifyCompany(@RequestBody CompanyEntity companyEntity) { public BaseResponse modifyCompany(@RequestBody CompanyEntity companyEntity) {
if (StringUtils.isNotBlank(companyEntity.getNewFilePath())) { if (StringUtils.isNotBlank(companyEntity.getNewFilePath())) {
@ -172,7 +172,7 @@ public class CompanyController {
* @param appSecret * @param appSecret
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("warehouse/info/testConnection") @GetMapping("warehouse/info/testConnection")
public BaseResponse testConnection(String appId, String appSecret) { public BaseResponse testConnection(String appId, String appSecret) {
if (StrUtil.isBlank(appId) || StrUtil.isBlank(appSecret)) { if (StrUtil.isBlank(appId) || StrUtil.isBlank(appSecret)) {
@ -191,7 +191,7 @@ public class CompanyController {
* *
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("warehouse/info/verifyConnection") @GetMapping("warehouse/info/verifyConnection")
public BaseResponse verifyConnection() { public BaseResponse verifyConnection() {
String customerId = authAdminService.getCurrentUserCustomerId(); String customerId = authAdminService.getCurrentUserCustomerId();
@ -211,7 +211,7 @@ public class CompanyController {
* *
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("warehouse/info/setIgnoreVerify") @GetMapping("warehouse/info/setIgnoreVerify")
public BaseResponse setIgnoreVerify() { public BaseResponse setIgnoreVerify() {
String customerId = authAdminService.getCurrentUserCustomerId(); String customerId = authAdminService.getCurrentUserCustomerId();

@ -38,7 +38,7 @@ public class PlatformController {
@Resource @Resource
private UnitMaintainService unitMaintainService; private UnitMaintainService unitMaintainService;
@AuthRuleAnnotation("")
@PostMapping("/udims/platform/remove") @PostMapping("/udims/platform/remove")
public BaseResponse remove(@RequestBody PlatformEntity platformEntity) { public BaseResponse remove(@RequestBody PlatformEntity platformEntity) {
if (platformService.remove(platformEntity.getId()) > 0) { if (platformService.remove(platformEntity.getId()) > 0) {
@ -48,7 +48,7 @@ public class PlatformController {
} }
@AuthRuleAnnotation("")
@PostMapping("/udims/platform/update") @PostMapping("/udims/platform/update")
public BaseResponse update(@RequestBody PlatformEntity platformEntity) { public BaseResponse update(@RequestBody PlatformEntity platformEntity) {
if (StrUtil.isBlank(platformEntity.getName()) || StrUtil.isBlank(platformEntity.getHost())) { if (StrUtil.isBlank(platformEntity.getName()) || StrUtil.isBlank(platformEntity.getHost())) {
@ -57,7 +57,7 @@ public class PlatformController {
return platformService.update(platformEntity); return platformService.update(platformEntity);
} }
@AuthRuleAnnotation("")
@GetMapping("/udims/platform/list") @GetMapping("/udims/platform/list")
public BaseResponse list(@RequestParam Map<String, Object> params) { public BaseResponse list(@RequestParam Map<String, Object> params) {
IPage<PlatformEntity> page = platformService.list(params); IPage<PlatformEntity> page = platformService.list(params);
@ -72,7 +72,7 @@ public class PlatformController {
* *
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/udims/platform/testUserInfo") @PostMapping("/udims/platform/testUserInfo")
public BaseResponse testUserInfo(@RequestBody PlatformUserInfoRequest platformUserInfoRequest, BindingResult bindingResult) { public BaseResponse testUserInfo(@RequestBody PlatformUserInfoRequest platformUserInfoRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -105,7 +105,7 @@ public class PlatformController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@AuthRuleAnnotation("")
@PostMapping("/udims/platform/link") @PostMapping("/udims/platform/link")
public BaseResponse update(@RequestBody PlatformLinkRequest platformLinkRequest) { public BaseResponse update(@RequestBody PlatformLinkRequest platformLinkRequest) {
//判断此数据是否重复 //判断此数据是否重复
@ -164,7 +164,7 @@ public class PlatformController {
/** /**
* *
*/ */
@AuthRuleAnnotation("")
@GetMapping("/udims/platform/getLinkPlatformList") @GetMapping("/udims/platform/getLinkPlatformList")
public BaseResponse getLinkPlatformList(PlatformLinkRequest platformLinkRequest, BindingResult bindingResult) { public BaseResponse getLinkPlatformList(PlatformLinkRequest platformLinkRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -183,7 +183,7 @@ public class PlatformController {
* @param corpId * @param corpId
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/udims/platform/unbind") @PostMapping("/udims/platform/unbind")
public BaseResponse unbindPlatform(DeleteRequest deleteRequest) { public BaseResponse unbindPlatform(DeleteRequest deleteRequest) {
if (StrUtil.isBlank(deleteRequest.getId())) { if (StrUtil.isBlank(deleteRequest.getId())) {
@ -198,7 +198,7 @@ public class PlatformController {
* *
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("/udims/platform/getTargetActions") @GetMapping("/udims/platform/getTargetActions")
public BaseResponse getTargetActions(String platformId, String invSubCode) { public BaseResponse getTargetActions(String platformId, String invSubCode) {
if (StrUtil.isBlank(platformId)) { if (StrUtil.isBlank(platformId)) {
@ -208,7 +208,7 @@ public class PlatformController {
} }
@AuthRuleAnnotation("")
@GetMapping("/udims/platform/getTargetInv") @GetMapping("/udims/platform/getTargetInv")
public BaseResponse getTargetInv(String platformId) { public BaseResponse getTargetInv(String platformId) {
if (StrUtil.isBlank(platformId)) { if (StrUtil.isBlank(platformId)) {
@ -218,7 +218,7 @@ public class PlatformController {
} }
@AuthRuleAnnotation("")
@GetMapping("/udims/platform/getTargetSubInv") @GetMapping("/udims/platform/getTargetSubInv")
public BaseResponse getTargetSubInv(String platformId, String invCode) { public BaseResponse getTargetSubInv(String platformId, String invCode) {
if (StrUtil.isBlank(platformId)) { if (StrUtil.isBlank(platformId)) {
@ -233,7 +233,7 @@ public class PlatformController {
* @param host * @param host
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("udims/platform/testPlatformConnection") @GetMapping("udims/platform/testPlatformConnection")
public BaseResponse testPlatformConnection(String host) { public BaseResponse testPlatformConnection(String host) {
if (StrUtil.isBlank(host)) { if (StrUtil.isBlank(host)) {

@ -207,7 +207,7 @@ public class InvProductsController {
} }
} }
@AuthRuleAnnotation("")
@GetMapping("spms/inv/products/getDetaiByCode") @GetMapping("spms/inv/products/getDetaiByCode")
public BaseResponse getDetaiByCode(FilterInvProductDetailRequest filterInvProductDetailRequest) { public BaseResponse getDetaiByCode(FilterInvProductDetailRequest filterInvProductDetailRequest) {
InvProductDetailEntity invProductDetailEntity = invProductDetailService.statInvPreInDetail(filterInvProductDetailRequest.getCode()); InvProductDetailEntity invProductDetailEntity = invProductDetailService.statInvPreInDetail(filterInvProductDetailRequest.getCode());

@ -83,7 +83,7 @@ public class OrderController {
@Resource @Resource
private WarehouseTempService warehouseTempService; private WarehouseTempService warehouseTempService;
@AuthRuleAnnotation("")
@GetMapping("/warehouse/inout/order/filter") @GetMapping("/warehouse/inout/order/filter")
public BaseResponse filterOrder(OrderFilterRequest orderFilterRequest, BindingResult bindingResult) { public BaseResponse filterOrder(OrderFilterRequest orderFilterRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -184,7 +184,7 @@ public class OrderController {
* @param orderFilterRequest * @param orderFilterRequest
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("admin/warehouse/inout/order/listerror") @GetMapping("admin/warehouse/inout/order/listerror")
public BaseResponse listOrderError(OrderFilterRequest orderFilterRequest) { public BaseResponse listOrderError(OrderFilterRequest orderFilterRequest) {
AuthAdmin authAdmin = authAdminService.getCurrentUser(); AuthAdmin authAdmin = authAdminService.getCurrentUser();
@ -205,7 +205,7 @@ public class OrderController {
* @param orderFilterRequest * @param orderFilterRequest
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("/warehouse/inout/order/filterAdditionalOrder") @GetMapping("/warehouse/inout/order/filterAdditionalOrder")
public BaseResponse filterAdditionalOrder(OrderFilterRequest orderFilterRequest) { public BaseResponse filterAdditionalOrder(OrderFilterRequest orderFilterRequest) {
AuthAdmin authAdmin = authAdminService.getCurrentUser(); AuthAdmin authAdmin = authAdminService.getCurrentUser();
@ -233,7 +233,7 @@ public class OrderController {
* @param bindingResult * @param bindingResult
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("/warehouse/inout/order/filterSupplementOrder") @GetMapping("/warehouse/inout/order/filterSupplementOrder")
public BaseResponse filterSupplementOrder(OrderFilterRequest orderFilterRequest, BindingResult bindingResult) { public BaseResponse filterSupplementOrder(OrderFilterRequest orderFilterRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -264,7 +264,7 @@ public class OrderController {
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/order/mergeOrder") @PostMapping("/warehouse/inout/order/mergeOrder")
public BaseResponse mergeOrder(@RequestBody OrderMergeRequest orderMergeRequest, BindingResult bindingResult) { public BaseResponse mergeOrder(@RequestBody OrderMergeRequest orderMergeRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -306,7 +306,7 @@ public class OrderController {
return ResultVOUtils.success("添加成功"); return ResultVOUtils.success("添加成功");
} }
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/order/updateSpms") @PostMapping("/warehouse/inout/order/updateSpms")
public BaseResponse uploadSpms(@RequestBody OrderUploadRequest orderUploadRequest, BindingResult bindingResult) { public BaseResponse uploadSpms(@RequestBody OrderUploadRequest orderUploadRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -417,7 +417,7 @@ public class OrderController {
* @param orderDetailEntity * @param orderDetailEntity
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/order/detail/update") @PostMapping("/warehouse/inout/order/detail/update")
public BaseResponse updateStockOrderDetail(OrderDetailEntity orderDetailEntity) { public BaseResponse updateStockOrderDetail(OrderDetailEntity orderDetailEntity) {
if (null != orderDetailEntity) { if (null != orderDetailEntity) {
@ -432,7 +432,7 @@ public class OrderController {
* @param orderEditRequest * @param orderEditRequest
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/udiwms/inout/order/updateOrderInfo") @PostMapping("/udiwms/inout/order/updateOrderInfo")
public BaseResponse updateOrderInfo(@RequestBody OrderEditRequest orderEditRequest) { public BaseResponse updateOrderInfo(@RequestBody OrderEditRequest orderEditRequest) {
if (null == orderEditRequest || StrUtil.isBlank(orderEditRequest.getActDate()) || CollUtil.isEmpty(orderEditRequest.getOrderIds())) { if (null == orderEditRequest || StrUtil.isBlank(orderEditRequest.getActDate()) || CollUtil.isEmpty(orderEditRequest.getOrderIds())) {
@ -448,7 +448,7 @@ public class OrderController {
* @param orderId * @param orderId
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("/udiwms/stock/order/supplementOrder") @GetMapping("/udiwms/stock/order/supplementOrder")
public BaseResponse supplementOrder(@RequestParam("orderId") String orderId) { public BaseResponse supplementOrder(@RequestParam("orderId") String orderId) {
if (StrUtil.isBlank(orderId)) { if (StrUtil.isBlank(orderId)) {
@ -468,7 +468,7 @@ public class OrderController {
* @param orderId * @param orderId
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("/udiwms/inout/order/filterOrderForDelete") @GetMapping("/udiwms/inout/order/filterOrderForDelete")
public BaseResponse filterOrderForDelete(String orderId) { public BaseResponse filterOrderForDelete(String orderId) {
if (StrUtil.isBlank(orderId)) { if (StrUtil.isBlank(orderId)) {
@ -499,7 +499,7 @@ public class OrderController {
* @param addOrderChangeRequest * @param addOrderChangeRequest
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/udiwms/stock/order/change") @PostMapping("/udiwms/stock/order/change")
public BaseResponse stockOrderChange(@RequestBody AddOrderChangeRequest addOrderChangeRequest) { public BaseResponse stockOrderChange(@RequestBody AddOrderChangeRequest addOrderChangeRequest) {
OrderEntity originOrder = orderService.findById(addOrderChangeRequest.getOrderId()); OrderEntity originOrder = orderService.findById(addOrderChangeRequest.getOrderId());
@ -561,7 +561,7 @@ public class OrderController {
} }
//手持终端下载订单校验 //手持终端下载订单校验
@AuthRuleAnnotation("")
@GetMapping("/udiwms/inout/order/download") @GetMapping("/udiwms/inout/order/download")
public BaseResponse downloadOrder(OrderFilterRequest orderFilterRequest, BindingResult bindingResult) { public BaseResponse downloadOrder(OrderFilterRequest orderFilterRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -611,7 +611,7 @@ public class OrderController {
} }
//手持终端验收完成后,更新订单状态 //手持终端验收完成后,更新订单状态
@AuthRuleAnnotation("")
@PostMapping("/spms/inout/order/check/updateStatus") @PostMapping("/spms/inout/order/check/updateStatus")
public BaseResponse updateStatus(@RequestBody UpdateExportStatusRequest updateExportStatusRequest, BindingResult bindingResult) { public BaseResponse updateStatus(@RequestBody UpdateExportStatusRequest updateExportStatusRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -633,7 +633,7 @@ public class OrderController {
* *
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/order/submitWebScanOrder") @PostMapping("/warehouse/inout/order/submitWebScanOrder")
public BaseResponse submitWebScanOrder(@RequestBody AddOrderRequest addOrderRequest, BindingResult bindingResult) { public BaseResponse submitWebScanOrder(@RequestBody AddOrderRequest addOrderRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors() || null == addOrderRequest || StrUtil.isBlank(addOrderRequest.getOrderId())) { if (bindingResult.hasErrors() || null == addOrderRequest || StrUtil.isBlank(addOrderRequest.getOrderId())) {

@ -86,7 +86,7 @@ public class StockQRCodeTextController {
//-----------打印码 //-----------打印码
@AuthRuleAnnotation("")
@PostMapping("/udiwms/pdf/template/inspection/stock/qrcode/text/file") @PostMapping("/udiwms/pdf/template/inspection/stock/qrcode/text/file")
public BaseResponse inspectionStockQRCodeTextPDFFromTemplateFile( public BaseResponse inspectionStockQRCodeTextPDFFromTemplateFile(
@RequestBody InspectionPDFTemplateRequest inspectionPDFTemplateRequest) { @RequestBody InspectionPDFTemplateRequest inspectionPDFTemplateRequest) {
@ -106,7 +106,7 @@ public class StockQRCodeTextController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@AuthRuleAnnotation("")
@PostMapping("/udiwms/pdf/template/stock/qrcode/text/file") @PostMapping("/udiwms/pdf/template/stock/qrcode/text/file")
public BaseResponse stockQRCodeTextPDFFromTemplateFile( public BaseResponse stockQRCodeTextPDFFromTemplateFile(
@RequestBody StockQRCodeTextPDFTemplateRequest stockQRCodeTextPDFTemplateRequest, @RequestBody StockQRCodeTextPDFTemplateRequest stockQRCodeTextPDFTemplateRequest,
@ -192,7 +192,7 @@ public class StockQRCodeTextController {
return null; return null;
} }
@AuthRuleAnnotation("")
@PostMapping("/udiwms/pdf/template/stock/qrcode/text/maxfile") @PostMapping("/udiwms/pdf/template/stock/qrcode/text/maxfile")
public BaseResponse stockQRCodeMaxTextPDFFromTemplateFile( public BaseResponse stockQRCodeMaxTextPDFFromTemplateFile(
@RequestBody StockQRCodeTextPDFTemplateRequest stockQRCodeTextPDFTemplateRequest) { @RequestBody StockQRCodeTextPDFTemplateRequest stockQRCodeTextPDFTemplateRequest) {
@ -272,7 +272,7 @@ public class StockQRCodeTextController {
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@AuthRuleAnnotation("")
@GetMapping("/spms/stock/qrcode/filterTemp") @GetMapping("/spms/stock/qrcode/filterTemp")
public BaseResponse filterTemp(FilterStPrintTempRequest filterStPrintTempRequest, BindingResult bindingResult) { public BaseResponse filterTemp(FilterStPrintTempRequest filterStPrintTempRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -296,7 +296,7 @@ public class StockQRCodeTextController {
//-----------打印订单 //-----------打印订单
@AuthRuleAnnotation("")
@PostMapping("/udiwms/pdf/template/inspection/stock/order/file") @PostMapping("/udiwms/pdf/template/inspection/stock/order/file")
public BaseResponse inspectionStockOrderPDFFromTemplateFile( public BaseResponse inspectionStockOrderPDFFromTemplateFile(
@RequestBody InspectionPDFTemplateRequest inspectionPDFTemplateRequest) { @RequestBody InspectionPDFTemplateRequest inspectionPDFTemplateRequest) {
@ -322,7 +322,7 @@ public class StockQRCodeTextController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@AuthRuleAnnotation("")
@PostMapping("/udiwms/pdf/template/stock/order/file") @PostMapping("/udiwms/pdf/template/stock/order/file")
public void stockOrderPDFFromTemplateFile( public void stockOrderPDFFromTemplateFile(
@RequestBody StockQRCodeTextPDFTemplateRequest stockQRCodeTextPDFTemplateRequest, @RequestBody StockQRCodeTextPDFTemplateRequest stockQRCodeTextPDFTemplateRequest,
@ -374,7 +374,7 @@ public class StockQRCodeTextController {
} }
} }
@AuthRuleAnnotation("")
@GetMapping(value = "/udiwms/stock/qrcode/text/upload") @GetMapping(value = "/udiwms/stock/qrcode/text/upload")
public BaseResponse upload(StockQRCodeTextFilterRequest stockQRCodeTextFilterRequest, public BaseResponse upload(StockQRCodeTextFilterRequest stockQRCodeTextFilterRequest,
BindingResult bindingResult) { BindingResult bindingResult) {
@ -390,7 +390,7 @@ public class StockQRCodeTextController {
return ResultVOUtils.error(500, "修改失败"); return ResultVOUtils.error(500, "修改失败");
} }
@AuthRuleAnnotation("")
@PostMapping("/udiwms/stock/qrcode/text/delete") @PostMapping("/udiwms/stock/qrcode/text/delete")
public BaseResponse delete(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) { public BaseResponse delete(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {

@ -119,7 +119,7 @@ public class UdiInfoController {
} }
} }
@AuthRuleAnnotation("")
@GetMapping("udims/udiinfo/local/filterByUuid") @GetMapping("udims/udiinfo/local/filterByUuid")
public BaseResponse filterLocalByUuid(FilterUdiInfoRequest productInfoFilterRequest) { public BaseResponse filterLocalByUuid(FilterUdiInfoRequest productInfoFilterRequest) {
productInfoFilterRequest.setCustomerId(authAdminService.getCurrentUserCustomerId()); productInfoFilterRequest.setCustomerId(authAdminService.getCurrentUserCustomerId());
@ -127,7 +127,7 @@ public class UdiInfoController {
return ResultVOUtils.success(page.getRecords()); return ResultVOUtils.success(page.getRecords());
} }
@AuthRuleAnnotation("")
@PostMapping("/udi/udirel/update") @PostMapping("/udi/udirel/update")
public BaseResponse updateRelevanceEntity(@RequestBody UdiInfoEntity udiInfoEntity, BindingResult bindingResult) { public BaseResponse updateRelevanceEntity(@RequestBody UdiInfoEntity udiInfoEntity, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {

@ -122,7 +122,7 @@ public class UdiRelevanceController {
* @param combineRequest * @param combineRequest
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/udi/udirel/revleance") @PostMapping("/udi/udirel/revleance")
public BaseResponse revleanceUdi(@RequestBody CombineRequest combineRequest) { public BaseResponse revleanceUdi(@RequestBody CombineRequest combineRequest) {
String customerId = authAdminService.getCurrentUserCustomerId(); String customerId = authAdminService.getCurrentUserCustomerId();
@ -157,7 +157,7 @@ public class UdiRelevanceController {
} }
//选入查询结果的所有DI //选入查询结果的所有DI
@AuthRuleAnnotation("")
@GetMapping("/udi/udirel/combineAll") @GetMapping("/udi/udirel/combineAll")
public BaseResponse combineAll(FilterUdiInfoRequest productInfoFilterRequest) { public BaseResponse combineAll(FilterUdiInfoRequest productInfoFilterRequest) {
productInfoFilterRequest.setCustomerId(authAdminService.getCurrentUserCustomerId()); productInfoFilterRequest.setCustomerId(authAdminService.getCurrentUserCustomerId());
@ -166,7 +166,7 @@ public class UdiRelevanceController {
} }
//更换关联ERP产品 //更换关联ERP产品
@AuthRuleAnnotation("")
@PostMapping("/udi/udirel/disable") @PostMapping("/udi/udirel/disable")
public BaseResponse disable(@RequestBody CombineRequest combineRequest) { public BaseResponse disable(@RequestBody CombineRequest combineRequest) {
if (StrUtil.isBlank(combineRequest.getRelId())) { if (StrUtil.isBlank(combineRequest.getRelId())) {
@ -186,7 +186,7 @@ public class UdiRelevanceController {
} }
//客户端器械信息下载 //客户端器械信息下载
@AuthRuleAnnotation("")
@GetMapping("/udi/udirel/mutil/download") @GetMapping("/udi/udirel/mutil/download")
public BaseResponse downloadMutilProducts(FilterUdiInfoRequest filterUdiInfoRequest, BindingResult bindingResult) { public BaseResponse downloadMutilProducts(FilterUdiInfoRequest filterUdiInfoRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {

@ -53,7 +53,7 @@ public class UnitMaintainController {
* @param bindingResult * @param bindingResult
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("/warehouse/unitMaintain/getUnbindUnitMaintain") @GetMapping("/warehouse/unitMaintain/getUnbindUnitMaintain")
public BaseResponse getUnbindUnitMaintain(UnitMaintainFilterRequest unitMaintainFilterRequest, BindingResult bindingResult) { public BaseResponse getUnbindUnitMaintain(UnitMaintainFilterRequest unitMaintainFilterRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -68,7 +68,7 @@ public class UnitMaintainController {
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@AuthRuleAnnotation("")
@GetMapping("/warehouse/unit/download") @GetMapping("/warehouse/unit/download")
public BaseResponse downloadUnit(UnitMaintainFilterRequest unitMaintainFilterRequest, BindingResult bindingResult) { public BaseResponse downloadUnit(UnitMaintainFilterRequest unitMaintainFilterRequest, BindingResult bindingResult) {
@ -85,7 +85,7 @@ public class UnitMaintainController {
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@AuthRuleAnnotation("")
@GetMapping("/udiwms/unit/download") @GetMapping("/udiwms/unit/download")
public BaseResponse downloadUnitB(UnitMaintainFilterRequest unitMaintainFilterRequest, BindingResult bindingResult) { public BaseResponse downloadUnitB(UnitMaintainFilterRequest unitMaintainFilterRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {

@ -68,7 +68,7 @@ public class WareHouseController {
@Resource @Resource
private StackOrderService stackOrderService; private StackOrderService stackOrderService;
@AuthRuleAnnotation("")
@PostMapping("warehouse/inout/postOrders") @PostMapping("warehouse/inout/postOrders")
public BaseResponse postOrders(@RequestBody PostOrderRequest postOrderRequest, BindingResult bindingResult) { public BaseResponse postOrders(@RequestBody PostOrderRequest postOrderRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -96,7 +96,7 @@ public class WareHouseController {
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@AuthRuleAnnotation("")
@GetMapping("warehouse/inout/deleteCodesTempById") @GetMapping("warehouse/inout/deleteCodesTempById")
public BaseResponse deleteCodesTempById(String id) { public BaseResponse deleteCodesTempById(String id) {
return warehouseTempService.deleteCodesTempById(id); return warehouseTempService.deleteCodesTempById(id);
@ -108,7 +108,7 @@ public class WareHouseController {
* @param code * @param code
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("/warehouse/inout/warehouseUserList") @GetMapping("/warehouse/inout/warehouseUserList")
public BaseResponse getWarehouseUserList(FilterInvLinkDataRequest filterInvLinkDataRequest) { public BaseResponse getWarehouseUserList(FilterInvLinkDataRequest filterInvLinkDataRequest) {
Page<WarehouseUserEntity> page = warehouseUserService.filterUserList(filterInvLinkDataRequest); Page<WarehouseUserEntity> page = warehouseUserService.filterUserList(filterInvLinkDataRequest);
@ -118,7 +118,7 @@ public class WareHouseController {
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@AuthRuleAnnotation("")
@GetMapping("/warehouse/inout/warehouseBussniessTypeList") @GetMapping("/warehouse/inout/warehouseBussniessTypeList")
public BaseResponse getWarehouseBussniessTypeList(FilterInvLinkDataRequest filterInvLinkDataRequest) { public BaseResponse getWarehouseBussniessTypeList(FilterInvLinkDataRequest filterInvLinkDataRequest) {
Page<WarehouseBussinessTypeEntity> page = warehouseBussinessTypeService.filterList(filterInvLinkDataRequest); Page<WarehouseBussinessTypeEntity> page = warehouseBussinessTypeService.filterList(filterInvLinkDataRequest);
@ -128,7 +128,7 @@ public class WareHouseController {
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/saveWarehouseUser") @PostMapping("/warehouse/inout/saveWarehouseUser")
public BaseResponse saveWarehouseUser(@RequestBody Map<String, Object> params) { public BaseResponse saveWarehouseUser(@RequestBody Map<String, Object> params) {
String code = String.valueOf(params.get("code")); String code = String.valueOf(params.get("code"));
@ -140,7 +140,7 @@ public class WareHouseController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/saveWarehouseBussinessType") @PostMapping("/warehouse/inout/saveWarehouseBussinessType")
public BaseResponse saveWarehouseBussinessType(@RequestBody Map<String, Object> params) { public BaseResponse saveWarehouseBussinessType(@RequestBody Map<String, Object> params) {
String code = String.valueOf(params.get("code")); String code = String.valueOf(params.get("code"));
@ -152,7 +152,7 @@ public class WareHouseController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/updateDirector") @PostMapping("/warehouse/inout/updateDirector")
public BaseResponse updateDirector(Integer id) { public BaseResponse updateDirector(Integer id) {
if (null == id) { if (null == id) {
@ -162,7 +162,7 @@ public class WareHouseController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/delWarehouseUser") @PostMapping("/warehouse/inout/delWarehouseUser")
public BaseResponse deleteWarehouseUser(Integer id) { public BaseResponse deleteWarehouseUser(Integer id) {
if (null == id) { if (null == id) {
@ -172,7 +172,7 @@ public class WareHouseController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/delWarehouseBussinessType") @PostMapping("/warehouse/inout/delWarehouseBussinessType")
public BaseResponse deleteWarehouseBussinessType(Integer id) { public BaseResponse deleteWarehouseBussinessType(Integer id) {
if (null == id) { if (null == id) {
@ -182,7 +182,7 @@ public class WareHouseController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/commit") @PostMapping("/warehouse/inout/commit")
public BaseResponse commitOrder(@RequestBody CommitRequest commitRequest, BindingResult bindingResult) { public BaseResponse commitOrder(@RequestBody CommitRequest commitRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -200,7 +200,7 @@ public class WareHouseController {
* @param bindingResult * @param bindingResult
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/addCommit") @PostMapping("/warehouse/inout/addCommit")
public BaseResponse addCommitOrder(@RequestBody CommitRequest commitRequest, BindingResult bindingResult) { public BaseResponse addCommitOrder(@RequestBody CommitRequest commitRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -219,7 +219,7 @@ public class WareHouseController {
* @param warehouseQueryRequest * @param warehouseQueryRequest
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("spms/inout/dlcode/findByOrderId") @GetMapping("spms/inout/dlcode/findByOrderId")
public BaseResponse downloadCodesByOrderId(WarehouseQueryRequest warehouseQueryRequest) { public BaseResponse downloadCodesByOrderId(WarehouseQueryRequest warehouseQueryRequest) {
IPage<WarehouseEntity> page = warehouseService.filterWarehouseByPage(warehouseQueryRequest); IPage<WarehouseEntity> page = warehouseService.filterWarehouseByPage(warehouseQueryRequest);
@ -234,7 +234,7 @@ public class WareHouseController {
* *
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/replaceCodes") @PostMapping("/warehouse/inout/replaceCodes")
public BaseResponse replaceCodes(@RequestBody CodesReplaceRequest codesReplaceRequest) { public BaseResponse replaceCodes(@RequestBody CodesReplaceRequest codesReplaceRequest) {
if (StrUtil.isBlank(codesReplaceRequest.getCode()) || StrUtil.isBlank(codesReplaceRequest.getOrderId())) { if (StrUtil.isBlank(codesReplaceRequest.getCode()) || StrUtil.isBlank(codesReplaceRequest.getOrderId())) {
@ -261,7 +261,7 @@ public class WareHouseController {
* @param bindingResult * @param bindingResult
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/code/deleteCodes") @PostMapping("/warehouse/inout/code/deleteCodes")
public BaseResponse deleteCodes(@RequestBody DeleteCodeRequest deleteCodeRequest, BindingResult bindingResult) { public BaseResponse deleteCodes(@RequestBody DeleteCodeRequest deleteCodeRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -283,7 +283,7 @@ public class WareHouseController {
* @param bindingResult * @param bindingResult
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/code/updateCodesTime") @PostMapping("/warehouse/inout/code/updateCodesTime")
public BaseResponse updateCodesTime(@RequestBody CodeEditRequest codeEditRequest, BindingResult bindingResult) { public BaseResponse updateCodesTime(@RequestBody CodeEditRequest codeEditRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -300,7 +300,7 @@ public class WareHouseController {
* @param bindingResult * @param bindingResult
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/addOrderWeb") @PostMapping("/warehouse/inout/addOrderWeb")
public BaseResponse addOrderWeb(@RequestBody AddOrderRequest addOrderRequest, BindingResult bindingResult) { public BaseResponse addOrderWeb(@RequestBody AddOrderRequest addOrderRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -571,7 +571,7 @@ public class WareHouseController {
return null; return null;
} }
@AuthRuleAnnotation("")
@PostMapping("warehouse/inout/saveOrderWeb") @PostMapping("warehouse/inout/saveOrderWeb")
public BaseResponse saveOrderWeb(@RequestBody AddOrderRequest addOrderRequest) { public BaseResponse saveOrderWeb(@RequestBody AddOrderRequest addOrderRequest) {
OrderEntity orderEntity = new OrderEntity(); OrderEntity orderEntity = new OrderEntity();

@ -49,7 +49,7 @@ public class InvWarehouseController {
@Resource @Resource
private InvProductService invProductService; private InvProductService invProductService;
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/filter") @GetMapping("spms/inv/warehouse/filter")
public BaseResponse filterInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest) { public BaseResponse filterInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest) {
IPage<InvWarehouseEntity> page = invWarehouseService.filterInvWarehouse(filterInvWarehouseRequest); IPage<InvWarehouseEntity> page = invWarehouseService.filterInvWarehouse(filterInvWarehouseRequest);
@ -59,7 +59,7 @@ public class InvWarehouseController {
return ResultVOUtils.success(restMap); return ResultVOUtils.success(restMap);
} }
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/filterAll") @GetMapping("spms/inv/warehouse/filterAll")
public BaseResponse filterAllInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest) { public BaseResponse filterAllInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest) {
filterInvWarehouseRequest.setPid(0); filterInvWarehouseRequest.setPid(0);
@ -69,7 +69,7 @@ public class InvWarehouseController {
} }
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/filterAllLocInv") @GetMapping("spms/inv/warehouse/filterAllLocInv")
public BaseResponse filterAllLocInv(FilterInvWarehouseRequest filterInvWarehouseRequest) { public BaseResponse filterAllLocInv(FilterInvWarehouseRequest filterInvWarehouseRequest) {
filterInvWarehouseRequest.setPid(0); filterInvWarehouseRequest.setPid(0);
@ -99,7 +99,7 @@ public class InvWarehouseController {
} }
} }
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/filterAllByUser") @GetMapping("spms/inv/warehouse/filterAllByUser")
public BaseResponse filterAllByUser(FilterInvWarehouseRequest filterInvWarehouseRequest) { public BaseResponse filterAllByUser(FilterInvWarehouseRequest filterInvWarehouseRequest) {
List<InvWarehouseEntity> invWarehouseEntities; List<InvWarehouseEntity> invWarehouseEntities;
@ -134,7 +134,7 @@ public class InvWarehouseController {
return invWarehouseResponses; return invWarehouseResponses;
} }
@AuthRuleAnnotation("")
@PostMapping("/spms/inv/warehouse/save") @PostMapping("/spms/inv/warehouse/save")
public BaseResponse save(@RequestBody @Valid InvWarehouseEntity invWarehouseEntity, BindingResult bindingResult) { public BaseResponse save(@RequestBody @Valid InvWarehouseEntity invWarehouseEntity, BindingResult bindingResult) {
@ -184,7 +184,7 @@ public class InvWarehouseController {
return ResultVOUtils.success("添加成功!"); return ResultVOUtils.success("添加成功!");
} }
@AuthRuleAnnotation("")
@PostMapping("/spms/inv/warehouse/edit") @PostMapping("/spms/inv/warehouse/edit")
public BaseResponse edit(@RequestBody @Valid InvWarehouseEntity invWarehouseEntity, BindingResult bindingResult) { public BaseResponse edit(@RequestBody @Valid InvWarehouseEntity invWarehouseEntity, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -206,7 +206,7 @@ public class InvWarehouseController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@AuthRuleAnnotation("")
@PostMapping("/spms/inv/warehouse/delete") @PostMapping("/spms/inv/warehouse/delete")
public BaseResponse delete(@RequestBody DeleteRequest deleteRequest) { public BaseResponse delete(@RequestBody DeleteRequest deleteRequest) {
if (deleteRequest.getId() == null) { if (deleteRequest.getId() == null) {
@ -235,7 +235,7 @@ public class InvWarehouseController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@AuthRuleAnnotation("")
@PostMapping("/spms/inv/warehouse/disable") @PostMapping("/spms/inv/warehouse/disable")
public BaseResponse disable(@RequestBody InvWarehouseEntity request) { public BaseResponse disable(@RequestBody InvWarehouseEntity request) {
if (request.getCode() == null) { if (request.getCode() == null) {
@ -257,7 +257,7 @@ public class InvWarehouseController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@AuthRuleAnnotation("")
@PostMapping("/spms/inv/warehouse/downloadByStatus") @PostMapping("/spms/inv/warehouse/downloadByStatus")
public BaseResponse downloadByStatus(@RequestBody FilterInvWarehouseRequest filterInvWarehouseRequest) { public BaseResponse downloadByStatus(@RequestBody FilterInvWarehouseRequest filterInvWarehouseRequest) {
IPage<InvWarehouseEntity> page = invWarehouseService.filterInvWarehouse(filterInvWarehouseRequest); IPage<InvWarehouseEntity> page = invWarehouseService.filterInvWarehouse(filterInvWarehouseRequest);
@ -273,7 +273,7 @@ public class InvWarehouseController {
* @param thridWarehouseId * @param thridWarehouseId
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/spms/inv/warehouse/bindThrWarehouse") @PostMapping("/spms/inv/warehouse/bindThrWarehouse")
public BaseResponse bindThrWarehouse(Integer id, Integer thridWarehouseId, String sysId) { public BaseResponse bindThrWarehouse(Integer id, Integer thridWarehouseId, String sysId) {
if (null == id || null == thridWarehouseId || StrUtil.isBlank(sysId)) { if (null == id || null == thridWarehouseId || StrUtil.isBlank(sysId)) {
@ -290,7 +290,7 @@ public class InvWarehouseController {
* @param sysId * @param sysId
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/spms/inv/warehouse/unbindThrWarehouse") @PostMapping("/spms/inv/warehouse/unbindThrWarehouse")
public BaseResponse unbindThrWarehouse(Integer id, String sysId) { public BaseResponse unbindThrWarehouse(Integer id, String sysId) {
if (null == id || StrUtil.isBlank(sysId)) { if (null == id || StrUtil.isBlank(sysId)) {

@ -1,5 +1,6 @@
package com.glxp.udi.admin.controller.param; package com.glxp.udi.admin.controller.param;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.annotation.AuthRuleAnnotation; import com.glxp.udi.admin.annotation.AuthRuleAnnotation;
@ -47,7 +48,7 @@ public class SystemPDFModuleController {
@Resource @Resource
private BussinessTypeService bussinessTypeService; private BussinessTypeService bussinessTypeService;
@AuthRuleAnnotation("system/pdf/module/list") @SaCheckPermission("system/pdf/module/list")
@GetMapping("/system/pdf/module/list") @GetMapping("/system/pdf/module/list")
public BaseResponse list(@Valid SystemPDFModuleRequest systemPDFModuleRequest, BindingResult bindingResult) { public BaseResponse list(@Valid SystemPDFModuleRequest systemPDFModuleRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -75,7 +76,7 @@ public class SystemPDFModuleController {
} }
@AuthRuleAnnotation("system/pdf/module/detail") @SaCheckPermission("system/pdf/module/detail")
@GetMapping("/system/pdf/module/detail") @GetMapping("/system/pdf/module/detail")
public BaseResponse moduleDetail(@Valid SystemPDFTemplateRelevanceRequest systemPDFModuleRequest, BindingResult bindingResult) { public BaseResponse moduleDetail(@Valid SystemPDFTemplateRelevanceRequest systemPDFModuleRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -105,14 +106,14 @@ public class SystemPDFModuleController {
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@AuthRuleAnnotation("system/pdf/module/updateRl") @SaCheckPermission("system/pdf/module/updateRl")
@PostMapping("/system/pdf/module/updateRl") @PostMapping("/system/pdf/module/updateRl")
public BaseResponse updateRl(@RequestBody SystemPDFTemplateRelevanceEntity systemPDFModuleSaveRequest) { public BaseResponse updateRl(@RequestBody SystemPDFTemplateRelevanceEntity systemPDFModuleSaveRequest) {
systemPDFTemplateRelevanceService.updateRl(systemPDFModuleSaveRequest); systemPDFTemplateRelevanceService.updateRl(systemPDFModuleSaveRequest);
return ResultVOUtils.success("修改成功"); return ResultVOUtils.success("修改成功");
} }
@AuthRuleAnnotation("system/pdf/module/list") @SaCheckPermission("system/pdf/module/list")
@GetMapping("/system/pdf/module/pdfModules") @GetMapping("/system/pdf/module/pdfModules")
public BaseResponse pdfModules(@RequestParam(value = "page", defaultValue = "1") Integer page, public BaseResponse pdfModules(@RequestParam(value = "page", defaultValue = "1") Integer page,
@RequestParam(value = "limit", defaultValue = "100") Integer limit) { @RequestParam(value = "limit", defaultValue = "100") Integer limit) {
@ -130,7 +131,7 @@ public class SystemPDFModuleController {
} }
@AuthRuleAnnotation("system/pdf/module/save") @SaCheckPermission("system/pdf/module/save")
@PostMapping("/system/pdf/module/save") @PostMapping("/system/pdf/module/save")
public BaseResponse save(@RequestBody @Valid SystemPDFModuleSaveRequest systemPDFModuleSaveRequest, BindingResult bindingResult) { public BaseResponse save(@RequestBody @Valid SystemPDFModuleSaveRequest systemPDFModuleSaveRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -147,7 +148,7 @@ public class SystemPDFModuleController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@AuthRuleAnnotation("system/pdf/module/update") @SaCheckPermission("system/pdf/module/update")
@PostMapping("/system/pdf/module/update") @PostMapping("/system/pdf/module/update")
public BaseResponse update(@RequestBody SystemPDFModuleSaveRequest systemPDFModuleSaveRequest) { public BaseResponse update(@RequestBody SystemPDFModuleSaveRequest systemPDFModuleSaveRequest) {
systemPDFModuleSaveRequest.setUpdate_time(new Date()); systemPDFModuleSaveRequest.setUpdate_time(new Date());
@ -155,7 +156,7 @@ public class SystemPDFModuleController {
return ResultVOUtils.success("修改成功"); return ResultVOUtils.success("修改成功");
} }
@AuthRuleAnnotation("system/pdf/module/delete") @SaCheckPermission("system/pdf/module/delete")
@GetMapping("/system/pdf/module/delete") @GetMapping("/system/pdf/module/delete")
public BaseResponse deleteById(@RequestParam("id") Integer id) { public BaseResponse deleteById(@RequestParam("id") Integer id) {
systemPDFModuleService.deleteById(id); systemPDFModuleService.deleteById(id);

@ -1,5 +1,6 @@
package com.glxp.udi.admin.controller.param; package com.glxp.udi.admin.controller.param;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@ -41,7 +42,7 @@ public class SystemPDFTemplateController {
@Resource @Resource
private BussinessTypeService bussinessTypeService; private BussinessTypeService bussinessTypeService;
@AuthRuleAnnotation("system/pdf/template/list") @SaCheckPermission("system/pdf/template/list")
@GetMapping("/system/pdf/template/list") @GetMapping("/system/pdf/template/list")
public BaseResponse list(@Valid SystemPDFTemplateRequest systemPDFTemplateRequest, BindingResult bindingResult) { public BaseResponse list(@Valid SystemPDFTemplateRequest systemPDFTemplateRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -85,7 +86,7 @@ public class SystemPDFTemplateController {
} }
@AuthRuleAnnotation("system/pdf/template/save") @SaCheckPermission("system/pdf/template/save")
@PostMapping("/system/pdf/template/save") @PostMapping("/system/pdf/template/save")
public BaseResponse save(@RequestBody @Valid SystemPDFTemplateSaveRequest systemPDFTemplateSaveRequest, BindingResult bindingResult) { public BaseResponse save(@RequestBody @Valid SystemPDFTemplateSaveRequest systemPDFTemplateSaveRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -110,7 +111,7 @@ public class SystemPDFTemplateController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@AuthRuleAnnotation("system/pdf/template/update") @SaCheckPermission("system/pdf/template/update")
@PostMapping("/system/pdf/template/update") @PostMapping("/system/pdf/template/update")
public BaseResponse update(@RequestBody SystemPDFTemplateSaveRequest systemPDFTemplateSaveRequest) { public BaseResponse update(@RequestBody SystemPDFTemplateSaveRequest systemPDFTemplateSaveRequest) {
systemPDFTemplateSaveRequest.setUpdate_time(new Date()); systemPDFTemplateSaveRequest.setUpdate_time(new Date());
@ -118,7 +119,7 @@ public class SystemPDFTemplateController {
return ResultVOUtils.success("修改成功"); return ResultVOUtils.success("修改成功");
} }
@AuthRuleAnnotation("system/pdf/template/delete") @SaCheckPermission("system/pdf/template/delete")
@GetMapping("/system/pdf/template/delete") @GetMapping("/system/pdf/template/delete")
public BaseResponse deleteById(@RequestParam("id") Integer id, public BaseResponse deleteById(@RequestParam("id") Integer id,
@RequestParam("path") String path) { @RequestParam("path") String path) {
@ -135,7 +136,7 @@ public class SystemPDFTemplateController {
} }
} }
@AuthRuleAnnotation("")
@PostMapping("/system/pdf/template/demoPrint") @PostMapping("/system/pdf/template/demoPrint")
public void demoPrint( public void demoPrint(
@RequestBody SystemPDFTemplateRequest systemPDFTemplateRequest, @RequestBody SystemPDFTemplateRequest systemPDFTemplateRequest,

@ -1,5 +1,6 @@
package com.glxp.udi.admin.controller.param; package com.glxp.udi.admin.controller.param;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -44,7 +45,7 @@ public class SystemParamConfigController {
@Resource @Resource
private CustomerService customerService; private CustomerService customerService;
@AuthRuleAnnotation("system/param/config/list") @SaCheckPermission("system/param/config/list")
@GetMapping("/system/param/config/list") @GetMapping("/system/param/config/list")
public BaseResponse list(@Valid SystemParamConfigRequest systemParamConfigRequest, BindingResult bindingResult) { public BaseResponse list(@Valid SystemParamConfigRequest systemParamConfigRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -69,7 +70,7 @@ public class SystemParamConfigController {
return ResultVOUtils.success(pageSimpleResponse); return ResultVOUtils.success(pageSimpleResponse);
} }
@AuthRuleAnnotation("system/param/config/save") @SaCheckPermission("system/param/config/save")
@PostMapping("/system/param/config/save") @PostMapping("/system/param/config/save")
public BaseResponse save(@RequestBody @Valid SystemParamConfigSaveRequest systemParamConfigSaveRequest, BindingResult bindingResult) { public BaseResponse save(@RequestBody @Valid SystemParamConfigSaveRequest systemParamConfigSaveRequest, BindingResult bindingResult) {
@ -87,7 +88,7 @@ public class SystemParamConfigController {
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@AuthRuleAnnotation("system/param/config/update") @SaCheckPermission("system/param/config/update")
@PostMapping("/system/param/config/update") @PostMapping("/system/param/config/update")
public BaseResponse update(@RequestBody SystemParamConfigSaveRequest systemParamConfigSaveRequest) { public BaseResponse update(@RequestBody SystemParamConfigSaveRequest systemParamConfigSaveRequest) {
if (null == systemParamConfigSaveRequest || StrUtil.isBlank(systemParamConfigSaveRequest.getParamValue())) { if (null == systemParamConfigSaveRequest || StrUtil.isBlank(systemParamConfigSaveRequest.getParamValue())) {
@ -100,7 +101,7 @@ public class SystemParamConfigController {
//key搜索 //key搜索
@AuthRuleAnnotation("")
@GetMapping("/udiwms/sys/config/selectByKey") @GetMapping("/udiwms/sys/config/selectByKey")
public BaseResponse selectByKey(SystemParamConfigRequest systemParamConfigRequest, BindingResult bindingResult) { public BaseResponse selectByKey(SystemParamConfigRequest systemParamConfigRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -116,7 +117,7 @@ public class SystemParamConfigController {
* *
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("/udiwms/sys/config/getCustomizeParams") @GetMapping("/udiwms/sys/config/getCustomizeParams")
public BaseResponse getCustomizeParams(String customerId) { public BaseResponse getCustomizeParams(String customerId) {
List<SystemParamConfigEntity> list = systemParamConfigService.selectCustomizeParam(SystemParamConstant.SYSTEM_PARAMS, customerId); List<SystemParamConfigEntity> list = systemParamConfigService.selectCustomizeParam(SystemParamConstant.SYSTEM_PARAMS, customerId);
@ -130,7 +131,7 @@ public class SystemParamConfigController {
* @param bindingResult * @param bindingResult
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/udiwms/sys/config/addCustomizeParam") @PostMapping("/udiwms/sys/config/addCustomizeParam")
public BaseResponse addCustomizeParam(@RequestBody SystemParamConfigCustomerEntity configCustomerEntity, BindingResult bindingResult) { public BaseResponse addCustomizeParam(@RequestBody SystemParamConfigCustomerEntity configCustomerEntity, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -145,7 +146,7 @@ public class SystemParamConfigController {
* *
* @return * @return
*/ */
@AuthRuleAnnotation("")
@GetMapping("/udiwms/sys/config/deleteParam") @GetMapping("/udiwms/sys/config/deleteParam")
public BaseResponse deleteParam(Integer id) { public BaseResponse deleteParam(Integer id) {
if (null == id) { if (null == id) {

@ -51,7 +51,7 @@ public class StackOrderController {
@Resource @Resource
private CustomerService customerService; private CustomerService customerService;
@AuthRuleAnnotation("")
@GetMapping("/udims/stack/order/filter") @GetMapping("/udims/stack/order/filter")
public BaseResponse filterOrder(StackOrderFilterRequest stackOrderFilterRequest, BindingResult bindingResult) { public BaseResponse filterOrder(StackOrderFilterRequest stackOrderFilterRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -77,7 +77,7 @@ public class StackOrderController {
} }
@AuthRuleAnnotation("")
@PostMapping("/udims/stack/order/update") @PostMapping("/udims/stack/order/update")
public BaseResponse updateStack(@RequestBody StackUploadRequest stackUploadRequest, BindingResult bindingResult) { public BaseResponse updateStack(@RequestBody StackUploadRequest stackUploadRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -88,7 +88,7 @@ public class StackOrderController {
} }
@AuthRuleAnnotation("")
@PostMapping("/udims/stack/order/delete") @PostMapping("/udims/stack/order/delete")
public BaseResponse deleteStack(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) { public BaseResponse deleteStack(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -105,7 +105,7 @@ public class StackOrderController {
* @param bindingResult * @param bindingResult
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/udims/stack/order/uploadStackOrder") @PostMapping("/udims/stack/order/uploadStackOrder")
public BaseResponse uploadStackOrder(@RequestBody StackUploadRequest stackUploadRequest, BindingResult bindingResult) { public BaseResponse uploadStackOrder(@RequestBody StackUploadRequest stackUploadRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -138,7 +138,7 @@ public class StackOrderController {
* @param bindingResult * @param bindingResult
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/udims/stack/order/upload") @PostMapping("/udims/stack/order/upload")
public BaseResponse uploadStack(@RequestBody StackUploadRequest stackUploadRequest, BindingResult bindingResult) { public BaseResponse uploadStack(@RequestBody StackUploadRequest stackUploadRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -216,7 +216,7 @@ public class StackOrderController {
* @param bindingResult * @param bindingResult
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/udims/stack/order/importStackOrder") @PostMapping("/udims/stack/order/importStackOrder")
public BaseResponse importStackOrder(@RequestBody ImportStackOrderRequest importStackOrderRequest, BindingResult bindingResult) { public BaseResponse importStackOrder(@RequestBody ImportStackOrderRequest importStackOrderRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {

@ -45,7 +45,7 @@ public class SysUserController {
* @param id * @param id
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/sys/user/detail") @PostMapping("/sys/user/detail")
public BaseResponse detail(Integer id) { public BaseResponse detail(Integer id) {
return sysUserService.getDetail(id); return sysUserService.getDetail(id);
@ -57,7 +57,7 @@ public class SysUserController {
* @param sysUserModel * @param sysUserModel
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/sys/user/insert") @PostMapping("/sys/user/insert")
public BaseResponse insert(@RequestBody SysUserModel sysUserModel) { public BaseResponse insert(@RequestBody SysUserModel sysUserModel) {
return sysUserService.insert(sysUserModel); return sysUserService.insert(sysUserModel);
@ -69,7 +69,7 @@ public class SysUserController {
* @param sysUserModel * @param sysUserModel
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/sys/user/update") @PostMapping("/sys/user/update")
public BaseResponse update(@RequestBody SysUserModel sysUserModel) { public BaseResponse update(@RequestBody SysUserModel sysUserModel) {
return sysUserService.update(sysUserModel); return sysUserService.update(sysUserModel);
@ -81,7 +81,7 @@ public class SysUserController {
* @param id * @param id
* @return * @return
*/ */
@AuthRuleAnnotation("")
@PostMapping("/sys/user/delete") @PostMapping("/sys/user/delete")
public BaseResponse delete(Integer id) { public BaseResponse delete(Integer id) {
return sysUserService.delete(id); return sysUserService.delete(id);

@ -7,39 +7,39 @@ import lombok.Data;
@TableName("customer_set") @TableName("customer_set")
public class SetupEntity { public class SetupEntity {
private Integer id; // private Integer id;
//
private boolean erpSaleOutModify; // private boolean erpSaleOutModify;
//
private boolean erpGetSaleOut; // private boolean erpGetSaleOut;
//
private boolean erpSaleOutSign; // private boolean erpSaleOutSign;
//
private boolean filterSaleOutSign; // private boolean filterSaleOutSign;
//
private int erpGetSaleOutDay; // private int erpGetSaleOutDay;
//
private boolean erpPruchaseModify; // private boolean erpPruchaseModify;
//
private boolean erpGetPurchaseIn; // private boolean erpGetPurchaseIn;
//
private boolean erpPruchaseSign; // private boolean erpPruchaseSign;
//
private int erpGetPurchaseDay; // private int erpGetPurchaseDay;
//
private boolean filterPurchaseSign; // private boolean filterPurchaseSign;
//
private String remark; // private String remark;
//
private boolean forbidSameErp; // private boolean forbidSameErp;
//
// private boolean updateErpData;
// private boolean salesWareHouseOut;
private boolean returnWareHouseOut; private boolean returnWareHouseOut;
private boolean salesWareHouseOut;
private boolean returnWareHouseIn; private boolean returnWareHouseIn;
private boolean updateErpData;
private String customerId; private String customerId;

@ -1,6 +1,10 @@
package com.glxp.udi.admin.handler; package com.glxp.udi.admin.handler;
import cn.dev33.satoken.exception.NotLoginException;
import cn.dev33.satoken.exception.NotPermissionException;
import cn.dev33.satoken.exception.SaTokenException;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.glxp.udi.admin.common.enums.ResultEnum; import com.glxp.udi.admin.common.enums.ResultEnum;
import com.glxp.udi.admin.common.util.ResultVOUtils; import com.glxp.udi.admin.common.util.ResultVOUtils;
import com.glxp.udi.admin.exception.JsonException; import com.glxp.udi.admin.exception.JsonException;
@ -31,4 +35,18 @@ public class GlobalExceptionHandler {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK, errorMsg); return ResultVOUtils.error(ResultEnum.NOT_NETWORK, errorMsg);
} }
// 拦截API异常
@ExceptionHandler(value = SaTokenException.class)
public com.glxp.udi.admin.common.res.BaseResponse handlerSaTokenException(SaTokenException e) {
log.error(e.getMessage(), e);
if (e instanceof NotPermissionException) {
return ResultVOUtils.error(ResultEnum.AUTH_FAILED.getCode(), "没有权限");
} else if (e instanceof NotLoginException) {
return ResultVOUtils.error(ResultEnum.LOGIN_VERIFY_FALL);
}
String errorMsg = StrUtil.isBlank(e.getMessage()) ? ResultEnum.NOT_NETWORK.getMessage() : e.getMessage();
// 返回对应的错误信息
return ResultVOUtils.error(ResultEnum.NOT_NETWORK, errorMsg);
}
} }

@ -39,6 +39,7 @@ public class AuthLoginService {
List<String> authRules = new ArrayList<>(); List<String> authRules = new ArrayList<>();
// 超级管理员 // 超级管理员
if (adminId.equals(1L)) { if (adminId.equals(1L)) {
authRules.add("admin/**");
authRules.add("admin"); authRules.add("admin");
return authRules; return authRules;
} }

@ -19,16 +19,10 @@ spring:
min-idle: 0 min-idle: 0
logging: logging:
level: level:
org.springframework.data.mongodb.core.MongoTemplate: debug
com.glxp.udi.admin.dao: debug com.glxp.udi.admin.dao: debug
#mips服务地址
UDIC_MIPSDOWNLOAD_URL: http://127.0.0.1:8080/UDIC_MIPSDL_Server
UCLOD_SERVER_URL: http://127.0.0.1:9997
UDI_SERVER_URL: https://www.udims.com/UDI_DL_Server_test UDI_SERVER_URL: https://www.udims.com/UDI_DL_Server_test
COOR_UPLOAD_ORDER: http://127.0.0.1:9987/udi/upload
#同步库接口调用地址相关信息 https://www.udims.com/UDI_DL_Server_test
UDI_SERVER: UDI_SERVER:
url: https://www.udims.com/UDI_DL_Server_test url: https://www.udims.com/UDI_DL_Server_test
connectTimeout: 2000 connectTimeout: 2000
@ -38,5 +32,4 @@ UDI_SERVER:
file_path: D:/1s/udims file_path: D:/1s/udims
# UDI数据下载
UDI_KEY: 6b137c66-6286-46c6-8efa-c2f5dd9237df UDI_KEY: 6b137c66-6286-46c6-8efa-c2f5dd9237df

@ -17,12 +17,10 @@ mybatis-plus:
type-aliases-package: com.glxp.udi.admin.entity type-aliases-package: com.glxp.udi.admin.entity
check-config-location: false check-config-location: false
configuration: configuration:
#不使用驼峰命名
map-underscore-to-camel-case: false map-underscore-to-camel-case: false
auto-mapping-unknown-column-behavior: none auto-mapping-unknown-column-behavior: none
auto-mapping-behavior: partial auto-mapping-behavior: partial
log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
#是否可以使用列别名
use-column-label: true use-column-label: true
global-config: global-config:
banner: true banner: true

Loading…
Cancel
Save