chore: update pom.xml Lombok config and deploy settings
- Update Maven compiler plugin to support Lombok annotation processing - Add deploy.conf for automated deployment - Update backend models and controllers - Update frontend pages and API
This commit is contained in:
@@ -358,7 +358,15 @@ public class ToolController {
|
||||
@ApiOperation(value = "点赞/取消点赞")
|
||||
@PostMapping("/community/like")
|
||||
public CommonResult<String> toggleLike(@RequestBody Map<String, Object> data) {
|
||||
toolCommunityService.toggleLike((Long) data.get("postId"), (Boolean) data.get("isLike"));
|
||||
Object postIdObj = data.get("postId");
|
||||
Long postId = postIdObj instanceof Number
|
||||
? ((Number) postIdObj).longValue()
|
||||
: (postIdObj != null ? Long.parseLong(postIdObj.toString()) : null);
|
||||
Object isLikeObj = data.get("isLike");
|
||||
Boolean isLike = isLikeObj instanceof Boolean
|
||||
? (Boolean) isLikeObj
|
||||
: (isLikeObj != null && Boolean.parseBoolean(isLikeObj.toString()));
|
||||
toolCommunityService.toggleLike(postId, isLike);
|
||||
return CommonResult.success("操作成功");
|
||||
}
|
||||
|
||||
@@ -368,7 +376,15 @@ public class ToolController {
|
||||
@ApiOperation(value = "收藏/取消收藏")
|
||||
@PostMapping("/community/collect")
|
||||
public CommonResult<String> toggleCollect(@RequestBody Map<String, Object> data) {
|
||||
toolCommunityService.toggleCollect((Long) data.get("postId"), (Boolean) data.get("isCollect"));
|
||||
Object postIdObj = data.get("postId");
|
||||
Long postId = postIdObj instanceof Number
|
||||
? ((Number) postIdObj).longValue()
|
||||
: (postIdObj != null ? Long.parseLong(postIdObj.toString()) : null);
|
||||
Object isCollectObj = data.get("isCollect");
|
||||
Boolean isCollect = isCollectObj instanceof Boolean
|
||||
? (Boolean) isCollectObj
|
||||
: (isCollectObj != null && Boolean.parseBoolean(isCollectObj.toString()));
|
||||
toolCommunityService.toggleCollect(postId, isCollect);
|
||||
return CommonResult.success("操作成功");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user