|
@@ -9,7 +9,6 @@ import com.sckw.auth.model.vo.res.EntInfoResVo;
|
|
|
import com.sckw.auth.model.vo.res.LoginResVo;
|
|
import com.sckw.auth.model.vo.res.LoginResVo;
|
|
|
import com.sckw.auth.util.AsyncFactory;
|
|
import com.sckw.auth.util.AsyncFactory;
|
|
|
import com.sckw.core.utils.StringUtils;
|
|
import com.sckw.core.utils.StringUtils;
|
|
|
-import com.sckw.core.web.context.LoginUserHolder;
|
|
|
|
|
import com.sckw.system.api.model.dto.req.ForgetPasswordReqDto;
|
|
import com.sckw.system.api.model.dto.req.ForgetPasswordReqDto;
|
|
|
import com.sckw.system.api.model.dto.req.UserLoginReqDto;
|
|
import com.sckw.system.api.model.dto.req.UserLoginReqDto;
|
|
|
import com.sckw.system.api.model.dto.res.KwsRoleResDto;
|
|
import com.sckw.system.api.model.dto.res.KwsRoleResDto;
|
|
@@ -116,10 +115,10 @@ public class AuthServiceImpl implements IAuthService {
|
|
|
*/
|
|
*/
|
|
|
private void afterProcessor(LoginResVo loginResVo) {
|
|
private void afterProcessor(LoginResVo loginResVo) {
|
|
|
try {
|
|
try {
|
|
|
- String id = String.valueOf(loginResVo.getId());
|
|
|
|
|
- String token = EncryUtil.encry(Global.PRI_KEY, id);
|
|
|
|
|
|
|
+ Long id = loginResVo.getId();
|
|
|
|
|
+ String token = EncryUtil.encry(Global.PRI_KEY, String.valueOf(id));
|
|
|
loginResVo.setToken(token);
|
|
loginResVo.setToken(token);
|
|
|
- RedissonUtils.putString(Global.REDIS_USER_PREFIX + id + Global.COLON + loginResVo.getClientType(), JSON.toJSONString(loginResVo), Global.PC_TOKEN_EXPIRE);
|
|
|
|
|
|
|
+ RedissonUtils.putString(Global.getFullUserLoginKey(loginResVo.getSystemType(), loginResVo.getId(), loginResVo.getClientType()), JSON.toJSONString(loginResVo), Global.PC_TOKEN_EXPIRE);
|
|
|
|
|
|
|
|
//异步存redis
|
|
//异步存redis
|
|
|
AsyncFactory.execute(new SaveMenuInfo(loginResVo.getId()));
|
|
AsyncFactory.execute(new SaveMenuInfo(loginResVo.getId()));
|