INSERT INTO dy_check_statistics (ID, data_date, statistics_type, order_type, province_name, pay_amount, post_amount, promotion_amount, author_coupon_subsidy, actual_zt_pay_promotion, actual_zr_pay_promotion, refund_amount, platform_service_fee, commission, channel_fee, colonel_service_fee, channel_promotion_fee, other_sharing_amount, packing_amount, yfx_amount, promotion_amount_yf, jylp_yp_amount, jylp_wp_amount, txje, create_time, creator_name, update_time, updater_name, deleted, remark) select #{id}, #{date}, '1', NULL, NULL, IFNULL(sum(a.pay_amount),0), IFNULL(sum(a.post_amount),0), IFNULL(sum(a.promotion_amount),0), IFNULL(sum(a.author_coupon_subsidy),0), IFNULL(sum(a.actual_zt_pay_promotion),0), IFNULL(sum(a.actual_zr_pay_promotion),0), IFNULL(sum(a.refund_amount),0), IFNULL(sum(a.platform_service_fee),0), IFNULL(sum(a.commission),0), IFNULL(sum(a.channel_fee),0), IFNULL(sum(a.colonel_service_fee),0), IFNULL(sum(a.channel_promotion_fee),0), IFNULL(sum(a.other_sharing_amount),0), IFNULL(sum(a.packing_amount),0), IFNULL(sum(a.yfx_amount),0), IFNULL(sum(a.promotion_amount_yf),0), IFNULL(sum(a.jylp_yp_amount),0), IFNULL(sum(a.jylp_wp_amount),0), #{txje}, now(), 'system', now(), 'system', 0, NULL from ${fromTable} a
最新发布