| | |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | | 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.modules.discuss.dto.TopicsDTO; |
| | | import org.springblade.modules.discuss.entity.TopicsEntity; |
| | | import org.springblade.modules.discuss.entity.UserTopicsEntity; |
| | | import org.springblade.modules.discuss.service.ITopicsService; |
| | | import org.springblade.modules.discuss.service.IUserTopicsService; |
| | | import org.springblade.modules.discuss.vo.TopicsVO; |
| | | import org.springblade.modules.discuss.wrapper.TopicsWrapper; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | return R.status(topicsService.updateById(topics)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 议题表 新增或修改 |
| | | */ |
| | |
| | | List<TopicsDTO> children = topics.getChildren(); |
| | | for (TopicsDTO child : children) { |
| | | child.setParentId(topics.getId()); |
| | | child.setDiscussContent(topics.getDiscussContent()); |
| | | child.setArticleId(topics.getArticleId()); |
| | | child.setLevel(2); |
| | | boolean b2 = topicsService.saveOrUpdate(child); |
| | | } |
| | |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(topicsService.removeByIds(Func.toLongList(ids))); |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam Integer ids) { |
| | | return R.status(topicsService.removeById(ids)); |
| | | } |
| | | |
| | | |