whycxzp
2021-03-17 1fc5c5b72db71c8c36c7d64950e2795cc8a5b3ac
src/main/java/com/whyc/controller/ApplicationController.java
@@ -24,31 +24,29 @@
    @Autowired
    private ApplicationService service;
    /*======应用管理,admin才有权限更改======*/
    /*======应用管理======*/
    @PostMapping
    @ApiOperation(value = "应用-创建")
    public Response create(@RequestBody ApplicationDTO app){
    public Response create(@RequestBody Application app){
        return service.insert(app);
    }
    @GetMapping("all")
    @ApiOperation(value = "应用-查询所有")
    public Response getAll(){
        return service.getAll();
    public Response getAll(@RequestParam Integer userId){
        return service.getAll(userId);
    }
    /**TODO:需要添加操作日志*/
    @PutMapping
    @ApiOperation(value = "应用-更新名称")
    public Response update(@RequestBody ApplicationDTO app){
    public Response update(@RequestBody Application app){
        return service.update(app);
    }
    /**TODO:需要添加操作日志*/
    @DeleteMapping
    @ApiOperation(value = "应用-删除")
    public Response delete(@RequestBody ApplicationDTO app){
        return service.delete(app);
    public Response delete(@RequestParam Integer appId){
        return service.delete(appId);
    }
    /*======应用配置======*/
@@ -61,7 +59,7 @@
    @GetMapping("allConfig")
    @ApiOperation(value = "配置-查询当前应用的配置")
    public Response getAllConfig(@RequestParam int appId,@RequestParam int userId){
        return service.getAllConfig(appId,userId);
    public Response getAllConfig(@RequestParam Integer appId){
        return service.getAllConfig(appId);
    }
}