|
@@ -3,6 +3,7 @@ package com.fdkankan.tk.service.impl;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.fdkankan.tk.common.ResultCode;
|
|
|
+import com.fdkankan.tk.common.util.JwtUtil;
|
|
|
import com.fdkankan.tk.common.util.RoomUtil;
|
|
|
import com.fdkankan.tk.entity.WxUser;
|
|
|
import com.fdkankan.tk.exception.BusinessException;
|
|
@@ -50,6 +51,8 @@ public class WxUserServiceImpl extends ServiceImpl<IWxUserMapper, WxUser> implem
|
|
|
WxUser wxUser = this.addUser(wxOpenIdVo);
|
|
|
WxUserVo vo = new WxUserVo();
|
|
|
BeanUtils.copyProperties(wxUser,vo);
|
|
|
+ String token = JwtUtil.createJWT(-1, wxUser.getWxUserId(), "wx");
|
|
|
+ vo.setToken(token);
|
|
|
return vo;
|
|
|
}
|
|
|
throw new BusinessException(ResultCode.WX_LOGIN_ERROR);
|