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
@@ -20,6 +20,12 @@ public class GaoEventRecordRankPage extends BasePage {
/// 客户 ID,为空查询全部客户 /// 客户 ID,为空查询全部客户
private String customerId; private String customerId;
/// 客户搜索关键词
private String keyword;
/// 客户 ID 列表,为空时不限制
private List<String> customerIdList;
/// 登记事件 ID 列表,为空查询全部登记事件 /// 登记事件 ID 列表,为空查询全部登记事件
private List<String> eventIdList; private List<String> eventIdList;
@@ -213,6 +213,22 @@
<if test="customerId != null and customerId != ''"> <if test="customerId != null and customerId != ''">
AND r.`customer_id` = #{customerId} AND r.`customer_id` = #{customerId}
</if> </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"> <if test="beginAt != null">
AND r.`registered_at` &gt;= #{beginAt} AND r.`registered_at` &gt;= #{beginAt}
</if> </if>