|
@@ -48,9 +48,14 @@
|
|
|
<if test="search != null">
|
|
|
and title_ like '%' #{search} '%'
|
|
|
</if>
|
|
|
- <if test="memo != null and memo != ''">
|
|
|
- and memo_ = #{memo}
|
|
|
- </if>
|
|
|
+ <choose>
|
|
|
+ <when test="memo != null and memo != ''">
|
|
|
+ and memo_ = #{memo}
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and (memo_ is null or memo_ = '')
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
</where>
|
|
|
</sql>
|
|
|
|
|
@@ -182,9 +187,14 @@
|
|
|
<if test="tenantId != null">
|
|
|
and tenant_id_ = #{tenantId}
|
|
|
</if>
|
|
|
- <if test="memo != null and memo != ''">
|
|
|
- and memo_ = #{memo}
|
|
|
- </if>
|
|
|
+ <choose>
|
|
|
+ <when test="memo != null and memo != ''">
|
|
|
+ and memo_ = #{memo}
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and (memo_ is null or memo_ = '')
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
order by status_ desc,order_ desc,update_time_ desc
|
|
|
<include refid="global.limit" />
|
|
|
</select>
|
|
@@ -211,8 +221,13 @@
|
|
|
<if test="tenantId != null">
|
|
|
and tenant_id_ = #{tenantId}
|
|
|
</if>
|
|
|
- <if test="memo != null and memo != ''">
|
|
|
- and memo_ = #{memo}
|
|
|
- </if>
|
|
|
+ <choose>
|
|
|
+ <when test="memo != null and memo != ''">
|
|
|
+ and memo_ = #{memo}
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and (memo_ is null or memo_ = '')
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
</select>
|
|
|
</mapper>
|