|
|
@@ -37,13 +37,13 @@ public class CommunicationController {
|
|
|
|
|
|
@ApiOperation("获得单个交流详情")
|
|
|
@GetMapping("/{communicationId}")
|
|
|
- public OkResponse<CommunicationVO> getCommunicationDetail(@PathVariable(value = "communicationId")Integer communicationId){
|
|
|
+ public OkResponse<CommunicationVO> getCommunicationDetail(@PathVariable(value = "communicationId")Long communicationId){
|
|
|
return OkResponse.of(communicationService.getCommunicationDetail(communicationId));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("分页获取用户发布的交流")
|
|
|
@GetMapping("/users/{userId}")
|
|
|
- public OkResponse<PageVO<CommunicationVO>> getCommunicationPageByUserId(@PathVariable(value = "userId")String userId,
|
|
|
+ public OkResponse<PageVO<CommunicationVO>> getCommunicationPageByUserId(@PathVariable(value = "userId")Long userId,
|
|
|
@RequestParam(value = "page") Integer page,
|
|
|
@RequestParam(value = "size")Integer size){
|
|
|
return OkResponse.of(communicationService.getCommunicationPageByUserId(userId,page,size));
|
|
|
@@ -60,21 +60,21 @@ public class CommunicationController {
|
|
|
|
|
|
@ApiOperation("用户收藏交流")
|
|
|
@PostMapping("/{communicationId}/stars")
|
|
|
- public OkResponse<Boolean> starCommunication(@PathVariable(value = "communicationId")Integer communicationId,
|
|
|
- @RequestParam(value = "userId")Integer userId){
|
|
|
+ public OkResponse<Boolean> starCommunication(@PathVariable(value = "communicationId")Long communicationId,
|
|
|
+ @RequestParam(value = "userId")Long userId){
|
|
|
return OkResponse.of(communicationService.starCommunication(communicationId,userId));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("取消收藏交流")
|
|
|
@DeleteMapping("/{communicationId}/stars")
|
|
|
- public OkResponse<Boolean> cancelStarCommunication(@PathVariable(value = "communicationId")Integer communicationId,
|
|
|
- @RequestParam(value = "userId")Integer userId){
|
|
|
+ public OkResponse<Boolean> cancelStarCommunication(@PathVariable(value = "communicationId")Long communicationId,
|
|
|
+ @RequestParam(value = "userId")Long userId){
|
|
|
return OkResponse.of(communicationService.cancelStarCommunication(communicationId,userId));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("分页查看个人收藏夹")
|
|
|
@GetMapping("/stars/users/{userId}")
|
|
|
- public OkResponse<PageVO<CommunicationVO>> getStarredCommunicationPage(@PathVariable(value = "userId") Integer userId,
|
|
|
+ public OkResponse<PageVO<CommunicationVO>> getStarredCommunicationPage(@PathVariable(value = "userId") Long userId,
|
|
|
@RequestParam(value = "page")Integer page,
|
|
|
@RequestParam(value = "size")Integer size){
|
|
|
return OkResponse.of(communicationService.getStarredCommunicationPage(userId,page,size));
|
|
|
@@ -83,7 +83,7 @@ public class CommunicationController {
|
|
|
|
|
|
@ApiOperation("查看交流的收藏者")
|
|
|
@GetMapping("/{communicationId}/stars/users")
|
|
|
- public OkResponse<List<UserVO>> starredUsers(@PathVariable(value = "communicationId")Integer communicationId){
|
|
|
+ public OkResponse<List<UserVO>> starredUsers(@PathVariable(value = "communicationId")Long communicationId){
|
|
|
return OkResponse.of(communicationService.starredUsers(communicationId));
|
|
|
}
|
|
|
}
|