support customer list

This commit is contained in:
Timi
2026-10-30 01:22:45 +08:00
parent 4f1a5cbd9d
commit b0b623fa10
2 changed files with 22 additions and 0 deletions
@@ -213,6 +213,22 @@
<if test="customerId != null and customerId != ''">
AND r.`customer_id` = #{customerId}
</if>
<if test="keyword != null and keyword.trim() != ''">
AND (c.`code` LIKE CONCAT('%', #{keyword}, '%')
OR c.`name` LIKE CONCAT('%', #{keyword}, '%')
OR c.`name_pinyin_full` LIKE CONCAT(#{keyword}, '%')
OR c.`name_pinyin_initial` LIKE CONCAT(#{keyword}, '%')
OR c.`name_pinyin_mixed` LIKE CONCAT(#{keyword}, '%'))
</if>
<if test="customerIdList != null">
<choose>
<when test="customerIdList.size() > 0">
AND r.`customer_id` IN
<foreach collection="customerIdList" item="id" open="(" separator="," close=")">#{id}</foreach>
</when>
<otherwise>AND 1 = 0</otherwise>
</choose>
</if>
<if test="beginAt != null">
AND r.`registered_at` &gt;= #{beginAt}
</if>