|
@@ -252,131 +252,129 @@
|
|
<select id="totalByDate" resultType="com.yiqi.core.domain.SettlementStoreStatistics">
|
|
<select id="totalByDate" resultType="com.yiqi.core.domain.SettlementStoreStatistics">
|
|
select
|
|
select
|
|
day,
|
|
day,
|
|
- sum(cloth_order_amount) as clothOrderAmount,
|
|
|
|
- sum(cloth_appoint_count) as clothAppointCount,
|
|
|
|
- sum(cloth_receive_amount) as clothReceiveAmount,
|
|
|
|
- sum(cloth_refund_amount) as clothRefundAmount,
|
|
|
|
- sum(cloth_order_count) as clothOrderCount,
|
|
|
|
- sum(cloth_count) as clothCount,
|
|
|
|
- sum(cloth_alipay_amount) as clothAlipayAmount,
|
|
|
|
- sum(cloth_wechat_amount) as clothWechatAmount,
|
|
|
|
- sum(cloth_cash_amount) as clothCashAmount,
|
|
|
|
- sum(cloth_union_amount) as clothUnionAmount,
|
|
|
|
- sum(cloth_member_amount) as clothMemberAmount,
|
|
|
|
- sum(cloth_alipay_refund_amount) as clothAlipayRefundAmount,
|
|
|
|
- sum(cloth_wechat_refund_amount) as clothWechatRefundAmount,
|
|
|
|
- sum(cloth_cash_refund_amount) as clothCashRefundAmount,
|
|
|
|
- sum(cloth_union_refund_amount) as clothUnionRefundAmount,
|
|
|
|
- sum(cloth_member_refund_amount) as clothMemberRefundAmount,
|
|
|
|
- sum(goods_order_amount) as goodsOrderAmount,
|
|
|
|
- sum(goods_receive_amount) as goodsReceiveAmount,
|
|
|
|
- sum(goods_refund_amount) as goodsRefundAmount,
|
|
|
|
- sum(goods_order_count) as goodsOrderCount,
|
|
|
|
- sum(goods_count) as goodsCount,
|
|
|
|
- sum(goods_alipay_amount) as goodsAlipayAmount,
|
|
|
|
- sum(goods_wechat_amount) as goodsWechatAmount,
|
|
|
|
- sum(goods_cash_amount) as goodsCashAmount,
|
|
|
|
- sum(goods_union_amount) as goodsUnionAmount,
|
|
|
|
- sum(goods_member_amount) as goodsMemberAmount,
|
|
|
|
- sum(goods_order_refund_amount) as goodsOrderRefundAmount,
|
|
|
|
- sum(goods_alipay_refund_amount) as goodsAlipayRefundAmount,
|
|
|
|
- sum(goods_wechat_refund_amount) as goodsWechatRefundAmount,
|
|
|
|
- sum(goods_cash_refund_amount) as goodsCashRefundAmount,
|
|
|
|
- sum(goods_union_refund_amount) as goodsUnionRefundAmount,
|
|
|
|
- sum(goods_member_refund_amount) as goodsMemberRefundAmount,
|
|
|
|
-
|
|
|
|
- sum(charge_refund_arrive_amount) as chargeRefundArriveAmount,
|
|
|
|
- sum(charge_refund_amount) as chargeRefundAmount,
|
|
|
|
- sum(charge_arrive_amount) as chargeArriveAmount,
|
|
|
|
- sum(charge_amount) as chargeAmount,
|
|
|
|
- sum(charge_refund_count) as chargeRefundCount,
|
|
|
|
- sum(charge_count) as chargeCount
|
|
|
|
|
|
+ IFNULL(SUM(cloth_order_amount), 0) AS clothOrderAmount,
|
|
|
|
+ IFNULL(SUM(cloth_appoint_count), 0) AS clothAppointCount,
|
|
|
|
+ IFNULL(SUM(cloth_receive_amount), 0) AS clothReceiveAmount,
|
|
|
|
+ IFNULL(SUM(cloth_refund_amount), 0) AS clothRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_order_count), 0) AS clothOrderCount,
|
|
|
|
+ IFNULL(SUM(cloth_count), 0) AS clothCount,
|
|
|
|
+ IFNULL(SUM(cloth_alipay_amount), 0) AS clothAlipayAmount,
|
|
|
|
+ IFNULL(SUM(cloth_wechat_amount), 0) AS clothWechatAmount,
|
|
|
|
+ IFNULL(SUM(cloth_cash_amount), 0) AS clothCashAmount,
|
|
|
|
+ IFNULL(SUM(cloth_union_amount), 0) AS clothUnionAmount,
|
|
|
|
+ IFNULL(SUM(cloth_member_amount), 0) AS clothMemberAmount,
|
|
|
|
+ IFNULL(SUM(cloth_alipay_refund_amount), 0) AS clothAlipayRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_wechat_refund_amount), 0) AS clothWechatRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_cash_refund_amount), 0) AS clothCashRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_union_refund_amount), 0) AS clothUnionRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_member_refund_amount), 0) AS clothMemberRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_order_amount), 0) AS goodsOrderAmount,
|
|
|
|
+ IFNULL(SUM(goods_receive_amount), 0) AS goodsReceiveAmount,
|
|
|
|
+ IFNULL(SUM(goods_refund_amount), 0) AS goodsRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_order_count), 0) AS goodsOrderCount,
|
|
|
|
+ IFNULL(SUM(goods_count), 0) AS goodsCount,
|
|
|
|
+ IFNULL(SUM(goods_alipay_amount), 0) AS goodsAlipayAmount,
|
|
|
|
+ IFNULL(SUM(goods_wechat_amount), 0) AS goodsWechatAmount,
|
|
|
|
+ IFNULL(SUM(goods_cash_amount), 0) AS goodsCashAmount,
|
|
|
|
+ IFNULL(SUM(goods_union_amount), 0) AS goodsUnionAmount,
|
|
|
|
+ IFNULL(SUM(goods_member_amount), 0) AS goodsMemberAmount,
|
|
|
|
+ IFNULL(SUM(goods_order_refund_amount), 0) AS goodsOrderRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_alipay_refund_amount), 0) AS goodsAlipayRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_wechat_refund_amount), 0) AS goodsWechatRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_cash_refund_amount), 0) AS goodsCashRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_union_refund_amount), 0) AS goodsUnionRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_member_refund_amount), 0) AS goodsMemberRefundAmount,
|
|
|
|
+ IFNULL(SUM(charge_refund_arrive_amount), 0) AS chargeRefundArriveAmount,
|
|
|
|
+ IFNULL(SUM(charge_refund_amount), 0) AS chargeRefundAmount,
|
|
|
|
+ IFNULL(SUM(charge_arrive_amount), 0) AS chargeArriveAmount,
|
|
|
|
+ IFNULL(SUM(charge_amount), 0) AS chargeAmount,
|
|
|
|
+ IFNULL(SUM(charge_refund_count), 0) AS chargeRefundCount,
|
|
|
|
+ IFNULL(SUM(charge_count), 0) AS chargeCount
|
|
from settlement_store_statistics where day >= #{startDay} and day <= #{endDay} group by day order by day asc
|
|
from settlement_store_statistics where day >= #{startDay} and day <= #{endDay} group by day order by day asc
|
|
</select>
|
|
</select>
|
|
<select id="totalByStore" resultType="com.yiqi.core.domain.SettlementStoreStatistics">
|
|
<select id="totalByStore" resultType="com.yiqi.core.domain.SettlementStoreStatistics">
|
|
select
|
|
select
|
|
store_id as storeId,
|
|
store_id as storeId,
|
|
- sum(cloth_order_amount) as clothOrderAmount,
|
|
|
|
- sum(cloth_appoint_count) as clothAppointCount,
|
|
|
|
- sum(cloth_receive_amount) as clothReceiveAmount,
|
|
|
|
- sum(cloth_refund_amount) as clothRefundAmount,
|
|
|
|
- sum(cloth_order_count) as clothOrderCount,
|
|
|
|
- sum(cloth_count) as clothCount,
|
|
|
|
- sum(cloth_alipay_amount) as clothAlipayAmount,
|
|
|
|
- sum(cloth_wechat_amount) as clothWechatAmount,
|
|
|
|
- sum(cloth_cash_amount) as clothCashAmount,
|
|
|
|
- sum(cloth_union_amount) as clothUnionAmount,
|
|
|
|
- sum(cloth_member_amount) as clothMemberAmount,
|
|
|
|
- sum(cloth_alipay_refund_amount) as clothAlipayRefundAmount,
|
|
|
|
- sum(cloth_wechat_refund_amount) as clothWechatRefundAmount,
|
|
|
|
- sum(cloth_cash_refund_amount) as clothCashRefundAmount,
|
|
|
|
- sum(cloth_union_refund_amount) as clothUnionRefundAmount,
|
|
|
|
- sum(cloth_member_refund_amount) as clothMemberRefundAmount,
|
|
|
|
- sum(goods_order_amount) as goodsOrderAmount,
|
|
|
|
- sum(goods_receive_amount) as goodsReceiveAmount,
|
|
|
|
- sum(goods_refund_amount) as goodsRefundAmount,
|
|
|
|
- sum(goods_order_count) as goodsOrderCount,
|
|
|
|
- sum(goods_count) as goodsCount,
|
|
|
|
- sum(goods_alipay_amount) as goodsAlipayAmount,
|
|
|
|
- sum(goods_wechat_amount) as goodsWechatAmount,
|
|
|
|
- sum(goods_cash_amount) as goodsCashAmount,
|
|
|
|
- sum(goods_union_amount) as goodsUnionAmount,
|
|
|
|
- sum(goods_member_amount) as goodsMemberAmount,
|
|
|
|
- sum(goods_order_refund_amount) as goodsOrderRefundAmount,
|
|
|
|
- sum(goods_alipay_refund_amount) as goodsAlipayRefundAmount,
|
|
|
|
- sum(goods_wechat_refund_amount) as goodsWechatRefundAmount,
|
|
|
|
- sum(goods_cash_refund_amount) as goodsCashRefundAmount,
|
|
|
|
- sum(goods_union_refund_amount) as goodsUnionRefundAmount,
|
|
|
|
- sum(goods_member_refund_amount) as goodsMemberRefundAmount,
|
|
|
|
-
|
|
|
|
- sum(charge_refund_arrive_amount) as chargeRefundArriveAmount,
|
|
|
|
- sum(charge_refund_amount) as chargeRefundAmount,
|
|
|
|
- sum(charge_arrive_amount) as chargeArriveAmount,
|
|
|
|
- sum(charge_amount) as chargeAmount,
|
|
|
|
- sum(charge_refund_count) as chargeRefundCount,
|
|
|
|
- sum(charge_count) as chargeCount
|
|
|
|
|
|
+ IFNULL(SUM(cloth_order_amount), 0) AS clothOrderAmount,
|
|
|
|
+ IFNULL(SUM(cloth_appoint_count), 0) AS clothAppointCount,
|
|
|
|
+ IFNULL(SUM(cloth_receive_amount), 0) AS clothReceiveAmount,
|
|
|
|
+ IFNULL(SUM(cloth_refund_amount), 0) AS clothRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_order_count), 0) AS clothOrderCount,
|
|
|
|
+ IFNULL(SUM(cloth_count), 0) AS clothCount,
|
|
|
|
+ IFNULL(SUM(cloth_alipay_amount), 0) AS clothAlipayAmount,
|
|
|
|
+ IFNULL(SUM(cloth_wechat_amount), 0) AS clothWechatAmount,
|
|
|
|
+ IFNULL(SUM(cloth_cash_amount), 0) AS clothCashAmount,
|
|
|
|
+ IFNULL(SUM(cloth_union_amount), 0) AS clothUnionAmount,
|
|
|
|
+ IFNULL(SUM(cloth_member_amount), 0) AS clothMemberAmount,
|
|
|
|
+ IFNULL(SUM(cloth_alipay_refund_amount), 0) AS clothAlipayRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_wechat_refund_amount), 0) AS clothWechatRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_cash_refund_amount), 0) AS clothCashRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_union_refund_amount), 0) AS clothUnionRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_member_refund_amount), 0) AS clothMemberRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_order_amount), 0) AS goodsOrderAmount,
|
|
|
|
+ IFNULL(SUM(goods_receive_amount), 0) AS goodsReceiveAmount,
|
|
|
|
+ IFNULL(SUM(goods_refund_amount), 0) AS goodsRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_order_count), 0) AS goodsOrderCount,
|
|
|
|
+ IFNULL(SUM(goods_count), 0) AS goodsCount,
|
|
|
|
+ IFNULL(SUM(goods_alipay_amount), 0) AS goodsAlipayAmount,
|
|
|
|
+ IFNULL(SUM(goods_wechat_amount), 0) AS goodsWechatAmount,
|
|
|
|
+ IFNULL(SUM(goods_cash_amount), 0) AS goodsCashAmount,
|
|
|
|
+ IFNULL(SUM(goods_union_amount), 0) AS goodsUnionAmount,
|
|
|
|
+ IFNULL(SUM(goods_member_amount), 0) AS goodsMemberAmount,
|
|
|
|
+ IFNULL(SUM(goods_order_refund_amount), 0) AS goodsOrderRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_alipay_refund_amount), 0) AS goodsAlipayRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_wechat_refund_amount), 0) AS goodsWechatRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_cash_refund_amount), 0) AS goodsCashRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_union_refund_amount), 0) AS goodsUnionRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_member_refund_amount), 0) AS goodsMemberRefundAmount,
|
|
|
|
+ IFNULL(SUM(charge_refund_arrive_amount), 0) AS chargeRefundArriveAmount,
|
|
|
|
+ IFNULL(SUM(charge_refund_amount), 0) AS chargeRefundAmount,
|
|
|
|
+ IFNULL(SUM(charge_arrive_amount), 0) AS chargeArriveAmount,
|
|
|
|
+ IFNULL(SUM(charge_amount), 0) AS chargeAmount,
|
|
|
|
+ IFNULL(SUM(charge_refund_count), 0) AS chargeRefundCount,
|
|
|
|
+ IFNULL(SUM(charge_count), 0) AS chargeCount
|
|
from settlement_store_statistics where day >= #{startDay} and day <= #{endDay} and store_id !=0 group by store_id order by clothOrderAmount desc
|
|
from settlement_store_statistics where day >= #{startDay} and day <= #{endDay} and store_id !=0 group by store_id order by clothOrderAmount desc
|
|
</select>
|
|
</select>
|
|
<select id="orderStatistics" resultType="com.yiqi.core.domain.SettlementStoreStatistics">
|
|
<select id="orderStatistics" resultType="com.yiqi.core.domain.SettlementStoreStatistics">
|
|
select
|
|
select
|
|
- sum(cloth_order_amount) as clothOrderAmount,
|
|
|
|
- sum(cloth_appoint_count) as clothAppointCount,
|
|
|
|
- sum(cloth_receive_amount) as clothReceiveAmount,
|
|
|
|
- sum(cloth_refund_amount) as clothRefundAmount,
|
|
|
|
- sum(cloth_order_count) as clothOrderCount,
|
|
|
|
- sum(cloth_count) as clothCount,
|
|
|
|
- sum(cloth_alipay_amount) as clothAlipayAmount,
|
|
|
|
- sum(cloth_wechat_amount) as clothWechatAmount,
|
|
|
|
- sum(cloth_cash_amount) as clothCashAmount,
|
|
|
|
- sum(cloth_union_amount) as clothUnionAmount,
|
|
|
|
- sum(cloth_member_amount) as clothMemberAmount,
|
|
|
|
- sum(cloth_alipay_refund_amount) as clothAlipayRefundAmount,
|
|
|
|
- sum(cloth_wechat_refund_amount) as clothWechatRefundAmount,
|
|
|
|
- sum(cloth_cash_refund_amount) as clothCashRefundAmount,
|
|
|
|
- sum(cloth_union_refund_amount) as clothUnionRefundAmount,
|
|
|
|
- sum(cloth_member_refund_amount) as clothMemberRefundAmount,
|
|
|
|
- sum(goods_order_amount) as goodsOrderAmount,
|
|
|
|
- sum(goods_receive_amount) as goodsReceiveAmount,
|
|
|
|
- sum(goods_refund_amount) as goodsRefundAmount,
|
|
|
|
- sum(goods_order_count) as goodsOrderCount,
|
|
|
|
- sum(goods_count) as goodsCount,
|
|
|
|
- sum(goods_alipay_amount) as goodsAlipayAmount,
|
|
|
|
- sum(goods_wechat_amount) as goodsWechatAmount,
|
|
|
|
- sum(goods_cash_amount) as goodsCashAmount,
|
|
|
|
- sum(goods_union_amount) as goodsUnionAmount,
|
|
|
|
- sum(goods_member_amount) as goodsMemberAmount,
|
|
|
|
- sum(goods_order_refund_amount) as goodsOrderRefundAmount,
|
|
|
|
- sum(goods_alipay_refund_amount) as goodsAlipayRefundAmount,
|
|
|
|
- sum(goods_wechat_refund_amount) as goodsWechatRefundAmount,
|
|
|
|
- sum(goods_cash_refund_amount) as goodsCashRefundAmount,
|
|
|
|
- sum(goods_union_refund_amount) as goodsUnionRefundAmount,
|
|
|
|
- sum(goods_member_refund_amount) as goodsMemberRefundAmount,
|
|
|
|
- sum(charge_refund_arrive_amount) as chargeRefundArriveAmount,
|
|
|
|
- sum(charge_refund_amount) as chargeRefundAmount,
|
|
|
|
- sum(charge_arrive_amount) as chargeArriveAmount,
|
|
|
|
- sum(charge_amount) as chargeAmount,
|
|
|
|
- sum(charge_refund_count) as chargeRefundCount,
|
|
|
|
- sum(charge_count) as chargeCount
|
|
|
|
|
|
+ IFNULL(SUM(cloth_order_amount), 0) AS clothOrderAmount,
|
|
|
|
+ IFNULL(SUM(cloth_appoint_count), 0) AS clothAppointCount,
|
|
|
|
+ IFNULL(SUM(cloth_receive_amount), 0) AS clothReceiveAmount,
|
|
|
|
+ IFNULL(SUM(cloth_refund_amount), 0) AS clothRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_order_count), 0) AS clothOrderCount,
|
|
|
|
+ IFNULL(SUM(cloth_count), 0) AS clothCount,
|
|
|
|
+ IFNULL(SUM(cloth_alipay_amount), 0) AS clothAlipayAmount,
|
|
|
|
+ IFNULL(SUM(cloth_wechat_amount), 0) AS clothWechatAmount,
|
|
|
|
+ IFNULL(SUM(cloth_cash_amount), 0) AS clothCashAmount,
|
|
|
|
+ IFNULL(SUM(cloth_union_amount), 0) AS clothUnionAmount,
|
|
|
|
+ IFNULL(SUM(cloth_member_amount), 0) AS clothMemberAmount,
|
|
|
|
+ IFNULL(SUM(cloth_alipay_refund_amount), 0) AS clothAlipayRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_wechat_refund_amount), 0) AS clothWechatRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_cash_refund_amount), 0) AS clothCashRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_union_refund_amount), 0) AS clothUnionRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_member_refund_amount), 0) AS clothMemberRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_order_amount), 0) AS goodsOrderAmount,
|
|
|
|
+ IFNULL(SUM(goods_receive_amount), 0) AS goodsReceiveAmount,
|
|
|
|
+ IFNULL(SUM(goods_refund_amount), 0) AS goodsRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_order_count), 0) AS goodsOrderCount,
|
|
|
|
+ IFNULL(SUM(goods_count), 0) AS goodsCount,
|
|
|
|
+ IFNULL(SUM(goods_alipay_amount), 0) AS goodsAlipayAmount,
|
|
|
|
+ IFNULL(SUM(goods_wechat_amount), 0) AS goodsWechatAmount,
|
|
|
|
+ IFNULL(SUM(goods_cash_amount), 0) AS goodsCashAmount,
|
|
|
|
+ IFNULL(SUM(goods_union_amount), 0) AS goodsUnionAmount,
|
|
|
|
+ IFNULL(SUM(goods_member_amount), 0) AS goodsMemberAmount,
|
|
|
|
+ IFNULL(SUM(goods_order_refund_amount), 0) AS goodsOrderRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_alipay_refund_amount), 0) AS goodsAlipayRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_wechat_refund_amount), 0) AS goodsWechatRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_cash_refund_amount), 0) AS goodsCashRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_union_refund_amount), 0) AS goodsUnionRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_member_refund_amount), 0) AS goodsMemberRefundAmount,
|
|
|
|
+ IFNULL(SUM(charge_refund_arrive_amount), 0) AS chargeRefundArriveAmount,
|
|
|
|
+ IFNULL(SUM(charge_refund_amount), 0) AS chargeRefundAmount,
|
|
|
|
+ IFNULL(SUM(charge_arrive_amount), 0) AS chargeArriveAmount,
|
|
|
|
+ IFNULL(SUM(charge_amount), 0) AS chargeAmount,
|
|
|
|
+ IFNULL(SUM(charge_refund_count), 0) AS chargeRefundCount,
|
|
|
|
+ IFNULL(SUM(charge_count), 0) AS chargeCount
|
|
from settlement_store_statistics where 1 = 1
|
|
from settlement_store_statistics where 1 = 1
|
|
<if test="startDay!=null">
|
|
<if test="startDay!=null">
|
|
and day >= #{startDay}
|
|
and day >= #{startDay}
|
|
@@ -389,5 +387,54 @@
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="orderStatisticsByDate" resultType="com.yiqi.core.domain.SettlementStoreStatistics">
|
|
|
|
+ select
|
|
|
|
+ IFNULL(SUM(cloth_order_amount), 0) AS clothOrderAmount,
|
|
|
|
+ IFNULL(SUM(cloth_appoint_count), 0) AS clothAppointCount,
|
|
|
|
+ IFNULL(SUM(cloth_receive_amount), 0) AS clothReceiveAmount,
|
|
|
|
+ IFNULL(SUM(cloth_refund_amount), 0) AS clothRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_order_count), 0) AS clothOrderCount,
|
|
|
|
+ IFNULL(SUM(cloth_count), 0) AS clothCount,
|
|
|
|
+ IFNULL(SUM(cloth_alipay_amount), 0) AS clothAlipayAmount,
|
|
|
|
+ IFNULL(SUM(cloth_wechat_amount), 0) AS clothWechatAmount,
|
|
|
|
+ IFNULL(SUM(cloth_cash_amount), 0) AS clothCashAmount,
|
|
|
|
+ IFNULL(SUM(cloth_union_amount), 0) AS clothUnionAmount,
|
|
|
|
+ IFNULL(SUM(cloth_member_amount), 0) AS clothMemberAmount,
|
|
|
|
+ IFNULL(SUM(cloth_alipay_refund_amount), 0) AS clothAlipayRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_wechat_refund_amount), 0) AS clothWechatRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_cash_refund_amount), 0) AS clothCashRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_union_refund_amount), 0) AS clothUnionRefundAmount,
|
|
|
|
+ IFNULL(SUM(cloth_member_refund_amount), 0) AS clothMemberRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_order_amount), 0) AS goodsOrderAmount,
|
|
|
|
+ IFNULL(SUM(goods_receive_amount), 0) AS goodsReceiveAmount,
|
|
|
|
+ IFNULL(SUM(goods_refund_amount), 0) AS goodsRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_order_count), 0) AS goodsOrderCount,
|
|
|
|
+ IFNULL(SUM(goods_count), 0) AS goodsCount,
|
|
|
|
+ IFNULL(SUM(goods_alipay_amount), 0) AS goodsAlipayAmount,
|
|
|
|
+ IFNULL(SUM(goods_wechat_amount), 0) AS goodsWechatAmount,
|
|
|
|
+ IFNULL(SUM(goods_cash_amount), 0) AS goodsCashAmount,
|
|
|
|
+ IFNULL(SUM(goods_union_amount), 0) AS goodsUnionAmount,
|
|
|
|
+ IFNULL(SUM(goods_member_amount), 0) AS goodsMemberAmount,
|
|
|
|
+ IFNULL(SUM(goods_order_refund_amount), 0) AS goodsOrderRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_alipay_refund_amount), 0) AS goodsAlipayRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_wechat_refund_amount), 0) AS goodsWechatRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_cash_refund_amount), 0) AS goodsCashRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_union_refund_amount), 0) AS goodsUnionRefundAmount,
|
|
|
|
+ IFNULL(SUM(goods_member_refund_amount), 0) AS goodsMemberRefundAmount,
|
|
|
|
+ IFNULL(SUM(charge_refund_arrive_amount), 0) AS chargeRefundArriveAmount,
|
|
|
|
+ IFNULL(SUM(charge_refund_amount), 0) AS chargeRefundAmount,
|
|
|
|
+ IFNULL(SUM(charge_arrive_amount), 0) AS chargeArriveAmount,
|
|
|
|
+ IFNULL(SUM(charge_amount), 0) AS chargeAmount,
|
|
|
|
+ IFNULL(SUM(charge_refund_count), 0) AS chargeRefundCount,
|
|
|
|
+ IFNULL(SUM(charge_count), 0) AS chargeCount
|
|
|
|
+ from settlement_store_statistics where 1 = 1
|
|
|
|
+ <if test="day!=null">
|
|
|
|
+ and day = #{day}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="storeId != null">
|
|
|
|
+ and store_id = #{storeId}
|
|
|
|
+ </if>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|