|
|
package com.monitor.other.degrade.ctrl;
|
|
|
|
|
|
import com.monitor.model.page.PageResponse;
|
|
|
import com.monitor.other.degrade.model.DegradeConfig;
|
|
|
import com.monitor.model.response.BaseResponse;
|
|
|
import com.monitor.model.domain.DegradeConfig;
|
|
|
import com.monitor.other.degrade.model.DegradeReq;
|
|
|
import com.monitor.other.degrade.service.DegradeService;
|
|
|
import org.springframework.stereotype.Controller;
|
...
|
...
|
@@ -19,9 +20,25 @@ public class DegradeController { |
|
|
@Resource
|
|
|
private DegradeService degradeService;
|
|
|
|
|
|
private PageResponse<DegradeConfig> getDegradeConfigList(DegradeReq req){
|
|
|
@RequestMapping("/getList")
|
|
|
public PageResponse<DegradeConfig> getDegradeConfigList(DegradeReq req){
|
|
|
PageResponse<DegradeConfig> pageResponse = new PageResponse<>();
|
|
|
pageResponse.setRows(degradeService.getDegradeConfigList(req));
|
|
|
return pageResponse;
|
|
|
}
|
|
|
|
|
|
@RequestMapping("/add")
|
|
|
public BaseResponse addDegradeConfig(DegradeConfig config){
|
|
|
BaseResponse baseResponse = new BaseResponse();
|
|
|
degradeService.addDegradeConfig(config);
|
|
|
return baseResponse;
|
|
|
}
|
|
|
|
|
|
@RequestMapping("/update")
|
|
|
public BaseResponse updateDegradeConfig(DegradeConfig config){
|
|
|
BaseResponse baseResponse = new BaseResponse();
|
|
|
degradeService.updateDegradeConfig(config);
|
|
|
return baseResponse;
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|