|
@@ -283,6 +283,31 @@
|
|
|
ORDER BY shopMoney DESC
|
|
ORDER BY shopMoney DESC
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
+ <select id="selectRankingListAmount" resultType="com.sqx.modules.order.entity.TbOrder">
|
|
|
|
|
+ SELECT ifnull( sum( pay_money ), 0 ) AS shopMoney
|
|
|
|
|
+ FROM tb_order tor left join goods_shop u on tor.shop_id = u.shop_id
|
|
|
|
|
+ left join shop_type gp on gp.id=u.shop_type_id
|
|
|
|
|
+ WHERE tor.shop_id IS NOT NULL and tor.status = 4
|
|
|
|
|
+ <if test="query.startTime != null and query.startTime !=''">
|
|
|
|
|
+ and tor.pay_time >= #{query.startTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="query.endTime != null and query.endTime != ''">
|
|
|
|
|
+ and tor.pay_time <![CDATA[<=]]> #{query.endTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="query.shopType != null and query.shopType != '' ">
|
|
|
|
|
+ and gp.id = #{query.shopType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="query.dateType=='day'">
|
|
|
|
|
+ and date_format(tor.pay_time,'%Y-%m-%d')=date_format(#{query.date},'%Y-%m-%d')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="query.dateType=='month'">
|
|
|
|
|
+ and date_format(tor.pay_time,'%Y-%m')=date_format(#{query.date},'%Y-%m')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="query.dateType=='year'">
|
|
|
|
|
+ and date_format(tor.pay_time,'%Y')=date_format(#{query.date},'%Y')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
<select id="excelShopCenter" resultType="com.sqx.modules.order.entity.TbOrder">
|
|
<select id="excelShopCenter" resultType="com.sqx.modules.order.entity.TbOrder">
|
|
|
SELECT
|
|
SELECT
|
|
|
*,
|
|
*,
|