Merge remote-tracking branch 'hs/dev/feat/partner1.1_20230727' into dev/feat/partner1.1_20230727

This commit is contained in:
zhangchenbiao
2023-07-19 16:04:25 +08:00
27 changed files with 121 additions and 495 deletions

View File

@@ -20,13 +20,12 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="close_time" jdbcType="TIMESTAMP" property="closeTime" />
<result column="close_user_id" jdbcType="VARCHAR" property="closeUserId" />
<result column="user_channel_id" jdbcType="BIGINT" property="userChannelId" />
</resultMap>
<sql id="Base_Column_List">
id, partner_id, workflow_stage, workflow_status, line_status, investment_manager,
development_director, development_manager, deadline, pass_reason, reject_public_reason,
reject_real_reason, certify_file, deleted, create_time, update_time, close_time,
close_user_id,user_channel_id
close_user_id
</sql>
<select id="selectByPrimaryKeySelective" resultMap="BaseResultMap">
@@ -45,8 +44,7 @@
workflow_stage,
workflow_status,
line_status,
investment_manager,
user_channel_id
investment_manager
)
values
<foreach collection="recordList" item="record" separator=",">
@@ -54,8 +52,7 @@
#{record.workflowStage},
#{record.workflowStatus},
#{record.lineStatus},
#{record.investmentManager},
#{record.userChannelId})
#{record.investmentManager}
</foreach>
</insert>
@@ -127,9 +124,6 @@
<if test="record.closeUserId != null">
close_user_id,
</if>
<if test="record.userChannelId != null">
user_channel_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="record.partnerId != null">
@@ -183,9 +177,6 @@
<if test="record.closeUserId != null">
#{record.closeUserId},
</if>
<if test="record.userChannelId != null">
#{record.userChannelId},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective">
@@ -248,9 +239,6 @@
<if test="record.removeBlackReason != null">
remove_black_reason = #{record.removeBlackReason},
</if>
<if test="record.userChannelId != null">
user_channel_id = #{record.userChannelId},
</if>
</set>
where id = #{record.id}
</update>
@@ -273,8 +261,7 @@
close_time = #{record.closeTime},
close_user_id = #{record.closeUserId},
join_black_reason = #{record.joinBlackReason},
remove_black_reason = #{record.removeBlackReason},
user_channel_id = #{record.userChannelId}
remove_black_reason = #{record.removeBlackReason}
where id = #{record.id}
</update>
@@ -346,7 +333,7 @@
left join hy_partner_base_info b on a.id = b.partner_line_id
LEFT JOIN hy_partner_intent_info hpii ON a.id = hpii.partner_line_id
LEFT JOIN hy_partner_user_info hpuinfo ON a.partner_id = hpuinfo.partner_id
LEFT JOIN hy_partner_user_channel hpuc ON a.user_channel_id = hpuc.channel_id
LEFT JOIN hy_partner_user_channel hpuc ON hpuinfo.user_channel_id = hpuc.channel_id
LEFT JOIN hy_phone_location hpl ON hpl.phone_number = hpuinfo.mobile
<where>
<if test="lineId!=null">
@@ -613,8 +600,9 @@
<select id="getLineFollowHistoryList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM hy_partner_line_info
where (deleted = 1 or (deleted=0 and line_status in (0,3) and close_time is not null))
where (deleted = 1 or (deleted=0 and line_status in (0,3) and close_time is not null and investment_manager is not null))
and partner_id = #{partner_id}
order by id desc
</select>
<!-- 根据面试计划 id 查询战区 id -->

View File

@@ -19,10 +19,12 @@
<result column="recommend_partner_id" jdbcType="VARCHAR" property="recommendPartnerId" />
<result column="recommend_partner_name" jdbcType="VARCHAR" property="recommendPartnerName" />
<result column="recommend_partner_mobile" jdbcType="VARCHAR" property="recommendPartnerMobile" />
<result column="user_channel_id" jdbcType="BIGINT" property="userChannelId" />
</resultMap>
<sql id="Base_Column_List">
id, partner_id, mobile, username, live_area, want_shop_area, accept_adjust_type,
invite_code, is_write_partner_know, create_time, update_time, shop_code, shop_name, shop_id, recommend_partner_id, recommend_partner_name, recommend_partner_mobile
invite_code, is_write_partner_know, create_time, update_time, shop_code, shop_name, shop_id,
recommend_partner_id, recommend_partner_name, recommend_partner_mobile,user_channel_id
</sql>
<select id="selectByPartnerId" resultMap="BaseResultMap" >
select
@@ -53,13 +55,13 @@
</select>
<select id="selectByHourDate" resultType="com.cool.store.entity.SyncEcCustomerDO" >
SELECT a.id as id, a.username as customername,a.mobile as customermobile,d.`name` as followname,d.mobile as followmobile ,c.channel_id as channelId FROM hy_partner_user_info a LEFT join hy_partner_line_info b on
a.partner_id=b.partner_id LEFT join hy_partner_user_channel c on b.user_channel_id=c.channel_id left join enterprise_user d on b.investment_manager=d.user_id
a.partner_id=b.partner_id LEFT join hy_partner_user_channel c on a.user_channel_id=c.channel_id left join enterprise_user d on b.investment_manager=d.user_id
WHERE ( a.create_time BETWEEN #{selectTime} and #{now} or
a.update_time BETWEEN #{selectTime} and #{now} ) order by a.id Limit #{limit1},#{limit2}
</select>
<select id="selectByHourDateCount" resultType="java.lang.Integer">
SELECT count(*) FROM hy_partner_user_info a LEFT join hy_partner_line_info b on
a.partner_id=b.partner_id LEFT join hy_partner_user_channel c on b.user_channel_id=c.channel_id left join enterprise_user d on b.investment_manager=d.user_id
a.partner_id=b.partner_id LEFT join hy_partner_user_channel c on a.user_channel_id=c.channel_id left join enterprise_user d on b.investment_manager=d.user_id
WHERE (a.create_time BETWEEN #{selectTime} and #{now} or
a.update_time BETWEEN #{selectTime} and #{now} )
</select>