Selaa lähdekoodia

修改订单数量bug

Wei Ruifeng 4 vuotta sitten
vanhempi
commit
d2b672599b

+ 11 - 4
lift-ud-service/src/main/java/cn/com/ty/lift/ud/chat/mapper/LiftCaseMapper.xml

@@ -632,7 +632,7 @@
     LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
     LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
     left join question_bank que on que.lift_case_id = t.id
-    where 1=1 and t.charger_id=#{query.chargerId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'4')
+    where 1=1 and t.charger_id=#{query.chargerId} and t.data_table = 1 and FIND_IN_SET(t.statuz,'4')
     ORDER BY t.create_time DESC
     limit #{query.pageIndex},#{query.pageSize}
   </select>
@@ -861,10 +861,17 @@
 
 
   <select id="selectDealingCount" resultType="java.lang.Integer">
-  select count(0) from (
-  select * from lift_case where charger_id=#{userId} and data_table = 1 and FIND_IN_SET(statuz,'2,3,4')
+   select count(id) from (
+  select * from lift_case where charger_id=#{userId} and data_table = 1 and FIND_IN_SET(statuz,'4')
+  union
+select * from lift_case where charger_id=#{userId} and data_table = 1 and FIND_IN_SET(statuz,'2,3')
   union
-  select * from lift_case where charger_id=#{userId} and data_table = 2 and FIND_IN_SET(statuz,'1,3')
+  select * from lift_case where charger_id=#{userId} and data_table = 2 and FIND_IN_SET(statuz,'1')
+union
+  select * from lift_case where charger_id=#{userId} and data_table = 2 and FIND_IN_SET(statuz,'3') and arrived_Flag=0
+union
+  select * from lift_case where charger_id=#{userId} and data_table = 2 and FIND_IN_SET(statuz,'3') and arrived_Flag=1
   )temp
+  
   </select>
 </mapper>