fix(controller): 改用StpUtil获取当前登录用户ID

This commit is contained in:
2026-02-08 18:51:01 +08:00
parent e3ce60f69a
commit b6e022ca75

View File

@@ -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);