2 Revize 60abb134dd ... 28645d3148

Autor SHA1 Zpráva Datum
  aihua 28645d3148 Merge remote-tracking branch 'origin/master' před 3 roky
  aihua d46dd67e67 新增:安全隐患详细查询接口 před 3 roky

+ 2 - 2
src/main/java/com/chinaitop/depot/risk/controller/ViolationWarningAlarmController.java

@@ -48,7 +48,7 @@ public class ViolationWarningAlarmController {
48 48
             @ApiImplicitParam(name = "startDate", value = "开始日期", paramType = "query"),
49 49
             @ApiImplicitParam(name = "endDate", value = "结束日期", paramType = "query")
50 50
     })
51
-    public ResponseEntity<PageInfo<ViolationWarningAlarm>> listPage(Integer pageNum, Integer pageSize, Integer orgId,String violationType, String startDate, String endDate){
51
+    public ResponseEntity<PageInfo<ViolationWarningAlarm>> listPage(Integer pageNum, Integer pageSize, Integer orgId,Integer violationType, String startDate, String endDate){
52 52
 
53 53
         if (orgId == null) {
54 54
             return ResponseEntity.failed("组织机构ID不能为空!");
@@ -63,7 +63,7 @@ public class ViolationWarningAlarmController {
63 63
         if (StringUtils.isNotBlank(endDate)) {
64 64
             queryMap.put("endDate", ParameterUtil.string2datetime(endDate));
65 65
         }
66
-        if (StringUtils.isNotBlank(violationType)) {
66
+        if (violationType != null) {
67 67
             queryMap.put("violationType", violationType);
68 68
         }
69 69
         queryMap.put("orgId", orgId);

+ 4 - 3
src/main/java/com/chinaitop/depot/risk/mapper/ViolationWarningAlarmMapper.xml

@@ -6,7 +6,7 @@
6 6
         <result column="publish_time" property="alarmPublishTime" jdbcType="TIMESTAMP"/>
7 7
         <result column="offender" property="offender" jdbcType="VARCHAR"/>
8 8
         <result column="library_point_name" property="involvingLibraryPoints" jdbcType="VARCHAR"/>
9
-        <result column="violation_type" property="violationType" jdbcType="VARCHAR"/>
9
+        <result column="violation_type" property="violationType" jdbcType="INTEGER"/>
10 10
         <result column="detail" property="violationDetail" jdbcType="VARCHAR"/>
11 11
         <result column="disposer" property="disposer" jdbcType="VARCHAR"/>
12 12
         <result column="dispose_content" property="disposeContent" jdbcType="VARCHAR"/>
@@ -46,6 +46,7 @@
46 46
         <if test="violationType != null" >
47 47
             and violation_type = #{violationType}
48 48
         </if>
49
+        order by publish_time desc
49 50
     </select>
50 51
 
51 52
     <insert id="insert">
@@ -60,7 +61,7 @@
60 61
         #{alarmPublishTime,jdbcType=TIMESTAMP},
61 62
         #{offender,jdbcType=VARCHAR},
62 63
         #{involvingLibraryPoints,jdbcType=VARCHAR},
63
-        #{violationType,jdbcType=VARCHAR},
64
+        #{violationType,jdbcType=INTEGER},
64 65
         #{violationDetail,jdbcType=VARCHAR},
65 66
         #{disposer,jdbcType=VARCHAR},
66 67
         #{disposeContent,jdbcType=VARCHAR},
@@ -106,7 +107,7 @@
106 107
                 library_point_name = #{involvingLibraryPoints,jdbcType=VARCHAR},
107 108
             </if>
108 109
             <if test="violationType != null">
109
-                violation_type = #{violationType,jdbcType=VARCHAR},
110
+                violation_type = #{violationType,jdbcType=INTEGER},
110 111
             </if>
111 112
             <if test="violationDetail != null">
112 113
                 detail = #{violationDetail,jdbcType=INTEGER},

+ 1 - 1
src/main/java/com/chinaitop/depot/risk/model/ViolationWarningAlarm.java

@@ -42,7 +42,7 @@ public class ViolationWarningAlarm {
42 42
     /**
43 43
      * 违规类型
44 44
      */
45
-    private String violationType;
45
+    private Integer violationType;
46 46
     /**
47 47
      * 违规详情
48 48
      */

+ 1 - 1
src/main/java/com/chinaitop/depot/risk/request/dto/ViolationWarningAlarmDto.java

@@ -27,7 +27,7 @@ public class ViolationWarningAlarmDto {
27 27
     /**
28 28
      * 违规类型
29 29
      */
30
-    private String violationType;
30
+    private Integer violationType;
31 31
     /**
32 32
      * 违规详情
33 33
      */