添加公海私海分页

This commit is contained in:
xiaodong.hu
2023-11-13 10:41:15 +08:00
parent cdf2aba59a
commit 53eb52227a
20 changed files with 657 additions and 178 deletions

View File

@@ -5,6 +5,7 @@ import com.cool.store.constants.CommonConstants;
import com.cool.store.dto.partner.*;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.mapper.HyPartnerLineInfoMapper;
import com.cool.store.vo.LinePageInfoVo;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
@@ -137,10 +138,10 @@ public class HyPartnerLineInfoDAO {
String intentAreaName, Integer acceptAdjustType, String storeKeyword, String storeKeywordType, List<String> userIdList,
List<String> developmentManagerList,List<Long> userPortraitIdList,List<Long> userChannelIdList, String updateStartTime, String updateEndTime
,String partnerName,String partnerMobile,String investmentManagerId,String userPortraitQueryType
,String intentAreaQueryType,String lineStartTime,String lineEndTime,String userChannelQueryType){
,String intentAreaQueryType,String lineStartTime,String lineEndTime,String userChannelQueryType,String sortField,String sortOrder){
return hyPartnerLineInfoMapper.getPrivateSeaLineList( keyword, keywordType, workflowStage, workflowStatus, deadlineStart, deadlineEnd,
intentAreaName, acceptAdjustType, storeKeyword, storeKeywordType, userIdList,developmentManagerList,userPortraitIdList,userChannelIdList, updateStartTime, updateEndTime
,partnerName,partnerMobile,investmentManagerId,userPortraitQueryType,intentAreaQueryType,lineStartTime,lineEndTime,userChannelQueryType);
,partnerName,partnerMobile,investmentManagerId,userPortraitQueryType,intentAreaQueryType,lineStartTime,lineEndTime,userChannelQueryType,sortField,sortOrder);
}
@@ -211,5 +212,18 @@ public class HyPartnerLineInfoDAO {
}
return hyPartnerLineInfoMapper.getHyPartnerLineInfoList(lineIds,investmentManager);
}
public LinePageInfoVo getPublicSeaPageInfoNext(Long lineId, String userNameKeyword, String phoneKeyword, String intentAreaName, Integer acceptAdjustType, String updateStartTime, String updateEndTime, List<String> userIdList, String createStartTime, String createEndTime,String pageTurn){
return hyPartnerLineInfoMapper.getPublicSeaPageInfoNext(lineId,userNameKeyword,phoneKeyword,intentAreaName,acceptAdjustType,updateStartTime,updateEndTime,userIdList, createStartTime, createEndTime,pageTurn);
}
public List<LinePageInfoVo> getPrivateSeaPageInfoNext(Long lineId,String keyword, String keywordType, String workflowStage, String workflowStatus, String deadlineStart, String deadlineEnd,
String intentAreaName, Integer acceptAdjustType, String storeKeyword, String storeKeywordType, List<String> userIdList,
List<String> developmentManagerList,List<Long> userPortraitIdList,List<Long> userChannelIdList, String updateStartTime, String updateEndTime
,String partnerName,String partnerMobile,String investmentManagerId,String userPortraitQueryType
,String intentAreaQueryType,String lineStartTime,String lineEndTime,String userChannelQueryType,String sortField,String sortOrder,Integer limit1,Integer limit2){
return hyPartnerLineInfoMapper.getPrivateSeaPageInfoNext(lineId,keyword, keywordType, workflowStage, workflowStatus, deadlineStart, deadlineEnd,
intentAreaName, acceptAdjustType, storeKeyword, storeKeywordType, userIdList,developmentManagerList,userPortraitIdList,userChannelIdList, updateStartTime, updateEndTime
,partnerName,partnerMobile,investmentManagerId,userPortraitQueryType,intentAreaQueryType,lineStartTime,lineEndTime,userChannelQueryType,sortField,sortOrder,limit1,limit2);
}
}

View File

