Jelajahi Sumber

修改监控中心查询

Wei Ruifeng 4 tahun lalu
induk
melakukan
f955c085fc

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

@@ -705,9 +705,59 @@
     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>
-        <if test="query.expression != null" >
-            t.expression like CONCAT("%",#{query.expression},"%")
+	where t.accept_status=0
+		<if test="query.expression != null" >
+            and t.expression like CONCAT("%",#{query.expression},"%")
+        </if>
+        <if test="query.originator != null" >
+            and ui.name like CONCAT("%",#{query.originator},"%")
+        </if>
+        <if test="query.chargeName != null" >
+            and ci.name like CONCAT("%",#{query.chargeName},"%")
+        </if>
+        <if test="query.brandName != null" >
+            and brand.name like CONCAT("%",#{query.brandName},"%")
+        </if>
+        <if test="query.statuz1 != null" >
+            and lift.statuz = #{query.statuz1}
+        </if>
+	union 
+	SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
+    que.examine_flag examineFlag,que.not_examine_reason notExamineReason
+    from lift_case as t
+    LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
+    LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
+    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 t.statuz=9
+		<if test="query.expression != null" >
+            and t.expression like CONCAT("%",#{query.expression},"%")
+        </if>
+        <if test="query.originator != null" >
+            and ui.name like CONCAT("%",#{query.originator},"%")
+        </if>
+        <if test="query.chargeName != null" >
+            and ci.name like CONCAT("%",#{query.chargeName},"%")
+        </if>
+        <if test="query.brandName != null" >
+            and brand.name like CONCAT("%",#{query.brandName},"%")
+        </if>
+        <if test="query.statuz1 != null" >
+            and lift.statuz = #{query.statuz1}
+        </if>
+	union
+	SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
+    que.examine_flag examineFlag,que.not_examine_reason notExamineReason
+    from lift_case as t
+    LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
+    LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
+    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 t.statuz!=9 and t.accept_status!=0
+		<if test="query.expression != null" >
+            and t.expression like CONCAT("%",#{query.expression},"%")
         </if>
         <if test="query.originator != null" >
             and ui.name like CONCAT("%",#{query.originator},"%")
@@ -721,9 +771,6 @@
         <if test="query.statuz1 != null" >
             and lift.statuz = #{query.statuz1}
         </if>
-    </where>
-    ORDER BY t.is_platform_specified desc,t.accept_status asc,t.update_time DESC
-    limit #{query.pageIndex},#{query.pageSize}
   </select>
   <select id="queryMonitoringCenterCount" resultType="java.lang.Integer">
     SELECT count(0)

+ 1 - 1
lift-ud-service/src/main/java/cn/com/ty/lift/ud/chat/service/impl/LiftCaseServiceImpl.java

@@ -1010,7 +1010,7 @@ public class LiftCaseServiceImpl extends ServiceImpl<LiftCaseMapper, LiftCaseEnt
     @Override
     public RestResponse cancelCase(Long id) {
         LiftCaseEntity liftCaseEntity = caseMapper.selectById(id);
-        if (liftCaseEntity.getAcceptStatus() == 9) {
+        if (liftCaseEntity.getStatuz() == 9) {
             return RestResponse.fail("订单已取消");
         }
         if (liftCaseEntity.getDataTable() == 1 && liftCaseEntity.getStatuz() == 1) {