| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | /** |
| | | * 议题表 修改 |
| | | */ |
| | | @PostMapping("/updateBath") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "批量更新", notes = "传入topics") |
| | | public R updateBath(@Valid @RequestBody List<TopicsEntity> topics) { |
| | | return R.status(topicsService.updateBatchById(topics)); |
| | | } |
| | | |
| | | /** |
| | | * 议题表 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | |
| | | List<TopicsDTO> children = topics.getChildren(); |
| | | for (TopicsDTO child : children) { |
| | | child.setParentId(topics.getId()); |
| | | child.setDiscussContent(topics.getDiscussContent()); |
| | | child.setLevel(2); |
| | | boolean b2 = topicsService.saveOrUpdate(child); |
| | | } |