| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.SpringUtil; |
| | | import org.springblade.modules.discuss.entity.PublicDiscussEntity; |
| | | import org.springblade.modules.discuss.entity.TopicsEntity; |
| | | import org.springblade.modules.discuss.entity.UserTopicsEntity; |
| | | import org.springblade.modules.discuss.service.IPublicDiscussService; |
| | | import org.springblade.modules.discuss.service.IUserTopicsService; |
| | | import org.springblade.modules.discuss.vo.TopicsVO; |
| | | import org.springblade.modules.discuss.vo.UserTopicsVO; |
| | | import org.springblade.modules.discuss.wrapper.UserTopicsWrapper; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(userTopicsService.removeByIds(Func.toLongList(ids))); |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam Integer ids) { |
| | | UserTopicsEntity userTopicsEntity = new UserTopicsEntity(); |
| | | userTopicsEntity.setDeleteFlag(1); |
| | | userTopicsEntity.setId(ids); |
| | | return R.status(userTopicsService.updateById(userTopicsEntity)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping("/updateBath") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "批量更新", notes = "传入topics") |
| | | public R updateBath(@Valid @RequestBody List<TopicsEntity> topics) { |
| | | |
| | | public R updateBath(@Valid @RequestBody List<TopicsVO> topics) throws Exception { |
| | | Boolean result = userTopicsService.batchSave(topics); |
| | | |
| | | return R.status(result); |
| | | } |
| | | |