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

This commit is contained in:
zhangchenbiao
2023-06-20 22:15:24 +08:00
30 changed files with 282 additions and 142 deletions

View File

@@ -34,32 +34,6 @@ public interface HyPartnerInterviewMapper {
*/
PartnerInterviewInfoVO queryByPartnerId(@Param("partnerId") String partnerId);
/**
* 修改面试状态
* 预约状态 0 待预约;1待面试;2已开始;3待审核;4审批中;5审批通过;6拒绝
*/
int updateInterviewStatus(@Param("interviewPlanId") String interviewPlanId, @Param("status") Integer status);
/**
* 修改面试实际开始时间
* @param dateTime "yyyy-MM-dd HH:mm:ss"
*/
int updateActualStartTime(@Param("interviewPlanId") String interviewPlanId, @Param("dateTime") String dateTime);
/**
* 修改加盟商或面试官进入面试时间
* @param userType 1.面试官2.加盟商3.其他
* @param dateTime "yyyy-MM-dd HH:mm:ss"
* @return
*/
int updateEnterTime(@Param("interviewPlanId") String interviewPlanId, @Param("userType") Integer userType, @Param("dateTime") String dateTime);
/**
* 将加盟商是否参会修改为参会
* 0未参加1参加
*/
int updateWhetherPartnerEnter(@Param("interviewPlanId") String interviewPlanId);
/**
* 根据会议 id 查询面试官 id
*/

View File

@@ -205,4 +205,11 @@ public interface HyPartnerLineInfoMapper {
* @return
*/
List<HyPartnerLineInfoDO> getLineFollowHistoryList(String partnerId);
/**
* 根据面试计划 id 查询战区 id
* @param interviewPlanId
* @return
*/
String getAffiliationZoneIdByInterviewPlanId(String interviewPlanId);
}

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,9 +302,15 @@
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 = #{lineId}
@@ -450,7 +457,7 @@
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">
<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">
<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>