修改了微信小程序登录的功能模块
This commit is contained in:
parent
8d30b05c5e
commit
8166ae8481
@ -79,9 +79,9 @@ public class AppletsUserServiceImpl implements AppletsUserService {
|
|||||||
appletsUserDao.updateSessionKey(appletsUser.getId(),sessionKeys);
|
appletsUserDao.updateSessionKey(appletsUser.getId(),sessionKeys);
|
||||||
//设置token
|
//设置token
|
||||||
log.info("====="+appletsUser.getId());
|
log.info("====="+appletsUser.getId());
|
||||||
String token = JwtUtil.sign(appletsUser.getNickName(), sessionKeys);
|
//String token = JwtUtil.sign(appletsUser.getNickName(), sessionKeys);
|
||||||
Map map = new HashMap(3);
|
Map map = new HashMap(3);
|
||||||
map.put("token",token);
|
//map.put("token",token);
|
||||||
map.put("openId",appletsUser.getOpenId());
|
map.put("openId",appletsUser.getOpenId());
|
||||||
map.put("session_key",sessionKeys);
|
map.put("session_key",sessionKeys);
|
||||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,map,locale);
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,map,locale);
|
||||||
@ -97,9 +97,9 @@ public class AppletsUserServiceImpl implements AppletsUserService {
|
|||||||
log.info("插入用户成功------------>");
|
log.info("插入用户成功------------>");
|
||||||
System.out.println("拿到userId----------------------->"+appletsUser1.getId());
|
System.out.println("拿到userId----------------------->"+appletsUser1.getId());
|
||||||
//设置token
|
//设置token
|
||||||
String token = JwtUtil.sign(appletsUser1.getNickName(), appletsUser1.getSessionKey());
|
//String token = JwtUtil.sign(appletsUser1.getNickName(), appletsUser1.getSessionKey());
|
||||||
Map map = new HashMap(3);
|
Map map = new HashMap(3);
|
||||||
map.put("token",token);
|
//map.put("token",token);
|
||||||
map.put("openId",appletsUser1.getOpenId());
|
map.put("openId",appletsUser1.getOpenId());
|
||||||
map.put("session_key",appletsUser1.getSessionKey());
|
map.put("session_key",appletsUser1.getSessionKey());
|
||||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,map,locale);
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,map,locale);
|
||||||
|
Loading…
Reference in New Issue
Block a user