新增会员 以及 订单支付统计

This commit is contained in:
2025-04-25 10:00:09 +08:00
parent d525b078bc
commit 91159b07c3
3 changed files with 30 additions and 5 deletions

View File

@@ -41,13 +41,13 @@
group by shop_id
</select>
<select id="getNewMemberCount" resultType="java.lang.Long">
select count(1) from tb_shop_user where shop_id = #{shopId}
select count(1) from tb_shop_user where shop_id = #{shopId} and is_vip = 1
<if test="beginDate != null and beginDate != ''">
and create_time >= str_to_date(#{beginDate}, '%Y-%m-%d %H:%i:%s')
and join_time >= str_to_date(#{beginDate}, '%Y-%m-%d %H:%i:%s')
</if>
<if test="endDate != null and endDate != ''">
<![CDATA[
and create_time <= str_to_date(#{endDate}, '%Y-%m-%d %H:%i:%s')
and join_time <= str_to_date(#{endDate}, '%Y-%m-%d %H:%i:%s')
]]>
</if>
</select>