|
@@ -697,7 +697,43 @@
|
|
|
</select>
|
|
|
<!-- 后台监控中心 -->
|
|
|
<select id="queryMonitoringCenter" resultType="cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity">
|
|
|
- SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ SELECT
|
|
|
+ *
|
|
|
+ FROM(
|
|
|
+ (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.data_table = 1 AND t.statuz = 1)
|
|
|
+ OR (t.data_table = 2 AND t.statuz = 0)
|
|
|
+ )
|
|
|
+ AND t.is_platform_specified = 1
|
|
|
+ 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},"%")
|
|
|
+ </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>
|
|
|
+ order by t.create_time desc limit 999999999
|
|
|
+ )
|
|
|
+ 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
|
|
@@ -705,7 +741,12 @@
|
|
|
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.accept_status=0 and t.statuz!=9
|
|
|
+ where ((
|
|
|
+ (t.data_table = 1 AND t.statuz = 1)
|
|
|
+ OR (t.data_table = 2 AND t.statuz = 0)
|
|
|
+ )
|
|
|
+ AND (t.charger_id !=- 2)
|
|
|
+ AND t.accept_status = 0)
|
|
|
<if test="query.expression != null" >
|
|
|
and t.expression like CONCAT("%",#{query.expression},"%")
|
|
|
</if>
|
|
@@ -721,8 +762,10 @@
|
|
|
<if test="query.statuz1 != null" >
|
|
|
and lift.statuz = #{query.statuz1}
|
|
|
</if>
|
|
|
+ order by t.create_time desc limit 999999999
|
|
|
+ )
|
|
|
union
|
|
|
- SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ (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
|
|
@@ -730,7 +773,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 t.accept_status!=0 or t.statuz=9
|
|
|
+ where (t.accept_status!=0 or t.statuz=9)
|
|
|
<if test="query.expression != null" >
|
|
|
and t.expression like CONCAT("%",#{query.expression},"%")
|
|
|
</if>
|
|
@@ -746,6 +789,10 @@
|
|
|
<if test="query.statuz1 != null" >
|
|
|
and lift.statuz = #{query.statuz1}
|
|
|
</if>
|
|
|
+ order by t.create_time desc limit 999999999
|
|
|
+ )
|
|
|
+ ) t
|
|
|
+ limit #{query.pageIndex},#{query.pageSize}
|
|
|
</select>
|
|
|
<select id="queryMonitoringCenterCount" resultType="java.lang.Integer">
|
|
|
SELECT count(0)
|