数据统计
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czg.service.order.mapper.ShopOrderStatisticMapper">
|
||||
|
||||
<select id="getTradeData" resultType="com.czg.order.entity.ShopOrderStatistic">
|
||||
select
|
||||
sum(sale_amount) as sale_amount,
|
||||
@@ -30,7 +29,7 @@
|
||||
max(update_time) as update_time
|
||||
from tb_shop_order_statistic
|
||||
where shop_id = #{shopId}
|
||||
<if test="beginDate != null and endDate != ''">
|
||||
<if test="beginDate != null and beginDate != ''">
|
||||
and create_day >= str_to_date(#{beginDate}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="endDate != null and endDate != ''">
|
||||
@@ -40,4 +39,15 @@
|
||||
</if>
|
||||
group by shop_id
|
||||
</select>
|
||||
<select id="getNewMemberCount" resultType="java.lang.Long">
|
||||
select count(1) from tb_shop_user where shop_id = #{shopId}
|
||||
<if test="beginDate != null and beginDate != ''">
|
||||
and create_time >= str_to_date(concat(#{beginDate},' 00:00:00'), '%Y-%m-%d %H:%i:%s')
|
||||
</if>
|
||||
<if test="endDate != null and endDate != ''">
|
||||
<![CDATA[
|
||||
and create_time <= str_to_date(concat(#{endDate},' 23:59:59'), '%Y-%m-%d %H:%i:%s')
|
||||
]]>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user