@@ -5,6 +5,7 @@ import com.cool.store.dto.partner.PartnerBlackListDTO;
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
import com.cool.store.dto.partner.StageCountDTO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.vo.LinePageInfoVo;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
@@ -189,7 +190,9 @@ public interface HyPartnerLineInfoMapper {
@Param("intentAreaQueryType") String intentAreaQueryType,
@Param("lineStartTime") String lineStartTime,
@Param("lineEndTime") String lineEndTime,
@Param("userChannelQueryType") String userChannelQueryType);
@Param("userChannelQueryType") String userChannelQueryType,
@Param("sortField") String sortField,
@Param("sortOrder") String sortOrder);
/**
@@ -262,4 +265,52 @@ public interface HyPartnerLineInfoMapper {
* @return 线索转让次数
*/
Integer getTransferTimes(@Param("lineId") Long partnerLineId);
/**
*
* @return
*/
List<LinePageInfoVo> getPrivateSeaPageInfoNext(@Param("lineId") Long lineId,@Param("keyword") String keyword,
@Param("keywordType") String keywordType,
@Param("workflowStage") String workflowStage,
@Param("workflowStatus") String workflowStatus,
@Param("deadlineStart") String deadlineStart,
@Param("deadlineEnd") String deadlineEnd,
@Param("intentAreaName") String intentAreaName,
@Param("acceptAdjustType") Integer acceptAdjustType,
@Param("storeKeyword") String storeKeyword,
@Param("storeKeywordType") String storeKeywordType,
@Param("userIdList") List<String> userIdList,
@Param("developmentManagerList") List<String> developmentManagerList,
@Param("userPortraitIdList") List<Long> userPortraitIdList,
@Param("userChannelIdList") List<Long> userChannelIdList,
@Param("updateStartTime") String updateStartTime,
@Param("updateEndTime") String updateEndTime,
@Param("partnerName") String partnerName,
@Param("partnerMobile") String partnerMobile,
@Param("investmentManagerId") String investmentManagerId,
@Param("userPortraitQueryType") String userPortraitQueryType,
@Param("intentAreaQueryType") String intentAreaQueryType,
@Param("lineStartTime") String lineStartTime,
@Param("lineEndTime") String lineEndTime,
@Param("userChannelQueryType") String userChannelQueryType,
@Param("sortField") String sortField,
@Param("sortOrder") String sortOrder,
@Param("limit1") Integer limit1,
@Param("limit2") Integer limit2
);
LinePageInfoVo getPublicSeaPageInfoNext(@Param("lineId") Long lineId,@Param("userNameKeyword") String userNameKeyword,
@Param("phoneKeyword") String phoneKeyword,
@Param("intentAreaName") String intentAreaName,
@Param("acceptAdjustType") Integer acceptAdjustType,
@Param("updateStartTime") String updateStartTime,
@Param("updateEndTime") String updateEndTime,
@Param("userIdList") List<String> userIdList,
@Param("createStartTime") String createStartTime,
@Param("createEndTime") String createEndTime,
@Param("pageTurn") String pageTurn
);
}

View File

@@ -13,6 +13,7 @@
<result column="max_budget" jdbcType="VARCHAR" property="maxBudget" />
<result column="money_source" jdbcType="VARCHAR" property="moneySource" />
<result column="money_prove" jdbcType="VARCHAR" property="moneyProve" />
<result column="credit_prove" jdbcType="VARCHAR" property="creditProve" />
<result column="education" jdbcType="VARCHAR" property="education" />
<result column="work_year" jdbcType="VARCHAR" property="workYear" />
<result column="is_have_work_exp" jdbcType="TINYINT" property="isHaveWorkExp" />
@@ -35,7 +36,7 @@
<sql id="Base_Column_List">
id, partner_id, partner_line_id, live_area, want_shop_area, accept_adjust_type, is_have_want_shop,
want_shop_info, max_budget, money_source, money_prove, education, work_year, is_have_work_exp,
work_exp, is_consumer, other_band, brand_strength, need_improve, strength, weakness,
work_exp, is_consumer, other_band, brand_strength, need_improve, strength, weakness,credit_prove,
create_time, update_time,detailed_address,email ,acquaintance_flag,acquaintance_name,acquaintance_relationship_type,other_relationship_type
</sql>
<select id="selectByPrimaryKeySelective" resultMap="BaseResultMap">
@@ -79,6 +80,9 @@
<if test="record.moneyProve != null">
money_prove,
</if>
<if test="record.creditProve != null">
credit_prove,
</if>
<if test="record.education != null">
education,
</if>
@@ -165,6 +169,9 @@
<if test="record.moneyProve != null">
#{record.moneyProve},
</if>
<if test="record.creditProve != null">
#{record.creditProve},
</if>
<if test="record.education != null">
#{record.education},
</if>
@@ -254,6 +261,9 @@
<if test="record.moneyProve != null">
money_prove = #{record.moneyProve},
</if>
<if test="record.creditProve != null">
credit_prove = #{record.creditProve},
</if>
<if test="record.education != null">
education = #{record.education},
</if>
@@ -361,10 +371,10 @@
and a.workflow_status = #{workflowStatus}
</if>
<if test="workflowStatus!=null and workflowStatus=='1'">
order by b.update_time
order by a.create_time
</if>
<if test="workflowStatus!=null and workflowStatus=='0'">
order by a.create_time
order by a.update_time
</if>
</select>
@@ -428,6 +438,9 @@
<if test="record.moneyProve != null">
money_prove = #{record.moneyProve},
</if>
<if test="record.creditProve != null">
credit_prove = #{record.creditProve},
</if>
<if test="record.education != null">
education = #{record.education},
</if>

