fix: 修复Tool模块相关问题 - 优化签到、社区、食物和AI服务功能
This commit is contained in:
@@ -474,7 +474,9 @@ public class ToolController {
|
||||
@ApiOperation(value = "关注/取消关注用户")
|
||||
@PostMapping("/community/follow")
|
||||
public CommonResult<String> toggleFollow(@RequestBody Map<String, Object> data) {
|
||||
toolCommunityService.toggleFollow((Long) data.get("userId"), (Boolean) data.get("isFollow"));
|
||||
Long userId = ((Number) data.get("userId")).longValue();
|
||||
Boolean isFollow = (Boolean) data.get("isFollow");
|
||||
toolCommunityService.toggleFollow(userId, isFollow);
|
||||
return CommonResult.success("操作成功");
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,10 @@ import com.zbkj.common.request.*;
|
||||
import com.zbkj.common.response.*;
|
||||
import com.zbkj.common.result.CommonResult;
|
||||
import com.zbkj.front.service.UserCenterService;
|
||||
import com.zbkj.common.vo.SystemGroupDataSignConfigVo;
|
||||
import com.zbkj.service.service.SystemGroupDataService;
|
||||
import com.zbkj.service.service.UserService;
|
||||
import com.zbkj.service.service.UserSignService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -53,6 +55,9 @@ public class UserController {
|
||||
@Autowired
|
||||
private UserCenterService userCenterService;
|
||||
|
||||
@Autowired
|
||||
private UserSignService userSignService;
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
*/
|
||||
@@ -83,6 +88,24 @@ public class UserController {
|
||||
return CommonResult.success(userService.getUserCenter());
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户信息(含积分,用于打卡等操作后刷新积分)
|
||||
*/
|
||||
@ApiOperation(value = "用户信息-含积分")
|
||||
@RequestMapping(value = "/user/info", method = RequestMethod.GET)
|
||||
public CommonResult<UserCenterResponse> getUserInfo() {
|
||||
return CommonResult.success(userService.getUserCenter());
|
||||
}
|
||||
|
||||
/**
|
||||
* 每日打卡领积分(与 GET /user/sign/integral 相同,供前端 /user/checkin 调用)
|
||||
*/
|
||||
@ApiOperation(value = "每日打卡")
|
||||
@RequestMapping(value = "/user/checkin", method = RequestMethod.GET)
|
||||
public CommonResult<SystemGroupDataSignConfigVo> userDailyCheckin() {
|
||||
return CommonResult.success(userSignService.sign());
|
||||
}
|
||||
|
||||
/**
|
||||
* 换绑手机号校验
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user