Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -359,7 +359,9 @@
|
||||
|
||||
<select id="lineList" resultMap="BaseResultMap">
|
||||
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
|
||||
<if test="userId != null and userId != ''">
|
||||
and a.investment_manager = #{userId}
|
||||
@@ -401,7 +403,9 @@
|
||||
|
||||
<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
|
||||
<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)
|
||||
<if test="userId != null and userId != ''">
|
||||
and a.investment_manager = #{userId}
|
||||
|
||||
@@ -277,16 +277,19 @@ public class LineServiceImpl implements LineService {
|
||||
if (lineInfo==null){
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
//分配拦截 分配的时候在公海才能分配 转让不拦截
|
||||
if (!lineInfo.getLineStatus().equals(LineStatusEnum.PUBLIC_SEAS.getCode())&&!transferFlag){
|
||||
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);
|
||||
}
|
||||
|
||||
//如果线索招商经理为空 直接分配 如果不为空 且线索在公海 说明线索被结束 需要重置ID 生成一条新的线索
|
||||
lineInfo.setLineStatus(LineStatusEnum.PRIVATE_SEAS.getCode());
|
||||
lineInfo.setInvestmentManager(changeInvestmentRequest.getInvestmentManagerId());
|
||||
lineInfo.setUpdateUserId(userInfo.getUserId());
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
if (transferFlag){
|
||||
//添加日志
|
||||
|
||||
Reference in New Issue
Block a user