View File

@@ -335,6 +335,24 @@
<if test="userId!=null and userId!=''">
and hpli.investment_manager = #{userId}
</if>
<if test="workflowStage!=null and workflowStage!='' and workflowStage=='4' and workflowStage!=null and workflowStage!='' and workflowStage=='1'">
order by hpli.create_time
</if>
<if test="workflowStage!=null and workflowStage!='' and workflowStage=='5' and workflowStage!=null and workflowStage!='' and workflowStage=='1'">
order by hpli.update_time
</if>
<if test="workflowStage!=null and workflowStage!='' and workflowStage=='1' and workflowStage!=null and workflowStage!='' and workflowStage=='2'">
order by hpli.create_time
</if>
<if test="workflowStage!=null and workflowStage!='' and workflowStage=='0' and workflowStage!=null and workflowStage!='' and workflowStage=='2'">
order by hpli.update_time
</if>
<if test="workflowStage!=null and workflowStage!='' and workflowStage=='4' and workflowStage!=null and workflowStage!='' and workflowStage=='3'">
order by hpli.create_time
</if>
<if test="workflowStage!=null and workflowStage!='' and workflowStage=='5' and workflowStage!=null and workflowStage!='' and workflowStage=='3'">
order by hpli.update_time
</if>
</select>
<select id="getInterviewList" resultType="com.cool.store.vo.interview.InterviewVO">

View File

