|
@@ -235,7 +235,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
t_call_record
|
|
|
WHERE
|
|
|
1 = 1 AND del_flag = 0
|
|
|
- <if test="type != null "> and type = #{type}</if>
|
|
|
+ <if test="type != null ">
|
|
|
+ <choose>
|
|
|
+ <when test="2 == type">
|
|
|
+ and category = 0 and type = 2
|
|
|
+ </when>
|
|
|
+ <when test="0 == type">
|
|
|
+ and category = 0 and type = 0 and service_category = 0
|
|
|
+ </when>
|
|
|
+ <when test="1 == type">
|
|
|
+ and category = 0 and type = 0 and (service_category = 1 or service_category = 2)
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
|
|
@@ -245,10 +257,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
FROM
|
|
|
t_call_record
|
|
|
WHERE
|
|
|
- 1 = 1 and type = 1 AND del_flag = 0
|
|
|
- <if test="businessType == 1 "> and (bussiness_type != '不体验AI服务' or bussiness_type is NULL or bussiness_type = '') and category = 0</if>
|
|
|
- <if test="businessType == 0 "> and bussiness_type = '不体验AI服务' and category = 0</if>
|
|
|
- <if test="businessType == 2 "> and category = 1</if>
|
|
|
+ 1 = 1 AND del_flag = 0
|
|
|
+ <if test="businessType == 1 "> and category = 0 and type = 1 and bussiness_type != '不体验AI服务' </if>
|
|
|
+ <if test="businessType == 0 "> and category = 0 and type = 1 and bussiness_type = '不体验AI服务'</if>
|
|
|
+ <if test="businessType == 2 "> and category = 1 and type = 2</if>
|
|
|
</select>
|
|
|
|
|
|
<select id="getSpecialCount" resultType="int">
|
|
@@ -291,7 +303,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
1 = 1
|
|
|
AND del_flag = 0
|
|
|
<if test="type == 0 "> and service_category = 0</if>
|
|
|
- <if test="type == 1 "> and service_category != 0 </if>
|
|
|
+ <if test="type == 1 "> and (service_category = 1 or service_category = 2) </if>
|
|
|
</select>
|
|
|
|
|
|
<select id="getPersonCountByType" resultType="int">
|
|
@@ -303,8 +315,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
1 = 1
|
|
|
AND del_flag = 0
|
|
|
and service_category = 0
|
|
|
- <if test="type == 0 "> and (user_id is null or user_id = '') </if>
|
|
|
- <if test="type == 1 "> and user_id is not null and user_id != ''</if>
|
|
|
+ <!--<if test="type == 0 "> and (user_id is null or user_id = '') </if>
|
|
|
+ <if test="type == 1 "> and user_id is not null and user_id != ''</if>-->
|
|
|
+ <if test="type == 0 "> and status = 0 </if>
|
|
|
+ <if test="type == 1 "> and status = 1 </if>
|
|
|
</select>
|
|
|
|
|
|
<select id="getPersonTotalRecordIsRobot" resultType="long">
|