fix(controller): 改用StpUtil获取当前登录用户ID
This commit is contained in:
@@ -253,8 +253,8 @@ public class UserController {
|
|||||||
|
|
||||||
// 签到
|
// 签到
|
||||||
@PostMapping("signIn")
|
@PostMapping("signIn")
|
||||||
public ResponseData<Object> signIn(@RequestBody Map<String,Integer> map) {
|
public ResponseData<Object> signIn() {
|
||||||
Integer userId = map.get("userId");
|
int userId = Integer.parseInt(StpUtil.getLoginId().toString());
|
||||||
int i = userDao.checkSignStatus(userId);
|
int i = userDao.checkSignStatus(userId);
|
||||||
if (i != 0) {
|
if (i != 0) {
|
||||||
throw new BusinessException(ErrorCode.SIGN_IN_FAIL);
|
throw new BusinessException(ErrorCode.SIGN_IN_FAIL);
|
||||||
|
|||||||
Reference in New Issue
Block a user