| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | |
| | | * 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | public R submit(@Valid @RequestBody DispatcherUnit dispatcherUnit) { |
| | | if (null==dispatcherUnit.getId()){ |
| | | public R submit(@Valid @RequestBody DispatcherUnit dispatcherUnit) throws Exception { |
| | | if (null==dispatcherUnit.getId()) { |
| | | dispatcherUnit.setCreateTime(new Date()); |
| | | } |
| | | return R.status(dispatcherUnitService.saveOrUpdate(dispatcherUnit)); |
| | |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperation(value = "删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) throws Exception { |
| | | return R.status(dispatcherUnitService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |