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