Эх сурвалжийг харах

Merge remote-tracking branch 'origin/dev_v1.0.0' into dev_v1.0.0

wangliang 1 жил өмнө
parent
commit
5d1daf9456

+ 3 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/SysMessageWorkResult.java

@@ -1,5 +1,7 @@
 package com.qmth.sop.business.bean.result;
 
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import com.qmth.sop.common.enums.DelayWarnStatusEnum;
 import com.qmth.sop.common.enums.MessageTypeEnum;
 import com.qmth.sop.common.enums.ProductTypeEnum;
@@ -18,6 +20,7 @@ import java.io.Serializable;
 
 public class SysMessageWorkResult implements Serializable {
 
+    @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "消息id")
     private long id;
 

+ 21 - 4
sop-business/src/main/resources/mapper/SysMessageMapper.xml

@@ -31,8 +31,18 @@
             <if test="supplierId != null and supplierId != ''">
                 and m.supplier_id = #{supplierId}
             </if>
-            <if test="status != null and status != ''">
-                and m.status = #{status}
+<!--            <if test="status != null and status != ''">-->
+<!--                and m.status = #{status}-->
+<!--            </if>-->
+            <if test="status != null">
+                <choose>
+                    <when test="status">
+                        and m.status = 1
+                    </when>
+                    <otherwise>
+                        and m.status = 0
+                    </otherwise>
+                </choose>
             </if>
         </where>
         order by m.send_time desc
@@ -89,8 +99,15 @@
             <if test="custom != null and custom != ''">
                 and c.name like concat('%', #{custom} , '%')
             </if>
-            <if test="status != null and status != ''">
-                and m.status = #{status}
+            <if test="status != null">
+                <choose>
+                    <when test="status">
+                        and m.status = 1
+                    </when>
+                    <otherwise>
+                        and m.status = 0
+                    </otherwise>
+                </choose>
             </if>
             <if test="serviceId != null and serviceId != ''">
                 and m.service_id = #{serviceId}