|
@@ -18,11 +18,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="tenantId != null and tenantId != 0"> AND tenant_id = #{tenantId}</if>
|
|
<if test="tenantId != null and tenantId != 0"> AND tenant_id = #{tenantId}</if>
|
|
<if test="code != null and code != ''"> AND code LIKE CONCAT('%', #{code}, '%')</if>
|
|
<if test="code != null and code != ''"> AND code LIKE CONCAT('%', #{code}, '%')</if>
|
|
<if test="isPrint != null"> AND is_print = #{isPrint}</if>
|
|
<if test="isPrint != null"> AND is_print = #{isPrint}</if>
|
|
- <if test="isAbandoned != null and isAbandoned == 1"> AND exists(select 1 from biz_carrier_reject t2 where t2.carrier_id = t1.id and t2.is_abandoned = #{isAbandoned})</if>
|
|
|
|
- <if test="isAbandoned != null and isAbandoned == 0"> AND NOT EXISTS (
|
|
|
|
- SELECT 1 FROM biz_carrier_reject t2
|
|
|
|
- WHERE t2.carrier_id = t1.id AND t2.is_abandoned = 1
|
|
|
|
- )</if>
|
|
|
|
|
|
+ <if test="isAbandoned != null and isAbandoned == 1"> AND (
|
|
|
|
+ SELECT t2.is_abandoned
|
|
|
|
+ FROM biz_carrier_reject t2
|
|
|
|
+ WHERE t2.carrier_id = t1.id
|
|
|
|
+ ORDER BY t2.create_time DESC limit 1
|
|
|
|
+ ) = 1 </if>
|
|
|
|
+ <if test="isAbandoned != null and isAbandoned == 0"> AND (
|
|
|
|
+ SELECT t2.is_abandoned
|
|
|
|
+ FROM biz_carrier_reject t2
|
|
|
|
+ WHERE t2.carrier_id = t1.id
|
|
|
|
+ ORDER BY t2.create_time DESC limit 1
|
|
|
|
+ ) != 1 </if>
|
|
</trim>
|
|
</trim>
|
|
|
|
|
|
</select>
|
|
</select>
|