whycxzp
2024-01-13 d58292a7a895984300f3ee69b81c6eb4f87e345f
src/main/java/com/whyc/controller/TestParamController.java
@@ -4,6 +4,7 @@
import com.whyc.pojo.FileParam;
import com.whyc.pojo.TestParam;
import com.whyc.service.TestParamService;
import com.whyc.util.MessageUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@@ -11,7 +12,7 @@
@RestController
@RequestMapping(("testParam"))
@Api(value = "测试参数-分级评价")
@Api(tags = "测试参数-分级评价")
public class TestParamController {
    @Autowired
@@ -28,7 +29,14 @@
    @PutMapping("factorsAndThreshold")
    public Response updateFactorsAndThreshold(@RequestBody TestParam param){
        service.updateFactorsAndThreshold(param);
        return new Response().set(1,"更新完成");
        return new Response().set(1, MessageUtils.getMessage("updateSuccessfully"));
    }
    @ApiOperation("服务调用测试")
    @GetMapping("callService")
    public Response<TestParam> callService(@RequestParam Integer seconds) throws InterruptedException {
        service.callService(seconds);
        return new Response().set(1,"调用服务成功!");
    }
}