|
@@ -862,9 +862,29 @@
|
|
|
|
|
|
<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 * from lift_case where charger_id=#{userId} and data_table = 1 and FIND_IN_SET(statuz,'1,2,3,4,5,7,8')
|
|
|
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,'0,1,2,3,4,5,7,8')
|
|
|
)temp
|
|
|
</select>
|
|
|
+
|
|
|
+
|
|
|
+ <!--获取20分钟未接单的数据-->
|
|
|
+ <select id="getAllTimeOutCase" resultType="cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity">
|
|
|
+ select * from lift_case
|
|
|
+ where data_table = 1 AND statuz = 1 AND charger_id !=- 2 AND accept_status = 0
|
|
|
+ AND create_time < DATE_FORMAT(ADDDATE(NOW( ), INTERVAL - 20 MINUTE), '%Y-%m-%d %H:%i:%s')
|
|
|
+ union
|
|
|
+ select * from lift_case
|
|
|
+ where data_table = 2 AND statuz = 0 AND charger_id !=- 2 AND accept_status = 0
|
|
|
+ AND create_time < DATE_FORMAT(ADDDATE(NOW( ), INTERVAL - 20 MINUTE), '%Y-%m-%d %H:%i:%s')
|
|
|
+ union
|
|
|
+ select * from lift_case
|
|
|
+ where data_table = 1 AND statuz = 1 AND is_platform_specified = 1 AND accept_status = 0
|
|
|
+ AND create_time < DATE_FORMAT(ADDDATE(NOW( ), INTERVAL - 20 MINUTE), '%Y-%m-%d %H:%i:%s')
|
|
|
+ union
|
|
|
+ select * from lift_case
|
|
|
+ where data_table = 2 AND statuz = 0 AND is_platform_specified = 1 AND accept_status = 0
|
|
|
+ AND create_time < DATE_FORMAT(ADDDATE(NOW( ), INTERVAL - 20 MINUTE), '%Y-%m-%d %H:%i:%s')
|
|
|
+ </select>
|
|
|
</mapper>
|