| | |
| | | * @return |
| | | */ |
| | | @PostMapping(path="save") |
| | | @SsoPowerAop(power = "10300005") |
| | | @SsoPowerAop(power = "-1") |
| | | @Log("保存指令") |
| | | public BaseResponse<Boolean> save(@RequestBody @Valid TstCommand command){ |
| | | command.disabled = false; |
| | | command.deleted = false; |
| | | int count = sv.save(command); |
| | | if (count <= 0) { |
| | | return BaseResponseUtils.buildFail("数据库存储失败"); |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping(path="update") |
| | | @SsoPowerAop(power = "10300005") |
| | | @SsoPowerAop(power = "-1") |
| | | @Log("更新指令") |
| | | public BaseResponse<Boolean> update(@RequestBody @Valid TstCommand command){ |
| | | int count = sv.update(command); |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping(path="delete") |
| | | @SsoPowerAop(power = "10300005") |
| | | @SsoPowerAop(power = "-1") |
| | | @Log("删除指令") |
| | | public BaseResponse<Boolean> delete(String id){ |
| | | int count = sv.delete(Long.parseLong(id)); |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping(path="one") |
| | | @SsoPowerAop(power = "10300004") //登录与权限同时验证 |
| | | @SsoPowerAop(power = "-1") //登录与权限同时验证 |
| | | @Log("根据ID查询指令") |
| | | public BaseResponse<TstCommand> one(String id){ |
| | | TstCommand param=sv.selectById(id); |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping(path="some") |
| | | @SsoPowerAop(power = "10300004") |
| | | @SsoPowerAop(power = "-1") |
| | | @Log("分页查询指令") |
| | | public BaseResponse<QueryResultVo<List<TstCommand>>> some(@RequestBody QueryVo vo){ |
| | | QueryResultVo<List<TstCommand>> list = sv.selectSome(vo) ; |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping(path="all") |
| | | @SsoPowerAop(power = "10300004") |
| | | @SsoPowerAop(power = "-1") |
| | | @Log("查询所有指令") |
| | | public BaseResponse<List<TstCommand>> all(){ |
| | | List<TstCommand> list = sv.selectAll(); |