| | |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.entity.message.MessageColumnSet; |
| | | import com.ycl.service.message.IMessageColumnSetService; |
| | | import com.ycl.vo.message.MessageColumnSetVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | @ApiOperation("获取指定栏目") |
| | | @RequestMapping(value = "/getColumnSet/{id}", method = RequestMethod.GET) |
| | | @ResponseBody |
| | | public CommonResult<MessageColumnSet> getMessage(@PathVariable Long id) { |
| | | public CommonResult<MessageColumnSet> getColumnSet(@PathVariable Long id) { |
| | | MessageColumnSet columnSet = iMessageColumnSetService.getById(id); |
| | | return CommonResult.success(columnSet); |
| | | } |
| | | @ApiOperation("获取用户栏目设置") |
| | | @RequestMapping(value = "/getUserColumnSet/{userId}", method = RequestMethod.GET) |
| | | @RequestMapping(value = "/getUserColumnSet", method = RequestMethod.GET) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "userId", value = "用户Id",required = true, dataType = "Long") |
| | | }) |
| | | @ResponseBody |
| | | public CommonResult<List<MessageColumnSet>> getUserColumnSet(@PathVariable Long userId) { |
| | | QueryWrapper<MessageColumnSet> setQueryWrapper = new QueryWrapper<>(); |
| | | setQueryWrapper.eq("user_id", userId); |
| | | List<MessageColumnSet> sets = iMessageColumnSetService.list(setQueryWrapper); |
| | | public CommonResult<List<MessageColumnSetVO>> getUserColumnSet(@RequestParam Long userId) { |
| | | List<MessageColumnSetVO> sets = iMessageColumnSetService.listColumnAndPage(userId); |
| | | return CommonResult.success(sets); |
| | | } |
| | | |