zy-asrs-flow/src/pages/system/role/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/security/SecurityExceptionHandler.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/sys/controller/RoleController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/sys/controller/param/PageParam.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
zy-asrs-flow/src/pages/system/role/index.jsx
@@ -8,7 +8,6 @@ import { request } from '@umijs/max'; /** * 删除节点 * @@ -267,12 +266,16 @@ }, data: { ...params } }).then((res) => { if (res.code === 200) { const result = { data: res.rows, total: res.total, success: true, }; return result; } else { message.error(res.msg) } }) } } zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/security/SecurityExceptionHandler.java
New file @@ -0,0 +1,22 @@ package com.zy.asrs.wcs.common.security; import com.zy.asrs.wcs.common.constant.Constants; import com.zy.asrs.wcs.utils.HttpUtils; import org.springframework.security.access.AccessDeniedException; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; import javax.servlet.http.HttpServletResponse; /** * Created by vincent on 2/13/2024 */ @RestControllerAdvice public class SecurityExceptionHandler { @ExceptionHandler(AccessDeniedException.class) public void accessDeniedExceptionHandler(AccessDeniedException e, HttpServletResponse response) { HttpUtils.responseError(response, Constants.UNAUTHORIZED_CODE, Constants.UNAUTHORIZED_MSG, e.getMessage()); } } zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/sys/controller/RoleController.java
@@ -2,14 +2,16 @@ import com.zy.asrs.framework.common.R; import com.zy.asrs.wcs.common.annotation.OperationLog; import com.zy.asrs.wcs.sys.controller.param.PageParam; import com.zy.asrs.wcs.common.domain.BaseParam; import com.zy.asrs.wcs.common.domain.PageParam; import com.zy.asrs.wcs.sys.entity.Role; import com.zy.asrs.wcs.sys.service.RoleService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import java.util.List; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * Created by vincent on 2/13/2024 @@ -24,10 +26,9 @@ @PreAuthorize("hasAuthority('sys:role:list')") @OperationLog @PostMapping("/role/page") public R updateInfo(@RequestBody PageParam param) { System.out.println(param.get("condition")); List<Role> list = roleService.list(); return R.ok().add(list); public R updateInfo(@RequestBody BaseParam param) { PageParam<Role, BaseParam> page = new PageParam<>(param); return R.ok().add(roleService.page(page, page.getWrapper())); } } zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/sys/controller/param/PageParam.java
File was deleted