| | |
| | | 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; |
| | | |
| | | /*======应用管理======*/ |
| | | @PostMapping |
| | | @ApiOperation(value = "应用-创建") |
| | | public Response create(@RequestBody Application app){ |
| | |
| | | |
| | | @GetMapping("all") |
| | | @ApiOperation(value = "应用-查询所有") |
| | | public Response getAll(){ |
| | | return service.getAll(); |
| | | public Response getAll(@RequestParam Integer userId){ |
| | | return service.getAll(userId); |
| | | } |
| | | |
| | | @PutMapping |
| | |
| | | |
| | | @DeleteMapping |
| | | @ApiOperation(value = "应用-删除") |
| | | public Response delete(@RequestBody Application app){ |
| | | return service.delete(app); |
| | | public Response delete(@RequestParam Integer appId){ |
| | | return service.delete(appId); |
| | | } |
| | | |
| | | @PutMapping("active") |
| | | @ApiOperation(value = "应用-设置激活") |
| | | public Response updateActive(@RequestBody Application app){ |
| | | return service.updateActive(app); |
| | | } |
| | | |
| | | @GetMapping("active") |
| | | @ApiOperation(value = "应用-查询当前激活") |
| | | public Response getActive(@RequestParam Integer userId){ |
| | | return service.getActive(userId); |
| | | } |
| | | |
| | | /*======应用配置======*/ |
| | |
| | | |
| | | @GetMapping("allConfig") |
| | | @ApiOperation(value = "配置-查询当前应用的配置") |
| | | public Response getAllConfig(@RequestParam int appId){ |
| | | public Response getAllConfig(@RequestParam Integer appId){ |
| | | return service.getAllConfig(appId); |
| | | } |
| | | |
| | | } |