修改了微信小程序登录的功能模块

This commit is contained in:
DESKTOP-G8BCEP0\HP 2021-09-09 15:18:34 +08:00
parent 8d30b05c5e
commit 8166ae8481

View File

@ -79,9 +79,9 @@ public class AppletsUserServiceImpl implements AppletsUserService {
appletsUserDao.updateSessionKey(appletsUser.getId(),sessionKeys);
//设置token
log.info("====="+appletsUser.getId());
String token = JwtUtil.sign(appletsUser.getNickName(), sessionKeys);
//String token = JwtUtil.sign(appletsUser.getNickName(), sessionKeys);
Map map = new HashMap(3);
map.put("token",token);
//map.put("token",token);
map.put("openId",appletsUser.getOpenId());
map.put("session_key",sessionKeys);
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,map,locale);
@ -97,9 +97,9 @@ public class AppletsUserServiceImpl implements AppletsUserService {
log.info("插入用户成功------------>");
System.out.println("拿到userId----------------------->"+appletsUser1.getId());
//设置token
String token = JwtUtil.sign(appletsUser1.getNickName(), appletsUser1.getSessionKey());
//String token = JwtUtil.sign(appletsUser1.getNickName(), appletsUser1.getSessionKey());
Map map = new HashMap(3);
map.put("token",token);
//map.put("token",token);
map.put("openId",appletsUser1.getOpenId());
map.put("session_key",appletsUser1.getSessionKey());
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,map,locale);