Quellcode durchsuchen

新增 压测接口

miaolijing vor 3 Jahren
Ursprung
Commit
4f1467a7dc

+ 2 - 2
src/main/java/com/persagy/apm/alarmservice/group/alarmrule/controller/PressureMeasurementController.java

@@ -1,8 +1,8 @@
 package com.persagy.apm.alarmservice.group.alarmrule.controller;
 
 import com.persagy.apm.alarmservice.group.alarmrule.model.dto.AddGroupAlarmRuleDTO;
+import com.persagy.apm.alarmservice.group.alarmrule.model.dto.QueryAlarmProjectDTO;
 import com.persagy.apm.alarmservice.group.alarmrule.service.IGroupAlarmRuleService;
-import com.persagy.apm.alarmservice.project.alarmcondition.model.dto.QueryAlarmConditionByObjDTO;
 import com.persagy.apm.alarmservice.project.alarmrule.service.IProjectAlarmRuleService;
 import com.persagy.apm.alarmservice.project.alarmruleobjrel.model.vo.ProjectVO;
 import com.persagy.apm.common.response.ApmResponseUpsertVO;
@@ -74,7 +74,7 @@ public class PressureMeasurementController {
 
     @ApiOperation(value = "查询同步项目列表")
     @PostMapping("/query_project")
-    public CommonResult<List<ProjectVO>> queryProject(@RequestBody QueryAlarmConditionByObjDTO alarmConditionByObjDTO) {
+    public CommonResult<List<ProjectVO>> queryProject(@Valid @RequestBody QueryAlarmProjectDTO queryAlarmProjectDTO) {
         List<ProjectVO> projects = null;
         try {
             projects = projectAlarmRuleService.getProject();

+ 22 - 0
src/main/java/com/persagy/apm/alarmservice/group/alarmrule/model/dto/QueryAlarmProjectDTO.java

@@ -0,0 +1,22 @@
+package com.persagy.apm.alarmservice.group.alarmrule.model.dto;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.validation.constraints.NotBlank;
+
+@Data
+@Builder(toBuilder=true)
+@NoArgsConstructor
+@AllArgsConstructor
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class QueryAlarmProjectDTO {
+    private String groupCode;
+    private String userId;
+    private String pd;
+}