OA板块整合与实现

This commit is contained in:
lijiaqi 2023-02-23 13:36:55 +08:00
parent 172e3520e0
commit e770567b9b
4 changed files with 8 additions and 8 deletions

View File

@ -75,19 +75,19 @@ public class BaseControllerAdvice {
// 判断场景值定制化异常信息 // 判断场景值定制化异常信息
String message = ""; String message = "";
if(nle.getType().equals(NotLoginException.NOT_TOKEN)) { if(nle.getType().equals(NotLoginException.NOT_TOKEN)) {
message = "提供token"; message = "登录,请登录";
} }
else if(nle.getType().equals(NotLoginException.INVALID_TOKEN)) { else if(nle.getType().equals(NotLoginException.INVALID_TOKEN)) {
message = "token无效"; message = "登录无效,请重新登录";
} }
else if(nle.getType().equals(NotLoginException.TOKEN_TIMEOUT)) { else if(nle.getType().equals(NotLoginException.TOKEN_TIMEOUT)) {
message = "token已过期"; message = "登录已过期,请重新登录";
} }
else if(nle.getType().equals(NotLoginException.BE_REPLACED)) { else if(nle.getType().equals(NotLoginException.BE_REPLACED)) {
message = "token已被顶下线"; message = "登录已被顶下线,请重新登录";
} }
else if(nle.getType().equals(NotLoginException.KICK_OUT)) { else if(nle.getType().equals(NotLoginException.KICK_OUT)) {
message = "token已被踢下线"; message = "登录已被踢下线,请重新登录";
} }
else { else {
message = "当前会话未登录"; message = "当前会话未登录";

View File

@ -42,7 +42,7 @@ public class FlowStepService extends BaseService<FlowStepMapper, FlowStep> {
LambdaQueryWrapper<FlowStep> qw = new LambdaQueryWrapper<>(FlowStep.class).orderByDesc(FlowStep::getCreatedAt); LambdaQueryWrapper<FlowStep> qw = new LambdaQueryWrapper<>(FlowStep.class).orderByDesc(FlowStep::getCreatedAt);
if(isDone) qw.ne(FlowStep::getStatus, FlowConstant.FLOW_STATUS_DONE); if(isDone) qw.ne(FlowStep::getStatus, FlowConstant.FLOW_STATUS_DONE);
else qw.eq(FlowStep::getStatus, FlowConstant.STEP_STATUS_ACTIVE); else qw.eq(FlowStep::getStatus, FlowConstant.STEP_STATUS_ACTIVE);
qw.apply("FIND_IN_SET (" + currentUser.getId() + ", user_ids)"); qw.apply("FIND_IN_SET ('" + currentUser.getId() + "', user_ids)");
PageResult<FlowStep> pageResult = PageResultFactory.createPageResult(page(PageFactory.defaultPage(),qw)); PageResult<FlowStep> pageResult = PageResultFactory.createPageResult(page(PageFactory.defaultPage(),qw));
return pageResult; return pageResult;
} }

View File

@ -15,7 +15,7 @@ import java.util.List;
@RestController @RestController
@RequestMapping(value = GrapeConst.API + "/tree") @RequestMapping(value = GrapeConst.API + "/tree")
@Api(tags = "部门/用户", value = "部门/用户") @Api(tags = "部门用户", value = "部门用户")
public class TreeController { public class TreeController {

View File

@ -68,7 +68,7 @@ public class AuthServiceImpl extends BaseService<UserMapper, User> implements IA
//与数据库的密码进行匹配 //与数据库的密码进行匹配
if (!loginPassword.equals(loginUser.getPassword())) return AjaxResult.fail("账号或者密码错误"); if (!loginPassword.equals(loginUser.getPassword())) return AjaxResult.fail("账号或者密码错误");
//判断账号是否停用 //判断账号是否停用
if (loginUser.getStatus()) return AjaxResult.fail("当前账号已被停用,请联系管理员"); if (!loginUser.getStatus()) return AjaxResult.fail("当前账号已被停用,请联系管理员");
//判断账号角色 //判断账号角色
if (StrUtil.isBlank(loginUser.getRoles())) return AjaxResult.fail("该用户没有对应的角色,无法登陆系统"); if (StrUtil.isBlank(loginUser.getRoles())) return AjaxResult.fail("该用户没有对应的角色,无法登陆系统");