v1.0.13
CI / build-deploy (pull_request) Successful in 21s
CI / notify-on-failure (pull_request) Skipped

This commit is contained in:
Timi
2026-08-13 17:52:03 +08:00
parent 348f7396a1
commit 36e2a37af2
14 changed files with 310 additions and 6 deletions
@@ -19,6 +19,52 @@
AND `deleted_at` IS NULL
</select>
<sql id="queryWhere">
`c`.`deleted_at` IS NULL
<if test="storeId != null and storeId != ''">
AND `c`.`store_id` = #{storeId}
</if>
<if test="keyword != null and keyword != ''">
AND (
`c`.`code` LIKE CONCAT('%', #{keyword}, '%')
OR `c`.`name` LIKE CONCAT('%', #{keyword}, '%')
OR `c`.`telephone` LIKE CONCAT('%', #{keyword}, '%')
)
</if>
<if test="tagIdList != null and !tagIdList.isEmpty()">
<bind name="tagCount" value="tagIdList.size()"/>
AND `c`.`id` IN (
SELECT `ta`.`biz_id`
FROM `tag_apply` `ta`
WHERE
`ta`.`biz_type` = 'GAO_CUSTOMER'
AND `ta`.`tag_id` IN
<foreach collection="tagIdList" item="tagId" separator="," open="(" close=")">
#{tagId}
</foreach>
AND `ta`.`deleted_at` IS NULL
GROUP BY `ta`.`biz_id`
HAVING COUNT(DISTINCT `ta`.`tag_id`) = #{tagCount}
)
</if>
</sql>
<select id="countByQuery" resultType="long">
SELECT COUNT(1)
FROM `gao_customer` `c`
WHERE
<include refid="queryWhere"/>
</select>
<select id="selectByQuery" resultType="com.imyeyu.api.modules.gao.entity.GaoCustomer">
SELECT `c`.*
FROM `gao_customer` `c`
WHERE
<include refid="queryWhere"/>
ORDER BY `c`.`created_at` DESC, `c`.`id` DESC
LIMIT #{offset}, #{limit}
</select>
<select id="stateDailyNewCustomer" resultType="com.imyeyu.api.modules.gao.vo.GaoCustomerDailyStateView">
SELECT
CAST(DATE_FORMAT(FROM_UNIXTIME(`created_at` / 1000), '%Y%m%d') AS UNSIGNED) AS `dateValue`,