|
|
@@ -13,10 +13,17 @@
|
|
|
<result column="update_name" jdbcType="VARCHAR" property="updateName" />
|
|
|
<result column="date_update_time" jdbcType="TIMESTAMP" property="dateUpdateTime" />
|
|
|
<result column="channel_type" jdbcType="INTEGER" property="channelType" />
|
|
|
+ <result column="chargeback" jdbcType="INTEGER" property="chargeback" />
|
|
|
+ <result column="member" jdbcType="INTEGER" property="member" />
|
|
|
+ <result column="last_sales_type" jdbcType="INTEGER" property="lastSalesType" />
|
|
|
+ <result column="last_follow_type" jdbcType="INTEGER" property="lastFollowType" />
|
|
|
+ <result column="follow_number" jdbcType="INTEGER" property="followNumber" />
|
|
|
+ <result column="task_names" jdbcType="VARCHAR" property="taskNames" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id, `uid`, aid, last_follow_time, last_sign_time, create_time, big_customer, update_aid,
|
|
|
- update_name, date_update_time, channel_type
|
|
|
+ update_name, date_update_time, channel_type, chargeback, `member`, last_sales_type,
|
|
|
+ last_follow_type, follow_number, task_names
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -24,6 +31,7 @@
|
|
|
from user_mid
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
+
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
delete from user_mid
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -32,11 +40,15 @@
|
|
|
insert into user_mid (id, `uid`, aid,
|
|
|
last_follow_time, last_sign_time, create_time,
|
|
|
big_customer, update_aid, update_name,
|
|
|
- date_update_time, channel_type)
|
|
|
+ date_update_time, channel_type, chargeback,
|
|
|
+ `member`, last_sales_type, last_follow_type,
|
|
|
+ follow_number, task_names)
|
|
|
values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
|
|
|
#{lastFollowTime,jdbcType=TIMESTAMP}, #{lastSignTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
#{bigCustomer,jdbcType=INTEGER}, #{updateAid,jdbcType=VARCHAR}, #{updateName,jdbcType=VARCHAR},
|
|
|
- #{dateUpdateTime,jdbcType=TIMESTAMP}, #{channelType,jdbcType=INTEGER})
|
|
|
+ #{dateUpdateTime,jdbcType=TIMESTAMP}, #{channelType,jdbcType=INTEGER}, #{chargeback,jdbcType=INTEGER},
|
|
|
+ #{member,jdbcType=INTEGER}, #{lastSalesType,jdbcType=INTEGER}, #{lastFollowType,jdbcType=INTEGER},
|
|
|
+ #{followNumber,jdbcType=INTEGER}, #{taskNames,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.UserMid">
|
|
|
insert into user_mid
|
|
|
@@ -74,6 +86,24 @@
|
|
|
<if test="channelType != null">
|
|
|
channel_type,
|
|
|
</if>
|
|
|
+ <if test="chargeback != null">
|
|
|
+ chargeback,
|
|
|
+ </if>
|
|
|
+ <if test="member != null">
|
|
|
+ `member`,
|
|
|
+ </if>
|
|
|
+ <if test="lastSalesType != null">
|
|
|
+ last_sales_type,
|
|
|
+ </if>
|
|
|
+ <if test="lastFollowType != null">
|
|
|
+ last_follow_type,
|
|
|
+ </if>
|
|
|
+ <if test="followNumber != null">
|
|
|
+ follow_number,
|
|
|
+ </if>
|
|
|
+ <if test="taskNames != null">
|
|
|
+ task_names,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -109,6 +139,24 @@
|
|
|
<if test="channelType != null">
|
|
|
#{channelType,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="chargeback != null">
|
|
|
+ #{chargeback,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="member != null">
|
|
|
+ #{member,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="lastSalesType != null">
|
|
|
+ #{lastSalesType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="lastFollowType != null">
|
|
|
+ #{lastFollowType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="followNumber != null">
|
|
|
+ #{followNumber,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="taskNames != null">
|
|
|
+ #{taskNames,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserMid">
|
|
|
@@ -144,6 +192,24 @@
|
|
|
<if test="channelType != null">
|
|
|
channel_type = #{channelType,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="chargeback != null">
|
|
|
+ chargeback = #{chargeback,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="member != null">
|
|
|
+ `member` = #{member,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="lastSalesType != null">
|
|
|
+ last_sales_type = #{lastSalesType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="lastFollowType != null">
|
|
|
+ last_follow_type = #{lastFollowType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="followNumber != null">
|
|
|
+ follow_number = #{followNumber,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="taskNames != null">
|
|
|
+ task_names = #{taskNames,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
@@ -158,9 +224,16 @@
|
|
|
update_aid = #{updateAid,jdbcType=VARCHAR},
|
|
|
update_name = #{updateName,jdbcType=VARCHAR},
|
|
|
date_update_time = #{dateUpdateTime,jdbcType=TIMESTAMP},
|
|
|
- channel_type = #{channelType,jdbcType=INTEGER}
|
|
|
+ channel_type = #{channelType,jdbcType=INTEGER},
|
|
|
+ chargeback = #{chargeback,jdbcType=INTEGER},
|
|
|
+ `member` = #{member,jdbcType=INTEGER},
|
|
|
+ last_sales_type = #{lastSalesType,jdbcType=INTEGER},
|
|
|
+ last_follow_type = #{lastFollowType,jdbcType=INTEGER},
|
|
|
+ follow_number = #{followNumber,jdbcType=INTEGER},
|
|
|
+ task_names = #{taskNames,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
+
|
|
|
<update id="updateByUid" parameterType="com.goafanti.common.model.UserMid">
|
|
|
update user_mid
|
|
|
<set>
|
|
|
@@ -191,6 +264,24 @@
|
|
|
<if test="channelType != null">
|
|
|
channel_type = #{channelType,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="chargeback != null">
|
|
|
+ chargeback = #{chargeback,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="member != null">
|
|
|
+ `member` = #{member,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="lastSalesType != null">
|
|
|
+ last_sales_type = #{lastSalesType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="lastFollowType != null">
|
|
|
+ last_follow_type = #{lastFollowType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="followNumber != null">
|
|
|
+ follow_number = #{followNumber,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="taskNames != null">
|
|
|
+ task_names = #{taskNames,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where `uid` = #{uid,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -229,4 +320,11 @@
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
+
|
|
|
+ <select id="getUserTaskNames" resultType="java.lang.String">
|
|
|
+ select group_concat(distinct b.commodity_name)task_names from t_order_new a
|
|
|
+ left join t_order_task b on a.order_no =b.order_no
|
|
|
+ where a.buyer_id = #{uid}
|
|
|
+ group by a.buyer_id
|
|
|
+ </select>
|
|
|
</mapper>
|