whycxzp
2021-08-25 6061528c2570560d45d89104a573456029defc5d
src/main/java/com/whyc/controller/ApplicationController.java
@@ -1,6 +1,7 @@
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;
@@ -23,6 +24,7 @@
    @Autowired
    private ApplicationService service;
    /*======应用管理======*/
    @PostMapping
    @ApiOperation(value = "应用-创建")
    public Response create(@RequestBody Application app){
@@ -31,8 +33,8 @@
    @GetMapping("all")
    @ApiOperation(value = "应用-查询所有")
    public Response getAll(){
        return service.getAll();
    public Response getAll(@RequestParam Integer userId){
        return service.getAll(userId);
    }
    @PutMapping
@@ -43,8 +45,20 @@
    @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);
    }
    /*======应用配置======*/
@@ -57,7 +71,8 @@
    @GetMapping("allConfig")
    @ApiOperation(value = "配置-查询当前应用的配置")
    public Response getAllConfig(@RequestParam int appId){
    public Response getAllConfig(@RequestParam Integer appId){
        return service.getAllConfig(appId);
    }
}