私海
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)){
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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