From 981634fa893b787f2991d99ebf60276eee8d28c7 Mon Sep 17 00:00:00 2001 From: liyj <1003249715@qq.com> Date: Sat, 24 Aug 2024 19:01:44 +0800 Subject: [PATCH] 1、新增disp、mediate、sys服务 2、集成工作流流程设计器 --- dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtAccountService.java | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtAccountService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtAccountService.java index 86a6a72..556fef0 100644 --- a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtAccountService.java +++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtAccountService.java @@ -21,14 +21,12 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.PageRequest; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.DigestUtils; -import javax.annotation.PostConstruct; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; @@ -153,9 +151,23 @@ * @param accType 账号类型 * @return */ - public CtAccount getByAccAndType(String acc, String accType){ + public CtAccount getByAccAndType(String acc, int accType){ QueryWrapper<CtAccount> accountWrapper = new QueryWrapper<>(); accountWrapper.eq("acc", acc) + .eq("acc_type", accType); + CtAccount ctAccount = this.getOne(accountWrapper); + return ctAccount; + } + + /** + * 根据用户编号和类型查询 + * @param userId 用户编号 + * @param accType 账号类型 + * @return + */ + public CtAccount getByUserIdAndType(String userId, int accType){ + QueryWrapper<CtAccount> accountWrapper = new QueryWrapper<>(); + accountWrapper.eq("user_id", userId) .eq("acc_type", accType); CtAccount ctAccount = this.getOne(accountWrapper); return ctAccount; @@ -214,11 +226,11 @@ if (checkCredential(ctAccountLoginDTO.getCipher(), ctAccount)) { //返回结果 UserLoginDTO userLoginDTO = new UserLoginDTO(); - CtUser ctUser = ctUserService.getByIdFromRedis(ctAccount.getUserId()); + CtUser ctUser = ctUserService.getById(ctAccount.getUserId()); if (ObjectUtils.isEmpty(ctUser)){ return ReturnFailUtils.getRepInfo("账号或密码错误,请确认后重试!"); } - if (UserBaseConsts.USER_STATUS_2.equals(ctUser.getStatus()) || UserBaseConsts.USER_STATUS_3.equals(ctUser.getStatus())){ + if (ctUser.getStatus() != UserBaseConsts.USER_STATUS_1){ return ReturnFailUtils.getRepInfo("账号或密码错误,请确认后重试!"); } // 封装用户信息 -- Gitblit v1.8.0