批量增加isValid和isAudit检索条件

This commit is contained in:
duandongmei
2019-05-09 17:31:40 +08:00
parent 21ca3bc804
commit 23ae0f08d3
17 changed files with 663 additions and 423 deletions

View File

@@ -128,20 +128,33 @@
<if test="action != null">
AND a.ACTION=#{action,jdbcType=INTEGER}
</if>
<if test="isValid != null">
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
</if>
<if test="isValid == null">
AND a.IS_VALID != -1
</if>
<if test="isAudit != null">
<if test="isAudit &gt; 9">
AND a.IS_AUDIT IN(LEFT(#{isAudit,jdbcType=INTEGER},1),RIGHT(#{isAudit,jdbcType=INTEGER},1))
</if>
<if test="isAudit &lt; 9">
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
</if>
</if>
<choose>
<!-- 判断是否批量操作 -->
<when test="batchValidValue != null and batchValidValue != ''">
AND a.IS_VALID in (${batchValidValue})
</when>
<otherwise>
<if test="isValid != null">
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
</if>
<if test="isValid == null">
AND a.IS_VALID != -1
</if>
</otherwise>
</choose>
<choose>
<!-- 判断是否批量操作 -->
<when test="batchAuditValue != null and batchAuditValue != ''">
<if test="isAudit != null">
AND a.IS_AUDIT in(${batchAuditValue})
</if>
</when>
<otherwise>
<if test="isAudit != null">
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
</if>
</otherwise>
</choose>
<if test="creatorName != null and creatorName != ''">
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
</if>