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

This commit is contained in:
zhangchenbiao
2024-04-02 09:58:41 +08:00
43 changed files with 1306 additions and 62 deletions

View File

@@ -8,6 +8,7 @@ import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.LineInfoMapper;
import com.cool.store.request.LineListRequest;
import com.cool.store.request.PartnerRequest;
import com.cool.store.request.PublicLineListRequest;
import com.cool.store.vo.PublicLineListVO;
import lombok.extern.slf4j.Slf4j;
@@ -81,18 +82,31 @@ public class LineInfoDAO {
return null;
}
public List<LineInfoDO> listByInvestmentManager(String investmentManagerUserId,Integer subStageStatus) {
public List<LineInfoDO> listByInvestmentManager(String investmentManagerUserId,List<Integer> subStageStatus) {
if (StringUtils.isBlank(investmentManagerUserId)){
return null;
}
List<LineInfoDO> lineInfo = lineInfoMapper.listByInvestmentManager(investmentManagerUserId,subStageStatus);
return lineInfo;
}
public List<LineInfoDO> listByInterview(String interviewId, Integer interviewType,List<Integer> subStageStatus) {
if (StringUtils.isBlank(interviewId)){
return null;
}
List<LineInfoDO> lineInfo = lineInfoMapper.listByInterview(interviewId,interviewType,subStageStatus);
return lineInfo;
}
public List<LineInfoDO> lineList(LineListRequest lineListRequest, String userId, List<Long> wantShopAreaIds) {
List<LineInfoDO> lineInfo = lineInfoMapper.lineList(lineListRequest,userId,wantShopAreaIds);
return lineInfo;
}
public List<LineInfoDO> partnerList(PartnerRequest partnerRequest,String wantShopAreaName, String userId, List<Long> wantShopAreaIds) {
List<LineInfoDO> lineInfo = lineInfoMapper.partnerList(partnerRequest,wantShopAreaName,userId,wantShopAreaIds);
return lineInfo;
}
public List<LineInfoDO> publicLineList(PublicLineListRequest publicLineListRequest) {
List<LineInfoDO> lineInfo = lineInfoMapper.publicLineList(publicLineListRequest);
return lineInfo;

View File

@@ -8,10 +8,12 @@ import com.cool.store.request.LineInterviewPageRequest;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
@@ -36,7 +38,7 @@ public class LineInterviewDAO {
public List<LineInterviewDO> getInterviewByLindIds(List<Long> lineIds, InterviewTypeEnum interviewType){
if(CollectionUtils.isEmpty(lineIds) || Objects.isNull(interviewType)){
return null;
return Lists.newArrayList();
}
return lineInterviewMapper.getInterviewByLindIds(lineIds, interviewType.getCode());
}

View File

@@ -6,7 +6,8 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.Objects;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author wxp
@@ -38,4 +39,13 @@ public class LinePayDAO {
return linePayMapper.updateByPrimaryKeySelective(linePayDO);
}
public Map<Long,LinePayDO> getLinePayByLineIds(List<Long> lineIds) {
if(Objects.isNull(lineIds) || lineIds.size() == 0){
return new HashMap<>();
}
List<LinePayDO> linePayDO = linePayMapper.getLinePayByLineIds(lineIds);
return linePayDO.stream().collect(Collectors.toMap(LinePayDO::getLineId, linePayDO1 -> linePayDO1, (o, n) -> o));
}
}

View File

@@ -5,6 +5,8 @@ import com.cool.store.request.IntentAgreementSubmitRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface IntentAgreementMapper {
@@ -19,4 +21,15 @@ public interface IntentAgreementMapper {
* @return
*/
SigningBaseInfoDO judge(@Param("request") IntentAgreementSubmitRequest request);
void updateAuditId(@Param("lineId") Long id,
@Param("auditId") Long auditId);
/**
* 查询签约信息
* @param lineIds
* @return
*/
List<SigningBaseInfoDO> selectByLineIds(List<Long> lineIds);
}

View File

@@ -3,6 +3,7 @@ package com.cool.store.mapper;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.request.LineListRequest;
import com.cool.store.request.PartnerRequest;
import com.cool.store.request.PublicLineListRequest;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
@@ -19,7 +20,16 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
* @param investmentManagerUserId
* @return
*/
List<LineInfoDO> listByInvestmentManager(@Param("investmentManagerUserId") String investmentManagerUserId, @Param("code") Integer code);
List<LineInfoDO> listByInvestmentManager(@Param("investmentManagerUserId") String investmentManagerUserId, @Param("codes") List<Integer> codes);
/**
* 面试官待处理
* @param interviewId
* @param interviewType
* @param codes
* @return
*/
List<LineInfoDO> listByInterview(@Param("interviewId") String interviewId, @Param("interviewType") Integer interviewType, @Param("codes") List<Integer> codes);
/**
* 我的线索列表
@@ -30,13 +40,22 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
@Param("userId") String userId,
@Param("wantShopAreaIds") List<Long> wantShopAreaIds);
List<LineInfoDO> partnerList(@Param("request") PartnerRequest partnerRequest,
@Param("wantShopAreaName") String wantShopAreaName,
@Param("userId") String userId,
@Param("wantShopAreaIds") List<Long> wantShopAreaIds);
/**
* 公海线索列表
* @param publicLineListVO
* @param publicLineListRequest
* @return
*/
List<LineInfoDO> publicLineList(@Param("request") PublicLineListRequest publicLineListRequest);
/**
* 根据lineId判断是更新还是插入
* @param lineInfoParam
*/
void insertOrUpdate(@Param("param") LineInfoDO lineInfoParam);
}

View File

@@ -3,6 +3,8 @@ package com.cool.store.mapper;
import com.cool.store.entity.LinePayDO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author wxp
* @date 2024-03-27 09:25
@@ -39,4 +41,11 @@ public interface LinePayMapper {
LinePayDO getLinePayByLineId(@Param("lineId") Long lineId);
/**
* getLinePayByLineIds
* @param lineIds
* @return
*/
List<LinePayDO> getLinePayByLineIds(@Param("lineIds") List<Long> lineIds);
}

View File

@@ -48,6 +48,8 @@ public interface SysRoleMapper {
*/
List<SysRoleDO> getRolesByName(@Param("roleName") String roleName);
SysRoleDO getRolesByNameAndSource(@Param("roleName") String roleName, @Param("source") String source);
/**
* 查询角色详情
* @param roleId

View File

@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import javax.websocket.server.PathParam;
import java.util.List;
@Mapper
public interface TrainingExperienceMapper {
@@ -16,4 +17,6 @@ public interface TrainingExperienceMapper {
@Param("abandonCause") String abandonCause);
LeaseBaseInfoDO selectByLineId(@Param("lineId") Long lineId);
List<LeaseBaseInfoDO> selectByLineIds(@Param("lineIds") List<Long> lineIds);
}

View File

@@ -76,6 +76,11 @@
<if test="request.businessLicenseAddress != null">#{request.businessLicenseAddress},</if>
</trim>
</insert>
<update id="updateAuditId">
update xfsg_signing_base_info
set audit_id = #{auditId}
where line_id = #{lineId}
</update>
<select id="selectByPartnerIdOrLineId" resultType="com.cool.store.entity.SigningBaseInfoDO">
select
<include refid="Base_Column_List"/>
@@ -105,5 +110,16 @@
</where>
</select>
<select id="selectByLineIds" resultType="com.cool.store.entity.SigningBaseInfoDO">
select
<include refid="Base_Column_List"/>
from xfsg_signing_base_info
where deleted = 0
<if test="lineIds !=null and lineIds.size>0">
<foreach collection="lineIds" item="lineId" open="and line_id in (" close=")" separator=",">
#{lineId}
</foreach>
</if>
</select>
</mapper>

View File

@@ -291,17 +291,35 @@
<select id="listByInvestmentManager" resultMap="BaseResultMap">
select * from xfsg_line_info
where deleted = 0
and workflow_sub_stage_status = 5
<if test="investmentManagerUserId != null and investmentManagerUserId != ''">
and investment_manager = #{investmentManagerUserId}
</if>
<if test="code != null">
and workflow_sub_stage_status = #{code}
<if test="codes !=null and codes.size>0">
<foreach collection="codes" item="code" open="and workflow_sub_stage_status in (" close=")" separator=",">
#{code}
</foreach>
</if>
</select>
<select id="listByInterview" resultMap="BaseResultMap">
select * from xfsg_line_info
where deleted = 0
<if test="interviewType != null and interviewType == '1'">
and first_interviewer = #{investmentManagerUserId}
</if>
<if test="interviewType != null and interviewType == '2'">
and second_interviewer = #{investmentManagerUserId}
</if>
<if test="codes !=null and codes.size>0">
<foreach collection="codes" item="code" open="and workflow_sub_stage_status in (" close=")" separator=",">
#{code}
</foreach>
</if>
</select>
<select id="lineList" resultMap="BaseResultMap">
select * from xfsg_line_info
where deleted = 0 and line_status = 1 and join_status = 0
@@ -311,6 +329,9 @@
<if test="request.userName != null and request.username!=''">
and username = #{request.userName}
</if>
<if test="request.keyword != null and request.keyword!=''">
and (a.username like #{request.userName} or a.mobile like #{request.mobile})
</if>
<if test="request.mobile != null and request.mobile!=''">
and mobile = #{request.mobile}
</if>
@@ -334,6 +355,36 @@
</select>
<select id="partnerList" resultMap="BaseResultMap">
select * from xfsg_line_info a
left join xfsg_open_area_info b on a.want_shop_area_id = b.id
where a.deleted = 0 and a.line_status = 1 and a.join_status in (1,2)
<if test="userId != null and userId != ''">
and a.investment_manager = #{userId}
</if>
<if test="request.keyword != null and request.keyword!=''">
and (a.username like #{request.userName} or a.mobile like #{request.mobile})
</if>
<if test="wantShopAreaName != null">
and b.area_path like concat('%',#{wantShopAreaName},'%')
</if>
<if test="request.queryUserId!=null and request.queryUserId!=''">
<if test="request.queryType != null and request.queryType == '1' ">
and a.investment_manager = #{request.queryUserId}
</if>
<if test="request.queryType != null and request.queryType == '2' ">
and a.development_manager = #{request.queryUserId}
</if>
</if>
<if test="wantShopAreaIds !=null and wantShopAreaIds.size>0">
<foreach collection="wantShopAreaIds" item="wantShopAreaId" open="and a.want_shop_area_id in (" close=")" separator=",">
#{wantShopAreaId}
</foreach>
</if>
</select>
<select id="publicLineList" resultMap="BaseResultMap">
select * from xfsg_line_info
where deleted = 0 and line_status = 0 and join_status = 0
@@ -343,6 +394,9 @@
<if test="request.mobile != null and request.mobile!=''">
and mobile = #{request.mobile}
</if>
<if test="request.keyword != null and request.keyword!=''">
and (a.username like #{request.userName} or a.mobile like #{request.mobile})
</if>
<if test="request.lineSource != null">
and line_source = #{request.lineSource}
</if>

View File

@@ -280,4 +280,13 @@
<select id="getLinePayByLineId" resultMap="BaseResultMap">
select * from xfsg_line_pay where line_id = #{lineId} and deleted = '0'
</select>
<select id="getLinePayByLineIds" resultMap="BaseResultMap">
select * from xfsg_line_pay where deleted = 0
<if test="lineIds !=null and lineIds.size>0">
<foreach collection="lineIds" item="lineId" open="and line_id in (" close=")" separator=",">
#{lineId}
</foreach>
</if>
</select>
</mapper>

View File

@@ -137,6 +137,15 @@
</select>
<select id="getRolesByNameAndSource" resultType="com.cool.store.entity.SysRoleDO">
select
id as id,
role_name as roleName,
role_auth as roleAuth
from sys_role_${enterpriseId}
where role_name = #{roleName} and source = #{source}
</select>
<select id="getRole" resultType="com.cool.store.entity.SysRoleDO">
select
id as id,

View File

@@ -76,6 +76,18 @@
from xfsg_lease_base_info
where line_id = #{lineId}
</select>
<select id="selectByLineIds" resultType="com.cool.store.entity.LeaseBaseInfoDO">
select
<include refid="Base_Column_List"/>
from xfsg_lease_base_info
<where>
<if test="lineIds !=null and lineIds.size>0">
<foreach collection="lineIds" item="lineId" open="and line_id in (" close=")" separator=",">
#{lineId}
</foreach>
</if>
</where>
</select>
</mapper>