@@ -354,6 +354,7 @@
hpuinfo.accept_adjust_type as acceptAdjustType,
hpuinfo.mobile as partnerUserPhone,
hpuinfo.username as partnerUserName,
hpuinfo.ec_want_shop_area as ecWantShopArea,
hpuc.channel_name as channelName,
hpii.education as education,
hpii.detailed_address as detailedAddress,
@@ -534,7 +535,8 @@
hpuinfo.recommend_partner_mobile as recommendPartnerMobile,
bi.user_portrait as userPortrait,
eu.name as investmentManagerName,
eu.mobile as investmentManagerMobile
eu.mobile as investmentManagerMobile,
hptil.create_time AS allotTime
FROM
hy_partner_line_info hpli
LEFT JOIN hy_partner_intent_info hpii ON hpli.id = hpii.partner_line_id
@@ -542,6 +544,8 @@
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
LEFT JOIN hy_open_area_info hoai ON hoai.id = hpuinfo.want_shop_area
LEFT JOIN ( SELECT max(create_time) as create_time, partner_id,id FROM hy_partner_task_info_log WHERE operate_type
IN ( 'allocation_investment_manager', 'transfer_investment_manager','ec_sync_add_line' ) and deleted=0 GROUP BY partner_id ) hptil ON hpli.partner_id = hptil.partner_id
WHERE hpli.line_status in (1,2)
AND ( hpli.deleted IS NULL OR hpli.deleted = 0 )
<if test="keyword!=null and keyword!='' and keywordType!=null and keywordType=='name'">
@@ -643,7 +647,33 @@
#{developmentManager}
</foreach>
</if>
order by hpli.update_time desc
<if test="sortField!=null and sortField != '' and sortField=='updateTime' ">
order by hpli.update_time
<if test="sortOrder!=null and sortOrder != '' and sortOrder=='descend' ">
desc
</if>
<if test="sortOrder!=null and sortOrder != '' and sortOrder=='ascend' ">
asc
</if>
</if>
<if test="sortField!=null and sortField != '' and sortField=='deadline' ">
order by hpli.deadline
<if test="sortOrder!=null and sortOrder != '' and sortOrder=='descend' ">
desc
</if>
<if test="sortOrder!=null and sortOrder != '' and sortOrder=='ascend' ">
asc
</if>
</if>
<if test="sortField!=null and sortField != '' and sortField=='allotTime' ">
order by hptil.create_time
<if test="sortOrder!=null and sortOrder != '' and sortOrder=='descend' ">
desc
</if>
<if test="sortOrder!=null and sortOrder != '' and sortOrder=='ascend' ">
asc
</if>
</if>
</select>
@@ -787,5 +817,190 @@
and partner_line_id = #{lineId}
-- and deleted = 0
</select>
<select id="getPrivateSeaPageInfoNext" resultType="com.cool.store.vo.LinePageInfoVo">
SELECT
hpli.id as lineId,
hpli.partner_id as partnerId
FROM
hy_partner_line_info hpli
LEFT JOIN hy_partner_intent_info hpii ON hpli.id = hpii.partner_line_id
left join hy_partner_base_info bi on hpli.id = bi.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
LEFT JOIN hy_open_area_info hoai ON hoai.id = hpuinfo.want_shop_area
LEFT JOIN ( SELECT max(create_time) as create_time, partner_id,id FROM hy_partner_task_info_log WHERE operate_type
IN ( 'allocation_investment_manager', 'transfer_investment_manager','ec_sync_add_line' ) and deleted=0 GROUP BY partner_id ) hptil ON hpli.partner_id = hptil.partner_id
WHERE hpli.line_status in (1,2)
AND ( hpli.deleted IS NULL OR hpli.deleted = 0 )
<if test="keyword!=null and keyword!='' and keywordType!=null and keywordType=='name'">
AND (eu.name like concat('%',#{keyword},'%') or hpuinfo.username like concat('%',#{keyword},'%'))
</if>
<if test="keyword!=null and keyword!='' and 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 #{deadlineEnd}
</if>
<if test="updateStartTime!=null and updateEndTime!=null">
AND hpli.update_time BETWEEN #{updateStartTime} and #{updateEndTime}
</if>
<if test="lineStartTime != null and lineEndTime != null">
AND hpli.create_time BETWEEN #{lineStartTime} and #{lineEndTime}
</if>
<if test="intentAreaName!=null and intentAreaName!='' and intentAreaQueryType!=null and intentAreaQueryType == 'contains'">
and hoai.area_path like concat('%/',#{intentAreaName},'/%')
</if>
<if test="intentAreaName!=null and intentAreaName!='' and intentAreaQueryType!=null and intentAreaQueryType == 'notContains'">
and hoai.area_path not like concat('%/',#{intentAreaName},'/%')
</if>
<if test="intentAreaQueryType !=null and intentAreaQueryType == 'blank'">
AND hpuinfo.want_shop_area is null
</if>
<if test="acceptAdjustType!=null">
AND hpuinfo.accept_adjust_type = #{acceptAdjustType}
</if>
<if test="partnerName !=null and partnerName!=''">
AND hpuinfo.username like concat('%',#{partnerName},'%')
</if>
<if test="partnerMobile !=null and partnerMobile!=''">
AND hpuinfo.mobile like concat('%',#{partnerMobile},'%')
</if>
<if test="investmentManagerId !=null and investmentManagerId!=''">
AND hpli.investment_manager = #{investmentManagerId}
</if>
<if test="storeKeyword!=null and storeKeyword!='' and storeKeywordType!=null and storeKeywordType=='storeCode'">
AND hpuinfo.shop_code like concat('%',#{storeKeyword},'%')
</if>
<if test="storeKeyword!=null and storeKeyword!='' and storeKeywordType!=null and storeKeywordType=='storeName'">
AND hpuinfo.shop_name like concat('%',#{storeKeyword},'%')
</if>
<if test="storeKeyword!=null and storeKeyword!='' and storeKeywordType!=null and storeKeywordType=='partnerName'">
AND hpuinfo.recommend_partner_name like concat('%',#{storeKeyword},'%')
</if>
<if test="storeKeyword!=null and storeKeyword!='' and storeKeywordType!=null and storeKeywordType=='partnerMobile'">
AND hpuinfo.recommend_partner_mobile like concat('%',#{storeKeyword},'%')
</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>
</if>
<if test="userPortraitIdList!=null and userPortraitIdList.size>0 and userPortraitQueryType!=null and userPortraitQueryType=='contains'">
<foreach collection="userPortraitIdList" separator="or" open="and (" close=")" item="userPortraitId">
bi.user_portrait like concat("%,", #{userPortraitId}, ",%")
</foreach>
</if>
<if test="userPortraitIdList!=null and userPortraitIdList.size>0 and userPortraitQueryType!=null and userPortraitQueryType=='notContains'">
<foreach collection="userPortraitIdList" separator="or" open="and (" close=")" item="userPortraitId">
bi.user_portrait not like concat("%,", #{userPortraitId}, ",%")
</foreach>
</if>
<if test="userPortraitQueryType!=null and userPortraitQueryType=='blank'">
AND bi.user_portrait is null
</if>
<if test="userChannelIdList!=null and userChannelIdList.size>0 and userChannelQueryType!=null and userChannelQueryType == 'contains' ">
<foreach collection="userChannelIdList" open="and hpuinfo.user_channel_id in (" close=")" separator="," item="userChannelId">
#{userChannelId}
</foreach>
</if>
<if test="userChannelIdList!=null and userChannelIdList.size>0 and userChannelQueryType!=null and userChannelQueryType == 'notContains' ">
<foreach collection="userChannelIdList" open="and hpuinfo.user_channel_id not in (" close=")" separator="," item="userChannelId">
#{userChannelId}
</foreach>
</if>
<if test="userChannelQueryType!=null and userChannelQueryType == 'blank' ">
AND hpuinfo.user_channel_id is null
</if>
<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>
<if test="sortField!=null and sortField != '' and sortField=='updateTime' ">
order by hpli.update_time
<if test="sortOrder!=null and sortOrder != '' and sortOrder=='descend' ">
desc
</if>
<if test="sortOrder!=null and sortOrder != '' and sortOrder=='ascend' ">
asc
</if>
</if>
<if test="sortField!=null and sortField != '' and sortField=='deadline' ">
order by hpli.deadline
<if test="sortOrder!=null and sortOrder != '' and sortOrder=='descend' ">
desc
</if>
<if test="sortOrder!=null and sortOrder != '' and sortOrder=='ascend' ">
asc
</if>
</if>
<if test="sortField!=null and sortField != '' and sortField=='allotTime' ">
order by hptil.create_time
<if test="sortOrder!=null and sortOrder != '' and sortOrder=='descend' ">
desc
</if>
<if test="sortOrder!=null and sortOrder != '' and sortOrder=='ascend' ">
asc
</if>
</if>
limit #{limit1},#{limit2}
</select>
<select id="getPublicSeaPageInfoNext" resultType="com.cool.store.vo.LinePageInfoVo">
select
a.id as lineId,
a.partner_id as partnerId
FROM hy_partner_line_info a
inner JOIN hy_partner_user_info b on a.partner_id = b.partner_id
left join hy_partner_base_info bi on a.id = bi.partner_line_id
LEFT JOIN hy_open_area_info hoai ON hoai.id = b.want_shop_area
LEFT JOIN hy_phone_location hpl ON hpl.phone_number = b.mobile
where a.line_status = 0 and a.deleted = 0
<if test="lineId!=null and lineId!='' and pageTurn=='next'">
AND a.id <![CDATA[ < ]]> #{lineId}
</if>
<if test="lineId!=null and lineId!='' and pageTurn=='previous'">
AND a.id <![CDATA[ > ]]> #{lineId}
</if>
<if test="userNameKeyword!=null and userNameKeyword!=''">
and b.username like concat('%',#{userNameKeyword},'%')
</if>
<if test="phoneKeyword!=null and phoneKeyword!=''">
and b.mobile like concat('%',#{phoneKeyword},'%')
</if>
<if test="intentAreaName!=null and intentAreaName!=''">
and hoai.area_path like concat('%/',#{intentAreaName},'/%')
</if>
<if test="acceptAdjustType!=null">
and b.accept_adjust_type = #{acceptAdjustType}
</if>
<if test="updateStartTime!=null and updateEndTime!=''">
and a.update_time BETWEEN #{updateStartTime} and #{updateEndTime}
</if>
<if test="createStartTime!=null and createEndTime!=''">
and a.create_time BETWEEN #{createStartTime} and #{createEndTime}
</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>
order by a.create_time desc limit 1
</select>
</mapper>