|
@@ -2,6 +2,335 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="cn.com.ctop.kuaishou.modules.batch.mapper.KuaishouSupplyChainMapper">
|
|
|
|
|
|
+
|
|
|
+ <insert id="replaceRuixuanSupplyChains">
|
|
|
+ replace into ruixuan.kuaishou_supply_chain(
|
|
|
+ oid,
|
|
|
+ item_id,
|
|
|
+ item_title,
|
|
|
+ reserve_price,
|
|
|
+ image_url,
|
|
|
+ order_status,
|
|
|
+ order_create_time,
|
|
|
+ send_status,
|
|
|
+ settlement_biz_type,
|
|
|
+ settlement_biz_type_desc,
|
|
|
+ send_time,
|
|
|
+ recv_time,
|
|
|
+ seller_id,
|
|
|
+ promoter_id,
|
|
|
+ promoter_nick_name,
|
|
|
+ activity_id,
|
|
|
+ order_amount,
|
|
|
+ pay_amount,
|
|
|
+ regimental_promotion_rate,
|
|
|
+ share_rate,
|
|
|
+ base_amount,
|
|
|
+ service_amount,
|
|
|
+ regimental_promotion_amount,
|
|
|
+ total_regimental_settle_amount,
|
|
|
+ stat_date,
|
|
|
+ stat_hour,
|
|
|
+ item_commission_rate
|
|
|
+ )
|
|
|
+ values
|
|
|
+ <foreach collection="adds" item="add" separator=",">
|
|
|
+ (
|
|
|
+ #{add.oid},
|
|
|
+ #{add.itemId},
|
|
|
+ #{add.itemTitle},
|
|
|
+ #{add.reservePrice},
|
|
|
+ #{add.imageUrl},
|
|
|
+ #{add.orderStatus},
|
|
|
+ #{add.orderCreateTime},
|
|
|
+ #{add.sendStatus},
|
|
|
+ #{add.settlementBizType},
|
|
|
+ #{add.settlementBizTypeDesc},
|
|
|
+ #{add.sendTime},
|
|
|
+ #{add.recvTime},
|
|
|
+ #{add.sellerId},
|
|
|
+ #{add.promoterId},
|
|
|
+ #{add.promoterNickName},
|
|
|
+ #{add.activityId},
|
|
|
+ #{add.orderAmount},
|
|
|
+ #{add.payAmount},
|
|
|
+ #{add.regimentalPromotionRate},
|
|
|
+ #{add.shareRate},
|
|
|
+ #{add.baseAmount},
|
|
|
+ #{add.serviceAmount},
|
|
|
+ #{add.regimentalPromotionAmount},
|
|
|
+ #{add.totalRegimentalSettleAmount},
|
|
|
+ #{add.statDate},
|
|
|
+ #{add.statHour},
|
|
|
+ #{add.itemCommissionRate}
|
|
|
+ )
|
|
|
+
|
|
|
+ </foreach>
|
|
|
+
|
|
|
+
|
|
|
+ </insert>
|
|
|
+ <insert id="replaceMgsSupplyChains">
|
|
|
+ replace into miaogousi.kuaishou_supply_chain(
|
|
|
+ oid,
|
|
|
+ item_id,
|
|
|
+ item_title,
|
|
|
+ reserve_price,
|
|
|
+ image_url,
|
|
|
+ order_status,
|
|
|
+ order_create_time,
|
|
|
+ send_status,
|
|
|
+ settlement_biz_type,
|
|
|
+ settlement_biz_type_desc,
|
|
|
+ send_time,
|
|
|
+ recv_time,
|
|
|
+ seller_id,
|
|
|
+ promoter_id,
|
|
|
+ promoter_nick_name,
|
|
|
+ activity_id,
|
|
|
+ order_amount,
|
|
|
+ pay_amount,
|
|
|
+ regimental_promotion_rate,
|
|
|
+ share_rate,
|
|
|
+ base_amount,
|
|
|
+ service_amount,
|
|
|
+ regimental_promotion_amount,
|
|
|
+ total_regimental_settle_amount,
|
|
|
+ stat_date,
|
|
|
+ stat_hour,
|
|
|
+ item_commission_rate
|
|
|
+ )
|
|
|
+ values
|
|
|
+ <foreach collection="adds" item="add" separator=",">
|
|
|
+ (
|
|
|
+ #{add.oid},
|
|
|
+ #{add.itemId},
|
|
|
+ #{add.itemTitle},
|
|
|
+ #{add.reservePrice},
|
|
|
+ #{add.imageUrl},
|
|
|
+ #{add.orderStatus},
|
|
|
+ #{add.orderCreateTime},
|
|
|
+ #{add.sendStatus},
|
|
|
+ #{add.settlementBizType},
|
|
|
+ #{add.settlementBizTypeDesc},
|
|
|
+ #{add.sendTime},
|
|
|
+ #{add.recvTime},
|
|
|
+ #{add.sellerId},
|
|
|
+ #{add.promoterId},
|
|
|
+ #{add.promoterNickName},
|
|
|
+ #{add.activityId},
|
|
|
+ #{add.orderAmount},
|
|
|
+ #{add.payAmount},
|
|
|
+ #{add.regimentalPromotionRate},
|
|
|
+ #{add.shareRate},
|
|
|
+ #{add.baseAmount},
|
|
|
+ #{add.serviceAmount},
|
|
|
+ #{add.regimentalPromotionAmount},
|
|
|
+ #{add.totalRegimentalSettleAmount},
|
|
|
+ #{add.statDate},
|
|
|
+ #{add.statHour},
|
|
|
+ #{add.itemCommissionRate}
|
|
|
+ )
|
|
|
+
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+ <insert id="replaceRocketSupplyChains">
|
|
|
+ replace into rocket.kuaishou_supply_chain(
|
|
|
+ oid,
|
|
|
+ item_id,
|
|
|
+ item_title,
|
|
|
+ reserve_price,
|
|
|
+ image_url,
|
|
|
+ order_status,
|
|
|
+ order_create_time,
|
|
|
+ send_status,
|
|
|
+ settlement_biz_type,
|
|
|
+ settlement_biz_type_desc,
|
|
|
+ send_time,
|
|
|
+ recv_time,
|
|
|
+ seller_id,
|
|
|
+ promoter_id,
|
|
|
+ promoter_nick_name,
|
|
|
+ activity_id,
|
|
|
+ order_amount,
|
|
|
+ pay_amount,
|
|
|
+ regimental_promotion_rate,
|
|
|
+ share_rate,
|
|
|
+ base_amount,
|
|
|
+ service_amount,
|
|
|
+ regimental_promotion_amount,
|
|
|
+ total_regimental_settle_amount,
|
|
|
+ stat_date,
|
|
|
+ stat_hour,
|
|
|
+ item_commission_rate
|
|
|
+ )
|
|
|
+ values
|
|
|
+ <foreach collection="adds" item="add" separator=",">
|
|
|
+ (
|
|
|
+ #{add.oid},
|
|
|
+ #{add.itemId},
|
|
|
+ #{add.itemTitle},
|
|
|
+ #{add.reservePrice},
|
|
|
+ #{add.imageUrl},
|
|
|
+ #{add.orderStatus},
|
|
|
+ #{add.orderCreateTime},
|
|
|
+ #{add.sendStatus},
|
|
|
+ #{add.settlementBizType},
|
|
|
+ #{add.settlementBizTypeDesc},
|
|
|
+ #{add.sendTime},
|
|
|
+ #{add.recvTime},
|
|
|
+ #{add.sellerId},
|
|
|
+ #{add.promoterId},
|
|
|
+ #{add.promoterNickName},
|
|
|
+ #{add.activityId},
|
|
|
+ #{add.orderAmount},
|
|
|
+ #{add.payAmount},
|
|
|
+ #{add.regimentalPromotionRate},
|
|
|
+ #{add.shareRate},
|
|
|
+ #{add.baseAmount},
|
|
|
+ #{add.serviceAmount},
|
|
|
+ #{add.regimentalPromotionAmount},
|
|
|
+ #{add.totalRegimentalSettleAmount},
|
|
|
+ #{add.statDate},
|
|
|
+ #{add.statHour},
|
|
|
+ #{add.itemCommissionRate}
|
|
|
+ )
|
|
|
+
|
|
|
+ </foreach>
|
|
|
+
|
|
|
+ </insert>
|
|
|
+ <insert id="replaceYufuSupplyChains">
|
|
|
+ replace into yufu.kuaishou_supply_chain(
|
|
|
+ oid,
|
|
|
+ item_id,
|
|
|
+ item_title,
|
|
|
+ reserve_price,
|
|
|
+ image_url,
|
|
|
+ order_status,
|
|
|
+ order_create_time,
|
|
|
+ send_status,
|
|
|
+ settlement_biz_type,
|
|
|
+ settlement_biz_type_desc,
|
|
|
+ send_time,
|
|
|
+ recv_time,
|
|
|
+ seller_id,
|
|
|
+ promoter_id,
|
|
|
+ promoter_nick_name,
|
|
|
+ activity_id,
|
|
|
+ order_amount,
|
|
|
+ pay_amount,
|
|
|
+ regimental_promotion_rate,
|
|
|
+ share_rate,
|
|
|
+ base_amount,
|
|
|
+ service_amount,
|
|
|
+ regimental_promotion_amount,
|
|
|
+ total_regimental_settle_amount,
|
|
|
+ stat_date,
|
|
|
+ stat_hour,
|
|
|
+ item_commission_rate
|
|
|
+ )
|
|
|
+ values
|
|
|
+ <foreach collection="adds" item="add" separator=",">
|
|
|
+ (
|
|
|
+ #{add.oid},
|
|
|
+ #{add.itemId},
|
|
|
+ #{add.itemTitle},
|
|
|
+ #{add.reservePrice},
|
|
|
+ #{add.imageUrl},
|
|
|
+ #{add.orderStatus},
|
|
|
+ #{add.orderCreateTime},
|
|
|
+ #{add.sendStatus},
|
|
|
+ #{add.settlementBizType},
|
|
|
+ #{add.settlementBizTypeDesc},
|
|
|
+ #{add.sendTime},
|
|
|
+ #{add.recvTime},
|
|
|
+ #{add.sellerId},
|
|
|
+ #{add.promoterId},
|
|
|
+ #{add.promoterNickName},
|
|
|
+ #{add.activityId},
|
|
|
+ #{add.orderAmount},
|
|
|
+ #{add.payAmount},
|
|
|
+ #{add.regimentalPromotionRate},
|
|
|
+ #{add.shareRate},
|
|
|
+ #{add.baseAmount},
|
|
|
+ #{add.serviceAmount},
|
|
|
+ #{add.regimentalPromotionAmount},
|
|
|
+ #{add.totalRegimentalSettleAmount},
|
|
|
+ #{add.statDate},
|
|
|
+ #{add.statHour},
|
|
|
+ #{add.itemCommissionRate}
|
|
|
+ )
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+ <insert id="replaceYuXiuSupplyChains">
|
|
|
+ replace into yuxiu.kuaishou_supply_chain(
|
|
|
+ oid,
|
|
|
+ item_id,
|
|
|
+ item_title,
|
|
|
+ reserve_price,
|
|
|
+ image_url,
|
|
|
+ order_status,
|
|
|
+ order_create_time,
|
|
|
+ send_status,
|
|
|
+ settlement_biz_type,
|
|
|
+ settlement_biz_type_desc,
|
|
|
+ send_time,
|
|
|
+ recv_time,
|
|
|
+ seller_id,
|
|
|
+ promoter_id,
|
|
|
+ promoter_nick_name,
|
|
|
+ activity_id,
|
|
|
+ order_amount,
|
|
|
+ pay_amount,
|
|
|
+ regimental_promotion_rate,
|
|
|
+ share_rate,
|
|
|
+ base_amount,
|
|
|
+ service_amount,
|
|
|
+ regimental_promotion_amount,
|
|
|
+ total_regimental_settle_amount,
|
|
|
+ stat_date,
|
|
|
+ stat_hour,
|
|
|
+ item_commission_rate
|
|
|
+ )
|
|
|
+ values
|
|
|
+ <foreach collection="adds" item="add" separator=",">
|
|
|
+ (
|
|
|
+ #{add.oid},
|
|
|
+ #{add.itemId},
|
|
|
+ #{add.itemTitle},
|
|
|
+ #{add.reservePrice},
|
|
|
+ #{add.imageUrl},
|
|
|
+ #{add.orderStatus},
|
|
|
+ #{add.orderCreateTime},
|
|
|
+ #{add.sendStatus},
|
|
|
+ #{add.settlementBizType},
|
|
|
+ #{add.settlementBizTypeDesc},
|
|
|
+ #{add.sendTime},
|
|
|
+ #{add.recvTime},
|
|
|
+ #{add.sellerId},
|
|
|
+ #{add.promoterId},
|
|
|
+ #{add.promoterNickName},
|
|
|
+ #{add.activityId},
|
|
|
+ #{add.orderAmount},
|
|
|
+ #{add.payAmount},
|
|
|
+ #{add.regimentalPromotionRate},
|
|
|
+ #{add.shareRate},
|
|
|
+ #{add.baseAmount},
|
|
|
+ #{add.serviceAmount},
|
|
|
+ #{add.regimentalPromotionAmount},
|
|
|
+ #{add.totalRegimentalSettleAmount},
|
|
|
+ #{add.statDate},
|
|
|
+ #{add.statHour},
|
|
|
+ #{add.itemCommissionRate}
|
|
|
+ )
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<insert id="cleanKuaiShouPromoterBindChannel" parameterType="java.lang.Long">
|
|
|
insert into ruixuan.promoter_bind_channel_date (promoter_id, promoter_name,promoter_url, user_id, user_name, stat_date,media_id)
|
|
|
select t1.promoter_id, t1.promoter_nick_name, t1.promoter_url,t1.user_id, t1.user_name, #{date},media_id
|
|
@@ -203,6 +532,32 @@
|
|
|
AND t1.media_id = 2
|
|
|
GROUP BY t1.item_id
|
|
|
</insert>
|
|
|
+ <insert id="cleanYuXiuKuaiShouPromoterBindChannel" parameterType="java.lang.Long">
|
|
|
+ INSERT INTO yuxiu.promoter_bind_channel_date (promoter_id, promoter_name, promoter_url, user_id, user_name,
|
|
|
+ stat_date, media_id)
|
|
|
+ SELECT t1.promoter_id, t1.promoter_nick_name, t1.promoter_url, t1.user_id, t1.user_name, #{date}, media_id
|
|
|
+ FROM yuxiu.kuaishou_promoter t1
|
|
|
+ LEFT JOIN yuxiu.sys_user_role t2
|
|
|
+ ON t1.user_id = t2.user_id
|
|
|
+ LEFT JOIN yuxiu.sys_role t3
|
|
|
+ ON t2.role_id = t3.role_id
|
|
|
+ WHERE 1 = 1
|
|
|
+ AND t1.media_id = '2'
|
|
|
+ AND t3.role_key IN ('bdManager', 'bd')
|
|
|
+ AND date_format(t1.create_time, '%Y%m%d') < #{date}
|
|
|
+ GROUP BY t1.promoter_id
|
|
|
+
|
|
|
+
|
|
|
+ </insert>
|
|
|
+ <insert id="cleanYuXiuItemBindCourtship" parameterType="java.lang.Long">
|
|
|
+ INSERT INTO yuxiu.item_bind_courtship_date (item_id, item_name, item_url, user_id, user_name, stat_date,
|
|
|
+ media_id)
|
|
|
+ SELECT t1.item_id, t1.item_title, t1.item_img_url, t1.user_id, t1.user_name, #{date}, media_id
|
|
|
+ FROM yuxiu.kuaishou_item_list t1
|
|
|
+ WHERE date_format(t1.create_time, '%Y%m%d') < #{date}
|
|
|
+ AND t1.media_id = 2
|
|
|
+ GROUP BY t1.item_id
|
|
|
+ </insert>
|
|
|
<delete id="deletePromoterBindChannelByDate" parameterType="java.lang.Long">
|
|
|
delete from ruixuan.promoter_bind_channel_date where stat_date = #{date}
|
|
|
</delete>
|
|
@@ -240,6 +595,17 @@
|
|
|
FROM yufu.item_bind_courtship_date
|
|
|
WHERE stat_date = #{date}
|
|
|
</delete>
|
|
|
+ <delete id="deleteYuXiuPromoterBindChannelByDate" parameterType="java.lang.Long">
|
|
|
+ DELETE
|
|
|
+ FROM yuxiu.promoter_bind_channel_date
|
|
|
+ WHERE stat_date = #{date}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteYuXiuItemBindCourtshipByDate" parameterType="java.lang.Long">
|
|
|
+ DELETE
|
|
|
+ FROM yuxiu.item_bind_courtship_date
|
|
|
+ WHERE stat_date = #{date}
|
|
|
+
|
|
|
+ </delete>
|
|
|
<select id="getCookie" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
|
|
select id ,cookie from ruixuan.kuaishou_supply_chain_cookie
|