| | |
| | | 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; |
| | |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | return R.data(pages); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 自定义树 |
| | | * @param dispatcher |
| | | * @return |
| | | */ |
| | | @GetMapping("/page-tree") |
| | | public R pageTree(DispatcherUnitVO dispatcher) { |
| | | List<DispatcherUnitVO> pages = dispatcherUnitService.selectDispatcherUnitPageTree(dispatcher); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | |
| | | * 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | public R submit(@Valid @RequestBody DispatcherUnit dispatcherUnit) { |
| | | public R submit(@Valid @RequestBody DispatcherUnit dispatcherUnit) throws Exception { |
| | | if (dispatcherUnit.getId()==null){ |
| | | arg arg = new arg(); |
| | | arg.test01(arg.url+"/dispatcherUnit/save",dispatcherUnit); |
| | | } |
| | | if (null==dispatcherUnit.getId()){ |
| | | dispatcherUnit.setCreateTime(new Date()); |
| | | } |