|
|
@ -8,6 +8,7 @@ import com.elink.esua.epdc.common.token.util.TokenUtil; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.enums.YesOrNoEnum; |
|
|
|
import com.elink.esua.epdc.commons.tools.exception.RenException; |
|
|
|
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.*; |
|
|
|
import com.elink.esua.epdc.dto.CompleteDeptDTO; |
|
|
|
import com.elink.esua.epdc.dto.UserDTO; |
|
|
@ -77,6 +78,9 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
@Autowired |
|
|
|
private JwtTokenUtils jwtTokenUtils; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private RedisUtils redisUtils; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<EpdcAppAuthorizationDTO> getMpToken(EpdcAppUserTokenFormDTO formDto) { |
|
|
@ -168,6 +172,8 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
TokenDto tokenDto = ConvertUtils.sourceToTarget(userDto, TokenDto.class); |
|
|
|
tokenDto.setUserId(userId); |
|
|
|
cpUserDetailRedis.set(tokenDto, expire); |
|
|
|
// 暂用,部署生产环境时删除
|
|
|
|
redisUtils.set("epdc:sys:security:cpuser:token:" + userId, token); |
|
|
|
|
|
|
|
authorization.setUserState(AppUserStateEnum.REGISTERED.value()); |
|
|
|
authorization.setToken(token); |
|
|
|