| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | * @param directive 指令信息对象 |
| | | */ |
| | | @PostMapping("/saveDirectiveAndFile") |
| | | public R saveDirectiveAndFile(@RequestBody DirectiveVo directive) { |
| | | public R saveDirectiveAndFile(@RequestBody DirectiveVo directive) throws Exception { |
| | | //新增指令信息 |
| | | boolean status = false; |
| | | directive.setSendTime(new Date()); |
| | | status = directiveService.save(directive); |
| | | //内网新增 |
| | | arg.test01(arg.url+"/directive/saveDirectiveAndFile",directive); |
| | | if (status){ |
| | | //新增图片 |
| | | if (null!=directive.getUrl() && directive.getUrl()!=""){ |
| | |
| | | * @param directive 指令信息对象 |
| | | */ |
| | | @PostMapping("/updateDirectiveAndFile") |
| | | public R updateDirectiveAndFile(@RequestBody DirectiveVo directive) { |
| | | public R updateDirectiveAndFile(@RequestBody DirectiveVo directive) throws Exception { |
| | | //新增指令信息 |
| | | boolean update = directiveService.updateById(directive); |
| | | boolean status = false; |
| | | //内网新增 |
| | | arg.test01(arg.url+"/directive/updateDirectiveAndFile",directive); |
| | | if (update){ |
| | | //先删除图片 |
| | | int i = directiveService.deleleByDirectiveId(directive.getId()); |
| | |
| | | directiveService.deleleByDirectiveId(Long.parseLong(directiveId)); |
| | | } |
| | | } |
| | | //内网删除 |
| | | arg.sendPostRemoveByIds(arg.url+"/directive/remove",ids); |
| | | return R.status(directiveService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |