| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.ApplicationConfigDTO; |
| | | import com.whyc.dto.ApplicationDTO; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.Application; |
| | | import com.whyc.pojo.ApplicationConfig; |
| | |
| | | @Autowired |
| | | private ApplicationService service; |
| | | |
| | | /*======应用管理,admin才有权限更改======*/ |
| | | @PostMapping |
| | | @ApiOperation(value = "应用-创建") |
| | | public Response create(@RequestBody Application app){ |
| | | public Response create(@RequestBody ApplicationDTO app){ |
| | | return service.insert(app); |
| | | } |
| | | |
| | |
| | | return service.getAll(); |
| | | } |
| | | |
| | | /**TODO:需要添加操作日志*/ |
| | | @PutMapping |
| | | @ApiOperation(value = "应用-更新名称") |
| | | public Response update(@RequestBody Application app){ |
| | | public Response update(@RequestBody ApplicationDTO app){ |
| | | return service.update(app); |
| | | } |
| | | |
| | | /**TODO:需要添加操作日志*/ |
| | | @DeleteMapping |
| | | @ApiOperation(value = "应用-删除") |
| | | public Response delete(@RequestBody Application app){ |
| | | public Response delete(@RequestBody ApplicationDTO app){ |
| | | return service.delete(app); |
| | | } |
| | | |
| | |
| | | |
| | | @GetMapping("allConfig") |
| | | @ApiOperation(value = "配置-查询当前应用的配置") |
| | | public Response getAllConfig(@RequestParam int appId){ |
| | | return service.getAllConfig(appId); |
| | | public Response getAllConfig(@RequestParam int appId,@RequestParam int userId){ |
| | | return service.getAllConfig(appId,userId); |
| | | } |
| | | } |