Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
This commit is contained in:
@@ -6,11 +6,10 @@ import com.cool.store.dto.partner.StageCountDTO;
|
||||
import com.cool.store.dto.partner.*;
|
||||
import com.cool.store.entity.HyPartnerLineInfoDO;
|
||||
import com.cool.store.mapper.HyPartnerLineInfoMapper;
|
||||
import com.cool.store.vo.LineFollowHistoryVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -91,9 +90,9 @@ public class HyPartnerLineInfoDAO {
|
||||
return hyPartnerLineInfoMapper.selectPartnerLineInfoAndBaseInfo(lineId);
|
||||
}
|
||||
|
||||
public PageInfo<HyPartnerLineInfoDO> lastMonthCloseLine(String userId, String lastMonthTodayDate){
|
||||
public List<HyPartnerLineInfoDO> lastMonthCloseLine(String userId, String lastMonthTodayDate){
|
||||
if (userId==null){
|
||||
return new PageInfo<>();
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return hyPartnerLineInfoMapper.lastMonthCloseLine(userId,lastMonthTodayDate);
|
||||
}
|
||||
@@ -115,7 +114,7 @@ public class HyPartnerLineInfoDAO {
|
||||
}
|
||||
|
||||
|
||||
public PageInfo<PartnerBlackListDTO> getBlackList( String userNameKeyword,String phoneKeyword, String intentArea , Integer acceptAdjustType){
|
||||
public List<PartnerBlackListDTO> getBlackList( String userNameKeyword,String phoneKeyword, String intentArea , Integer acceptAdjustType){
|
||||
return hyPartnerLineInfoMapper.getBlackList(userNameKeyword,phoneKeyword,intentArea,acceptAdjustType);
|
||||
}
|
||||
|
||||
@@ -127,10 +126,16 @@ public class HyPartnerLineInfoDAO {
|
||||
return hyPartnerLineInfoMapper.joinAndRemoveBlack(lineId,status,joinReason,removeReason);
|
||||
}
|
||||
|
||||
public PageInfo<PublicSeaLineDTO> getPublicSeaLineList( String userNameKeyword, String phoneKeyword, String intentArea, Integer acceptAdjustType, Date updateStartTime, Date updateEndTime, List<String> userIdList){
|
||||
public List<PublicSeaLineDTO> getPublicSeaLineList( String userNameKeyword, String phoneKeyword, String intentArea, Integer acceptAdjustType, Date updateStartTime, Date updateEndTime, List<String> userIdList){
|
||||
return hyPartnerLineInfoMapper.getPublicSeaLineList(userNameKeyword,phoneKeyword,intentArea,acceptAdjustType,updateStartTime,updateEndTime,userIdList);
|
||||
}
|
||||
|
||||
public List<PrivateSeaLineDTO> getPrivateSeaLineList(String keyword, String keywordType, String workflowStage, String workflowStatus, Date deadlineStart, Date deadlineEnd,
|
||||
String intentArea, Integer acceptAdjustType, String storeKeyword, String storeKeywordType, List<String> userIdList){
|
||||
return hyPartnerLineInfoMapper.getPrivateSeaLineList( keyword, keywordType, workflowStage, workflowStatus, deadlineStart, deadlineEnd,
|
||||
intentArea, acceptAdjustType, storeKeyword, storeKeywordType, userIdList);
|
||||
}
|
||||
|
||||
|
||||
public List<HyPartnerLineInfoDO> getPartnerLastLine(List<String> partnerIdList){
|
||||
if (CollectionUtils.isEmpty(partnerIdList)){
|
||||
|
||||
@@ -22,4 +22,11 @@ public interface HyPartnerCertificationInfoMapper {
|
||||
* dateTime:2023-05-29 03:51
|
||||
*/
|
||||
int updateByPrimaryKeySelective(@Param("record") HyPartnerCertificationInfoDO record);
|
||||
|
||||
/**
|
||||
* 根据资质审核流程 id 获取面试会议 id
|
||||
* @param qualifyVerifyId 资质审核流程 id
|
||||
* @return 面试会议 id
|
||||
*/
|
||||
String getInterviewIdByQualifyVerifyId(@Param("qualifyVerifyId") String qualifyVerifyId);
|
||||
}
|
||||
@@ -79,4 +79,11 @@ public interface HyPartnerInterviewMapper {
|
||||
* 根据面试 id 查询面试信息
|
||||
*/
|
||||
HyPartnerInterviewDO selectByPrimaryKeySelective(String interviewId);
|
||||
|
||||
/**
|
||||
* 根据面试 id 获取意向区域
|
||||
* @param interviewId
|
||||
* @return
|
||||
*/
|
||||
String getVerifyCityByInterviewId(@Param("interviewId") String interviewId);
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public interface HyPartnerInterviewPlanMapper {
|
||||
/**
|
||||
* 查询面试详情
|
||||
*
|
||||
* @param interviewId
|
||||
* @param interviewPlanId
|
||||
* @return
|
||||
*/
|
||||
InterviewVO getInterviewInfo(String interviewPlanId);
|
||||
|
||||
@@ -90,7 +90,7 @@ public interface HyPartnerLineInfoMapper {
|
||||
* @param lastMonthTodayDate
|
||||
* @return
|
||||
*/
|
||||
PageInfo<HyPartnerLineInfoDO> lastMonthCloseLine(@Param("userId") String userId,
|
||||
List<HyPartnerLineInfoDO> lastMonthCloseLine(@Param("userId") String userId,
|
||||
@Param("lastMonthTodayDate") String lastMonthTodayDate);
|
||||
|
||||
/**
|
||||
@@ -116,7 +116,7 @@ public interface HyPartnerLineInfoMapper {
|
||||
* @param acceptAdjustType
|
||||
* @return
|
||||
*/
|
||||
PageInfo<PartnerBlackListDTO> getBlackList(@Param("userNameKeyword") String userNameKeyword,
|
||||
List<PartnerBlackListDTO> getBlackList(@Param("userNameKeyword") String userNameKeyword,
|
||||
@Param("phoneKeyword") String phoneKeyword,
|
||||
@Param("intentArea") String intentArea ,
|
||||
@Param("acceptAdjustType") Integer acceptAdjustType);
|
||||
@@ -150,7 +150,7 @@ public interface HyPartnerLineInfoMapper {
|
||||
* @param userIdList
|
||||
* @return
|
||||
*/
|
||||
PageInfo<PublicSeaLineDTO> getPublicSeaLineList(@Param("userNameKeyword") String userNameKeyword,
|
||||
List<PublicSeaLineDTO> getPublicSeaLineList(@Param("userNameKeyword") String userNameKeyword,
|
||||
@Param("phoneKeyword") String phoneKeyword,
|
||||
@Param("intentArea") String intentArea,
|
||||
@Param("acceptAdjustType") Integer acceptAdjustType,
|
||||
@@ -158,6 +158,24 @@ public interface HyPartnerLineInfoMapper {
|
||||
@Param("updateEndTime") Date updateEndTime,
|
||||
@Param("userIdList") List<String> userIdList);
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<PrivateSeaLineDTO> getPrivateSeaLineList(@Param("keyword") String keyword,
|
||||
@Param("keywordType") String keywordType,
|
||||
@Param("workflowStage") String workflowStage,
|
||||
@Param("workflowStatus") String workflowStatus,
|
||||
@Param("deadlineStart") Date deadlineStart,
|
||||
@Param("deadlineEnd") Date deadlineEnd,
|
||||
@Param("intentArea") String intentArea,
|
||||
@Param("acceptAdjustType") Integer acceptAdjustType,
|
||||
@Param("storeKeyword") String storeKeyword,
|
||||
@Param("storeKeywordType") String storeKeywordType,
|
||||
@Param("userIdList") List<String> userIdList);
|
||||
|
||||
|
||||
/**
|
||||
* 查询对应的加盟商最近线索
|
||||
* @param partnerIdList
|
||||
|
||||
@@ -213,8 +213,8 @@
|
||||
<if test="mobile != null and mobile!=''">
|
||||
mobile = #{mobile},
|
||||
</if>
|
||||
where partner_id = #{partnerId}
|
||||
</set>
|
||||
where partner_id = #{partnerId}
|
||||
</update>
|
||||
|
||||
<select id="getByPartnerIdAndLineId" resultMap="BaseResultMap" >
|
||||
|
||||
@@ -169,6 +169,12 @@
|
||||
<if test="record.partnership != null">
|
||||
partnership = #{record.partnership},
|
||||
</if>
|
||||
<if test="record.qualifyVerifyId != null">
|
||||
qualify_verify_id = #{record.qualifyVerifyId},
|
||||
</if>
|
||||
<if test="record.intentionContractNo != null">
|
||||
intention_contract_no = #{record.intentionContractNo},
|
||||
</if>
|
||||
<if test="record.wantSignTime != null">
|
||||
want_sign_time = #{record.wantSignTime},
|
||||
</if>
|
||||
@@ -215,6 +221,21 @@
|
||||
update_time = #{record.updateTime},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
<where>
|
||||
1 = 0
|
||||
<if test="record.id != null">
|
||||
or id = #{record.id}
|
||||
</if>
|
||||
<if test="record.partnerLineId != null">
|
||||
or partner_id_line_id = #{record.partnerLineId}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
<!-- 根据资质审核流程 id 获取面试会议 id -->
|
||||
<select id="getInterviewIdByQualifyVerifyId" resultType="java.lang.String">
|
||||
select partner_interview_id
|
||||
from hy_partner_certification_info
|
||||
where qualify_verify_id = #{qualifyVerifyId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -220,8 +220,17 @@
|
||||
<if test="authCode != null">
|
||||
auth_code = #{authCode},
|
||||
</if>
|
||||
<if test="passFileUrl != null">
|
||||
pass_file_url = #{passFileUrl},
|
||||
<if test="passCode != null">
|
||||
pass_code = #{passCode},
|
||||
</if>
|
||||
<if test="passPdfUrl != null">
|
||||
pass_pdf_url = #{passPdfUrl},
|
||||
</if>
|
||||
<if test="passImageUrl != null">
|
||||
pass_image_url = #{passImageUrl},
|
||||
</if>
|
||||
<if test="passTime != null">
|
||||
pass_time = #{passTime},
|
||||
</if>
|
||||
<if test="expiryDate != null">
|
||||
expiry_date = #{expiryDate},
|
||||
@@ -250,11 +259,16 @@
|
||||
<if test="interviewerEnterTime != null">
|
||||
interviewer_enter_time = #{interviewerEnterTime},
|
||||
</if>
|
||||
<if test="qualifyVerifyId != null">
|
||||
qualify_verify_id = #{qualifyVerifyId},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
<where>
|
||||
1 = 0
|
||||
<if test="id != null">
|
||||
or id = #{id}
|
||||
</if>
|
||||
<if test="interviewPlanId != null">
|
||||
or interview_plan_id = #{interviewPlanId}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
<!-- 根据加盟商id查询面试信息 -->
|
||||
@@ -338,7 +352,7 @@
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
hy_partner_intent_info
|
||||
hy_partner_interview
|
||||
where
|
||||
id = #{interviewId}
|
||||
|
||||
@@ -364,4 +378,19 @@
|
||||
WHERE id = #{interviewId}
|
||||
</update>
|
||||
|
||||
<!-- 根据 interviewId 获取意向区域 -->
|
||||
<select id="getVerifyCityByInterviewId" resultType="java.lang.String">
|
||||
SELECT area_path
|
||||
FROM hy_open_area_info
|
||||
WHERE id = (
|
||||
SELECT want_shop_area
|
||||
FROM hy_partner_intent_info
|
||||
WHERE partner_line_id = (
|
||||
SELECT partner_line_id
|
||||
FROM hy_partner_interview
|
||||
WHERE id = #{interviewId}
|
||||
)
|
||||
)
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -247,41 +247,44 @@
|
||||
|
||||
<select id="getInterviewList" resultType="com.cool.store.vo.interview.InterviewVO">
|
||||
select hpip.id as interviewPlanId,
|
||||
hpip.partner_id as partnerId,
|
||||
hpui.username as partnerName,
|
||||
hpui.mobile as partnerMobile,
|
||||
hpip.room_id as roomId,
|
||||
hpip.start_time as startTime,
|
||||
hpui.username as interviewerName,
|
||||
hpui.mobile as interviewerMobile,
|
||||
hpip.interviewer as interviewerId,
|
||||
eu.name as interviewerName,
|
||||
eu.mobile as interviewerMobile,
|
||||
hpip.room_status as roomStatus,
|
||||
hpip.end_time as endTime
|
||||
from hy_partner_interview_plan hpip
|
||||
left join hy_partner_line_info hpll on hpip.partner_line_id = hpll.id
|
||||
left join hy_partner_user_info hpui on hpui.partner_id = hpip.partner_id
|
||||
left join enterprise_user eu on hpip.interviewer = eu.user_id
|
||||
<where>
|
||||
<if test="record.partnerName !=null and record.partnerName!=''">
|
||||
hpui.username like concat('%',#{record.partnerName},'%')
|
||||
</if>
|
||||
<if test="record.partnerMobile !=null and record.partnerMobile!=''">
|
||||
hpui.mobile like concat('%',#{record.partnerMobile},'%')
|
||||
and hpui.mobile like concat('%',#{record.partnerMobile},'%')
|
||||
</if>
|
||||
<if test="record.roomId !=null and record.roomId!=''">
|
||||
hpip.room_id = #{record.roomId}
|
||||
and hpip.room_id = #{record.roomId}
|
||||
</if>
|
||||
<if test="record.interviewerName !=null and record.interviewerName!=''">
|
||||
hpui.username like concat('%',#{record.interviewerName},'%')
|
||||
and hpui.username like concat('%',#{record.interviewerName},'%')
|
||||
</if>
|
||||
<if test="record.interviewerMobile !=null and record.interviewerMobile!=''">
|
||||
hpui.mobile like concat('%',#{record.interviewerMobile},'%')
|
||||
and hpui.mobile like concat('%',#{record.interviewerMobile},'%')
|
||||
</if>
|
||||
<if test="record.roomStatus !=null and record.roomStatus!=''">
|
||||
hpip.room_status = #{record.roomStatus}
|
||||
and hpip.room_status = #{record.roomStatus}
|
||||
</if>
|
||||
<if test="record.startTime !=null and record.startTime!=''">
|
||||
hpip.start_time <= #{record.startTime}
|
||||
and hpip.start_time >= #{record.startTime}
|
||||
</if>
|
||||
<if test="record.endTime !=null and record.endTime!=''">
|
||||
hpip.end_time >= #{record.endTime}
|
||||
and hpip.end_time <= #{record.endTime}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
@@ -289,7 +292,8 @@
|
||||
<select id="getInterviewInfo" resultType="com.cool.store.vo.interview.InterviewVO">
|
||||
select hpip.id as interviewPlanId,
|
||||
hpi.id as interviewId,
|
||||
hpi.qualify_verify_id as qualifyVerifyId,
|
||||
hpci.qualify_verify_id as qualifyVerifyId,
|
||||
hpci.intention_contract_no as intentionContractNo,
|
||||
hpi.pass_time as passTime,
|
||||
hpi.pass_reason as passReason,
|
||||
hpi.recorder as recorderId,
|
||||
@@ -317,6 +321,7 @@
|
||||
left join hy_partner_line_info hpll on hpip.partner_line_id = hpll.id
|
||||
left join hy_partner_user_info hpui on hpui.partner_id = hpip.partner_id
|
||||
left join hy_partner_interview hpi on hpip.id = hpi.interview_plan_id
|
||||
left join hy_partner_certification_info hpci on hpci.partner_interview_id = hpi.id
|
||||
where hpip.id = #{interviewPlanId}
|
||||
</select>
|
||||
<select id="selectBySelective" resultType="com.cool.store.entity.HyPartnerInterviewPlanDO">
|
||||
|
||||
@@ -432,6 +432,71 @@
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getPrivateSeaLineList" resultType="com.cool.store.dto.partner.PrivateSeaLineDTO">
|
||||
SELECT
|
||||
hpli.id as lineId,
|
||||
hpli.partner_id as partnerId,
|
||||
hpli.workflow_stage as workflowStage,
|
||||
hpli.workflow_status as workflowStatus,
|
||||
hpli.deadline as deadline,
|
||||
hpli.investment_manager as investmentManager,
|
||||
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.username as partnerUserName,
|
||||
hpuinfo.mobile as partnerUserPhone,
|
||||
hpuinfo.shop_name as storeName,
|
||||
hpuinfo.recommend_partner_name as recommendPartnerName,
|
||||
eu.name as investmentManagerName
|
||||
FROM
|
||||
hy_partner_line_info hpli
|
||||
LEFT JOIN hy_partner_intent_info hpii ON hpli.id = hpii.partner_line_id
|
||||
LEFT JOIN hy_partner_user_info hpuinfo ON hpli.partner_id = hpuinfo.partner_id
|
||||
LEFT JOIN enterprise_user eu ON hpli.investment_manager = eu.user_id
|
||||
WHERE line_status in (1,2)
|
||||
<if test="keywordType!=null and keywordType=='name'">
|
||||
AND (eu.name like concat('%',#{keyword},'%') or hpuinfo.username like concat('%',#{keyword},'%'))
|
||||
</if>
|
||||
<if test="keywordType!=null and keywordType=='mobile'">
|
||||
AND ( eu.mobile like concat('%',#{keyword},'%') or hpuinfo.mobile like concat('%',#{keyword},'%')')
|
||||
</if>
|
||||
<if test="workflowStage!=null and workflowStage!=''">
|
||||
AND hpli.workflow_stage = #{workflowStage}
|
||||
</if>
|
||||
<if test="workflowStatus!=null and workflowStatus!=''">
|
||||
AND hpli.workflow_status = #workflowStatus}
|
||||
</if>
|
||||
<if test="deadlineStart!=null and deadlineEnd!=null">
|
||||
AND hpli.deadline BETWEEN #{deadlineStart} and #{deadlineStart}
|
||||
</if>
|
||||
<if test="intentArea!=null and intentArea!=''">
|
||||
AND hpuinfo.want_shop_area = #{intentArea}
|
||||
</if>
|
||||
<if test="acceptAdjustType!=null">
|
||||
AND hpuinfo.accept_adjust_type = #{acceptAdjustType}
|
||||
</if>
|
||||
<if test="storeKeywordType!=null and storeKeywordType==storeCode">
|
||||
AND hpuinfo.shop_code like concat('%',#{storeKeyword},'%')
|
||||
</if>
|
||||
<if test="storeKeywordType!=null and storeKeywordType==storeName">
|
||||
AND hpuinfo.shop_name like concat('%',#{storeKeyword},'%')
|
||||
</if>
|
||||
<if test="storeKeywordType!=null and storeKeywordType==partnerName">
|
||||
AND hpuinfo.recommend_partner_name like concat('%',#{storeKeyword},'%')
|
||||
</if>
|
||||
<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=",">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getPartnerLastLine" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"></include>
|
||||
|
||||
Reference in New Issue
Block a user