| | |
| | | @Resource |
| | | private TKnowledgeService knowledgeService; |
| | | |
| | | /** |
| | | * 获取谱系图详情待入库菌种分页列表 |
| | | */ |
| | | |
| | | @ApiOperation(value = "环卫知识分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<KnowledgeListVO>> pageList(@RequestBody KnowledgeListQuery query) { |
| | |
| | | knowledgeService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "详情环卫知识") |
| | | @GetMapping(value = "/detail") |
| | | public R<TKnowledge> detail(@RequestParam String id) { |
| | | |
| | | return R.ok(knowledgeService.getById(id)); |
| | | } |
| | | @Log(title = "批量删除环卫知识", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量环卫知识") |
| | | @ApiOperation(value = "批量删除环卫知识") |
| | | @DeleteMapping(value = "/delete") |
| | | public R<Boolean> edit(@RequestParam String ids) { |
| | | public R<Boolean> delete(@RequestParam String ids) { |
| | | String[] split = ids.split(","); |
| | | knowledgeService.removeBatchByIds(Arrays.asList(split)); |
| | | return R.ok(); |
| | | } |
| | | @Log(title = "启用/禁用环卫知识", businessType = BusinessType.OTHER) |
| | | @ApiOperation(value = "启用/禁用环卫知识") |
| | | @DeleteMapping(value = "/editStatus") |
| | | @GetMapping(value = "/editStatus") |
| | | public R<Boolean> editStatus(@RequestParam String id) { |
| | | TKnowledge byId = knowledgeService.getById(id); |
| | | if (byId.getStatus()==1){ |