|
@@ -274,12 +274,64 @@
|
|
|
where id = #{id}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectKuaishouPromoterById3" parameterType="Long" resultType="com.ruixuan.isc.entity.JYKuaishouPromoter">
|
|
|
+ select id,
|
|
|
+ media_id,
|
|
|
+ user_id,
|
|
|
+ user_name,
|
|
|
+ promoter_id,
|
|
|
+ promoter_nick_name,
|
|
|
+ `state`,
|
|
|
+ province,
|
|
|
+ commission_requirement,
|
|
|
+ category_requirement,
|
|
|
+ promoter_url,
|
|
|
+ phone,
|
|
|
+ consignee,
|
|
|
+ promoter_address,
|
|
|
+ total_sale,
|
|
|
+ fans_number,
|
|
|
+ avg_video_sales,
|
|
|
+ video_sales,
|
|
|
+ create_time,
|
|
|
+ update_time
|
|
|
+ from jy_kuaishou_promoter
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="getFailInfo" resultMap="KuaishouPromoterResult">
|
|
|
<include refid="selectKuaishouPromoterVo"/>
|
|
|
where (promoter_nick_name = '' or promoter_nick_name is null)
|
|
|
AND state =1
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+ <select id="getFailInfo3" resultType="com.ruixuan.isc.entity.JYKuaishouPromoter">
|
|
|
+ select id,
|
|
|
+ media_id,
|
|
|
+ user_id,
|
|
|
+ user_name,
|
|
|
+ promoter_id,
|
|
|
+ promoter_nick_name,
|
|
|
+ `state`,
|
|
|
+ province,
|
|
|
+ commission_requirement,
|
|
|
+ category_requirement,
|
|
|
+ promoter_url,
|
|
|
+ phone,
|
|
|
+ consignee,
|
|
|
+ promoter_address,
|
|
|
+ total_sale,
|
|
|
+ fans_number,
|
|
|
+ avg_video_sales,
|
|
|
+ video_sales,
|
|
|
+ create_time,
|
|
|
+ update_time
|
|
|
+ from jy_kuaishou_promoter
|
|
|
+ where (promoter_nick_name = '' or promoter_nick_name is null)
|
|
|
+ AND state = 1
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="getBoundPromoterRoleKey" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
SELECT t1.user_id,
|
|
|
t3.role_key,
|
|
@@ -330,7 +382,7 @@
|
|
|
limit 1
|
|
|
</select>
|
|
|
|
|
|
- <select id="getOneByIdAndPromoterId3" resultMap="KuaishouPromoterResult">
|
|
|
+ <select id="getOneByIdAndPromoterId3" resultType="com.ruixuan.isc.entity.JYKuaishouPromoter">
|
|
|
select
|
|
|
id,
|
|
|
media_id,
|
|
@@ -440,7 +492,7 @@
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
- <insert id="insertKuaishouPromoter3" parameterType="com.ruixuan.isc.entity.KuaishouPromoter" useGeneratedKeys="true"
|
|
|
+ <insert id="insertKuaishouPromoter3" parameterType="com.ruixuan.isc.entity.JYKuaishouPromoter" useGeneratedKeys="true"
|
|
|
keyProperty="id">
|
|
|
insert into jy_kuaishou_promoter
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -527,6 +579,33 @@
|
|
|
where id = #{id}
|
|
|
</update>
|
|
|
|
|
|
+ <update id="updateKuaishouPromoter3" parameterType="com.ruixuan.isc.entity.JYKuaishouPromoter">
|
|
|
+ update jy_kuaishou_promoter
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="userId != null">user_id = #{userId},</if>
|
|
|
+ <if test="mediaId != null">media_id = #{mediaId},</if>
|
|
|
+ <if test="type != null">type = #{type},</if>
|
|
|
+ <if test="userName != null">user_name = #{userName},</if>
|
|
|
+ <if test="promoterId != null">promoter_id = #{promoterId},</if>
|
|
|
+ <if test="promoterNickName != null">promoter_nick_name = #{promoterNickName},</if>
|
|
|
+ <if test="totalSale != null">total_sale = #{totalSale},</if>
|
|
|
+ <if test="fansNumber != null">fans_number = #{fansNumber},</if>
|
|
|
+ <if test="promoterUrl != null">promoter_url = #{promoterUrl},</if>
|
|
|
+ <if test="phone != null">phone = #{phone},</if>
|
|
|
+ <if test="consignee != null">consignee = #{consignee},</if>
|
|
|
+ <if test="promoterAddress != null">promoter_address = #{promoterAddress},</if>
|
|
|
+ <if test="state != null">state = #{state},</if>
|
|
|
+ <if test="province != null">province = #{province},</if>
|
|
|
+ <if test="commissionRequirement != null">commission_requirement = #{commissionRequirement},</if>
|
|
|
+ <if test="categoryRequirement != null">category_requirement = #{categoryRequirement},</if>
|
|
|
+ <if test="avgVideoSales != null">avg_video_sales = #{avgVideoSales},</if>
|
|
|
+ <if test="videoSales != null">video_sales = #{videoSales},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
<update id="updateKuaishouPromoterByPromoterId" parameterType="com.ruixuan.isc.entity.KuaishouPromoter">
|
|
|
update kuaishou_promoter
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
@@ -558,7 +637,7 @@
|
|
|
where promoter_id = #{promoterId}
|
|
|
</update>
|
|
|
|
|
|
- <update id="updateKuaishouPromoterByPromoterId3" parameterType="com.ruixuan.isc.entity.KuaishouPromoter">
|
|
|
+ <update id="updateKuaishouPromoterByPromoterId3" parameterType="com.ruixuan.isc.entity.JYKuaishouPromoter">
|
|
|
update jy_kuaishou_promoter
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="userId != null">user_id = #{userId},</if>
|
|
@@ -596,6 +675,12 @@
|
|
|
where id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
+ <delete id="deleteKuaishouPromoterById3" parameterType="Long">
|
|
|
+ delete
|
|
|
+ from jy_kuaishou_promoter
|
|
|
+ where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
<delete id="deleteKuaishouPromoterByIds" parameterType="String">
|
|
|
delete from kuaishou_promoter where id in
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
@@ -707,7 +792,9 @@
|
|
|
WHERE user_id = #{userId}
|
|
|
</select>
|
|
|
<select id="getRuleName" resultType="java.lang.String" parameterType="java.lang.Long">
|
|
|
- select rule_name from kuaishou_settlement_rules where id = #{ruleId}
|
|
|
+ select rule_name
|
|
|
+ from kuaishou_settlement_rules
|
|
|
+ where id = #{ruleId}
|
|
|
</select>
|
|
|
|
|
|
|
|
@@ -723,10 +810,21 @@
|
|
|
)
|
|
|
</insert>
|
|
|
<insert id="addRule">
|
|
|
- replace into
|
|
|
+ replace
|
|
|
+ into
|
|
|
promoter_bind_rule(promoter_id,rule_id,rule_name,create_time,update_time)
|
|
|
values
|
|
|
- (#{promoterId},#{ruleId},#{ruleName},now(),now())
|
|
|
+ (
|
|
|
+ #{promoterId},
|
|
|
+ #{ruleId},
|
|
|
+ #{ruleName},
|
|
|
+ now
|
|
|
+ (
|
|
|
+ ),
|
|
|
+ now
|
|
|
+ (
|
|
|
+ )
|
|
|
+ )
|
|
|
|
|
|
</insert>
|
|
|
</mapper>
|