1.微信用户登录添加 token
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package vvpkassistant.User.controller;
|
package vvpkassistant.User.controller;
|
||||||
import cn.dev33.satoken.stp.StpUtil;
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import vvpkassistant.CoinRecords.CoinRecords;
|
import vvpkassistant.CoinRecords.CoinRecords;
|
||||||
@@ -171,9 +172,13 @@ public class UserController {
|
|||||||
userDao.updateById(oldUser);
|
userDao.updateById(oldUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
result.put("info",tempModel);
|
UserModelVO userModelVO = BeanUtil.copyProperties(tempModel, UserModelVO.class);
|
||||||
|
StpUtil.login(userModelVO.getId());
|
||||||
|
userModelVO.setToken(StpUtil.getTokenValue());
|
||||||
|
result.put("info",userModelVO);
|
||||||
result.put("newAccount",true);
|
result.put("newAccount",true);
|
||||||
result.put("chatInfo",wxChatParam);
|
result.put("chatInfo",wxChatParam);
|
||||||
|
|
||||||
return ResponseData.success(result);
|
return ResponseData.success(result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,4 +23,5 @@ public class UserModelVO {
|
|||||||
private String token;
|
private String token;
|
||||||
private Boolean newAccount;
|
private Boolean newAccount;
|
||||||
private WxChatParam chatInfo;
|
private WxChatParam chatInfo;
|
||||||
|
private Integer mailVerification;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user