Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner

# Conflicts:
#	coolstore-partner-service/src/main/java/com/cool/store/service/impl/InterviewServiceImpl.java
This commit is contained in:
俞扬
2023-06-21 10:25:03 +08:00
51 changed files with 551 additions and 206 deletions

View File

@@ -297,4 +297,13 @@
where
deleted = 0 and <foreach collection="regionIds" separator="or" open="(" close=")" item="regionId"> leader_dept_ids like concat("%", #{regionId}, "%") </foreach>
</select>
<select id="getUserListByRegionIds" resultMap="BaseResultMap">
select
user_id, name, mobile
from
enterprise_user
where
deleted = 0 and <foreach collection="regionIds" separator="or" open="(" close=")" item="regionId"> user_region_ids like concat("%", #{regionId}, "%") </foreach>
</select>
</mapper>

View File

@@ -21,7 +21,7 @@
<select id="selectById" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from id = #{id}
from hy_open_area_info where id = #{id}
</select>
<insert id="insertSelective" parameterType="com.cool.store.entity.HyOpenAreaInfoDO" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_open_area_info

View File

@@ -238,4 +238,13 @@
where id_card = #{idCard}
</select>
<update id="cleanIdCardInfoByPartnerLineId">
update hy_partner_base_info
set
id_card = #{idCard},
id_card_photo_front = #{idCardPhotoFront},
id_card_photo_black = #{idCardPhotoBlack}
where partner_line_id = #{partnerLineId}
</update>
</mapper>

View File

@@ -28,7 +28,7 @@
</resultMap>
<resultMap id="PartnerInterviewInfoVO" type="com.cool.store.vo.PartnerInterviewInfoVO">
<id column="interviewId" property="interviewPlanId"/>
<id column="interviewId" property="interviewId"/>
<result column="partnerId" property="partnerId"/>
<result column="interviewerId" property="interviewerId"/>
<association property="partnerName" column="partnerId" select="queryPartnerName" javaType="string"/>
@@ -279,7 +279,7 @@
<!-- 根据加盟商id查询面试信息 -->
<select id="queryByPartnerId" resultMap="PartnerInterviewInfoVO">
SELECT t1.id interviewId, t1.id interview_id, t1.interview_plan_id, `status`, start_time, end_time, room_id, t1.partner_id partnerId, t1.interviewer interviewerId
SELECT t1.id interviewId, t1.id interview_id, t2.id as interviewPlanId, `status`, start_time, end_time, room_id, t1.partner_id partnerId, t1.interviewer interviewerId
FROM hy_partner_interview t1
LEFT JOIN hy_partner_interview_plan t2 ON t1.interview_plan_id = t2.id
WHERE t1.partner_id = #{partnerId}
@@ -296,41 +296,6 @@
AND user_id = #{interview}
</select>
<!-- 修改面试状态 -->
<update id="updateInterviewStatus">
UPDATE hy_partner_interview
SET `status` = #{status}
WHERE interview_plan_id = #{interviewPlanId}
</update>
<!-- 修改面试实际开始时间 -->
<update id="updateActualStartTime">
UPDATE hy_partner_interview_plan
SET actual_start_time = IF(actual_start_time IS NULL, #{dateTime}, actual_start_time)
WHERE id = #{interviewPlanId}
</update>
<!-- 修改面试官或加盟商入会时间 -->
<update id="updateEnterTime">
UPDATE hy_partner_interview
<set>
<if test="userType != null and userType == 1">
interviewer_enter_time = IF(interviewer_enter_time IS NULL, #{dateTime}, interviewer_enter_time),
</if>
<if test="userType != null and userType == 2">
partner_enter_time = IF(partner_enter_time IS NULL, #{dateTime}, partner_enter_time)
</if>
</set>
WHERE interview_plan_id = #{interviewPlanId}
</update>
<!-- 修改加盟商参会状态为参加 -->
<update id="updateWhetherPartnerEnter">
UPDATE hy_partner_interview_plan
SET is_partner_interview = 1
WHERE id = #{interviewPlanId}
</update>
<!-- 根据会议 id 获取面试官 id -->
<select id="getInterviewerByInterviewPlanId" resultMap="partnerEnterInterviewVO">
SELECT interviewer, interviewer interviewer_id, partner_id

View File

@@ -293,6 +293,7 @@
a.id as id,
a.partner_id as partnerId,
a.workflow_stage as workflowStage,
a.line_status as lineStatus,
a.workflow_status as workflowStatus,
a.partner_id as partnerUserId,
a.investment_manager as investmentManager,
@@ -301,12 +302,18 @@
b.pass_reason as passReason,
b.certify_file as certifyFile,
b.pass_time as passTime,
b.pass_user_id as passUserId
from hy_partner_line_info a inner join hy_partner_base_info b
on a.id = b.partner_line_id
b.pass_user_id as passUserId,
hpuinfo.live_area as liveArea,
hpuinfo.want_shop_area as wantShopArea,
hpuinfo.accept_adjust_type as acceptAdjustType,
hpuinfo.mobile as partnerUserPhone,
hpuinfo.username as partnerUserName
from hy_partner_line_info a
left join hy_partner_base_info b on a.id = b.partner_line_id
LEFT JOIN hy_partner_user_info hpuinfo ON a.partner_id = hpuinfo.partner_id
<where>
<if test="lineId!=null">
and a.id = #{id}
and a.id = #{lineId}
</if>
</where>
</select>
@@ -320,14 +327,14 @@
and investment_manager = #{userId}
</if>
<if test="lastMonthTodayDate!=null">
and close_time > #{lastMonthTodayDate} and close_time <![CDATA[<]]> now
and close_time > #{lastMonthTodayDate} and close_time <![CDATA[<]]> now()
</if>
</where>
</select>
<update id="updateInvestmentManager">
update hy_partner_line_info
set investment_manager = #{userId}
set investment_manager = #{userId}, line_status= '1'
<if test="lineIdList!=null and lineIdList.size>0">
<foreach collection="lineIdList" open="where id in (" close=")" separator="," item="lineId">
#{lineId}
@@ -396,7 +403,7 @@
select
<include refid="Base_Column_List"></include>
from hy_partner_line_info
where partner_id = #{partnerId}
where partner_id = #{partnerId} and deleted = 0
</select>
<select id="getPublicSeaLineList" resultType="com.cool.store.dto.partner.PublicSeaLineDTO">
@@ -409,7 +416,7 @@
b.want_shop_area as wantShopArea,
b.accept_adjust_type as acceptAdjustType
FROM hy_partner_line_info a inner JOIN hy_partner_user_info b on a.partner_id = b.partner_id
where a.line_status = 0
where a.line_status = 0 and a.deleted = 0
<if test="userNameKeyword!=null and userNameKeyword!=''">
and b.username like concat('%',#{userNameKeyword},'%')
</if>
@@ -444,13 +451,13 @@
hpli.development_manager as developmentManager,
hpli.line_status as lineStatus,
hpli.update_time as updateTime,
hpii.want_shop_area as wantShopArea,
hpii.accept_adjust_type as acceptAdjustType,
hpuinfo.want_shop_area as wantShopArea,
hpuinfo.accept_adjust_type as acceptAdjustType,
hpuinfo.username as partnerUserName,
hpuinfo.mobile as partnerUserPhone,
hpuinfo.shop_name as storeName,
hpuinfo.recommend_partner_name as recommendPartnerName,
eu.name as investmentManagerName
eu.name as investmentManagerName
FROM
hy_partner_line_info hpli
LEFT JOIN hy_partner_intent_info hpii ON hpli.id = hpii.partner_line_id
@@ -478,28 +485,37 @@
<if test="acceptAdjustType!=null">
AND hpuinfo.accept_adjust_type = #{acceptAdjustType}
</if>
<if test="storeKeywordType!=null and storeKeywordType==storeCode">
<if test="storeKeywordType!=null and storeKeywordType=='storeCode'">
AND hpuinfo.shop_code like concat('%',#{storeKeyword},'%')
</if>
<if test="storeKeywordType!=null and storeKeywordType==storeName">
<if test="storeKeywordType!=null and storeKeywordType=='storeName'">
AND hpuinfo.shop_name like concat('%',#{storeKeyword},'%')
</if>
<if test="storeKeywordType!=null and storeKeywordType==partnerName">
<if test="storeKeywordType!=null and storeKeywordType=='partnerName'">
AND hpuinfo.recommend_partner_name like concat('%',#{storeKeyword},'%')
</if>
<if test="storeKeywordType!=null and storeKeywordType==partnerMobile">
<if test="storeKeywordType!=null and storeKeywordType=='partnerMobile'">
AND hpuinfo.recommend_partner_mobile like concat('%',#{storeKeyword},'%')
</if>
<if test="userIdList!=null and userIdList.size>0">
<foreach collection="userIdList" item="userId" open="and a.investment_manager in (" close=")" separator=",">
<if test="userIdList!=null and userIdList.size>0 and developmentManagerList!=null and developmentManagerList.size==0">
<foreach collection="userIdList" item="userId" open="and hpli.investment_manager in (" close=")" separator=",">
#{userId}
</foreach>
</if>
<if test="developmentManagerList!=null and developmentManagerList.size>0">
<foreach collection="developmentManagerList" item="developmentManager" open="and a.development_manager in (" close=")" separator=",">
<if test="userIdList!=null and userIdList.size==0 and developmentManagerList!=null and developmentManagerList.size>0">
<foreach collection="developmentManagerList" item="developmentManager" open="and hpli.development_manager in (" close=")" separator=",">
#{developmentManager}
</foreach>
</if>
<if test="userIdList!=null and userIdList.size>0 and developmentManagerList!=null and developmentManagerList.size>0">
<foreach collection="userIdList" item="userId" open="and (hpli.investment_manager in (" close=")" separator=",">
#{userId}
</foreach>
<foreach collection="developmentManagerList" item="developmentManager" open="or hpli.development_manager in (" close="))" separator=",">
#{developmentManager}
</foreach>
</if>
</select>