fix:登录调整

This commit is contained in:
苏竹红
2025-02-19 16:02:35 +08:00
parent 82fa96b5af
commit 5e00fac82a
2 changed files with 3 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ public class CommonConstants {
public static final String WX_APP_SECRET_KEY = "wx_app_secret_key:{0}";
public static final String MINI_PROGRAM_SESSION_KEY = "mini_program_session_key:{0}:{1}";
public static final String MINI_PROGRAM_LOGIN_FLAG = "mini_program_login_flag:{0}";
public static final String ZXJP_MINI_PROGRAM_LOGIN_FLAG = "mini_program_login_flag:{0}";
public static final String ROOT_DEPT_ID_STR = "1";

View File

@@ -117,7 +117,7 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
BeanUtil.copyProperties(hyPartnerUserInfoDO, userInfoVO);
fillLineInfo(userInfoVO, hyPartnerUserInfoDO.getPartnerId());
//将数据存储到redis中
String key = MessageFormat.format(CommonConstants.MINI_PROGRAM_LOGIN_FLAG, openid);
String key = MessageFormat.format(CommonConstants.ZXJP_MINI_PROGRAM_LOGIN_FLAG, openid);
redisUtilPool.setString(key,JSONObject.toJSONString(userInfoVO),CommonConstants.SEVEN_DAY_SECONDS);
return userInfoVO;
}
@@ -132,7 +132,7 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
}
CodeSessionDTO codeSession = wechatRest.miniProgramJsCodeSession(wxAppId, wxAppSecret, jsCode);
String openid = codeSession.getOpenid();
String key = MessageFormat.format(CommonConstants.MINI_PROGRAM_LOGIN_FLAG, openid);
String key = MessageFormat.format(CommonConstants.ZXJP_MINI_PROGRAM_LOGIN_FLAG, openid);
String value = redisUtilPool.getString(key);
if (StringUtils.isNotEmpty(value)){
//设置有效期