This commit is contained in:
苏竹红
2024-04-16 17:11:58 +08:00
parent b00ee1ad8a
commit bf1432316d
2 changed files with 10 additions and 3 deletions

View File

@@ -359,7 +359,9 @@
<select id="lineList" resultMap="BaseResultMap"> <select id="lineList" resultMap="BaseResultMap">
select * from xfsg_line_info a select * from xfsg_line_info a
left join xfsg_open_area_info b on a.want_shop_area_id = b.id <if test="wantShopAreaName!=null">
left join xfsg_open_area_info b on a.want_shop_area_id = b.id
</if>
where a.deleted = 0 and a.line_status = 1 and a.join_status = 0 where a.deleted = 0 and a.line_status = 1 and a.join_status = 0
<if test="userId != null and userId != ''"> <if test="userId != null and userId != ''">
and a.investment_manager = #{userId} and a.investment_manager = #{userId}
@@ -401,7 +403,9 @@
<select id="partnerList" resultMap="BaseResultMap"> <select id="partnerList" resultMap="BaseResultMap">
select * from xfsg_line_info a select * from xfsg_line_info a
left join xfsg_open_area_info b on a.want_shop_area_id = b.id <if test="wantShopAreaName != null">
left join xfsg_open_area_info b on a.want_shop_area_id = b.id
</if>
where a.deleted = 0 and a.line_status = 1 and a.join_status in (1,2) where a.deleted = 0 and a.line_status = 1 and a.join_status in (1,2)
<if test="userId != null and userId != ''"> <if test="userId != null and userId != ''">
and a.investment_manager = #{userId} and a.investment_manager = #{userId}

View File

@@ -277,16 +277,19 @@ public class LineServiceImpl implements LineService {
if (lineInfo==null){ if (lineInfo==null){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
} }
//分配拦截 分配的时候在公海才能分配 转让不拦截
if (!lineInfo.getLineStatus().equals(LineStatusEnum.PUBLIC_SEAS.getCode())&&!transferFlag){ if (!lineInfo.getLineStatus().equals(LineStatusEnum.PUBLIC_SEAS.getCode())&&!transferFlag){
throw new ServiceException(ErrorCodeEnum.NOT_IN_PUBLIC_SEA); throw new ServiceException(ErrorCodeEnum.NOT_IN_PUBLIC_SEA);
} }
if (lineInfo.getInvestmentManager().equals(changeInvestmentRequest.getInvestmentManagerId())){ //转让的时候拦截 且不能转让给自己
if (lineInfo.getInvestmentManager().equals(changeInvestmentRequest.getInvestmentManagerId())&&transferFlag){
throw new ServiceException(ErrorCodeEnum.NO_TRANSFER_REQUIRED); throw new ServiceException(ErrorCodeEnum.NO_TRANSFER_REQUIRED);
} }
//如果线索招商经理为空 直接分配 如果不为空 且线索在公海 说明线索被结束 需要重置ID 生成一条新的线索 //如果线索招商经理为空 直接分配 如果不为空 且线索在公海 说明线索被结束 需要重置ID 生成一条新的线索
lineInfo.setLineStatus(LineStatusEnum.PRIVATE_SEAS.getCode()); lineInfo.setLineStatus(LineStatusEnum.PRIVATE_SEAS.getCode());
lineInfo.setInvestmentManager(changeInvestmentRequest.getInvestmentManagerId()); lineInfo.setInvestmentManager(changeInvestmentRequest.getInvestmentManagerId());
lineInfo.setUpdateUserId(userInfo.getUserId());
lineInfoDAO.updateLineInfo(lineInfo); lineInfoDAO.updateLineInfo(lineInfo);
if (transferFlag){ if (transferFlag){
//添加日志 //添加日志