-分配招商经理优化
This commit is contained in:
@@ -55,9 +55,9 @@ public interface HyPartnerLineInfoService {
|
||||
* @param lineId
|
||||
* @return
|
||||
*/
|
||||
Boolean transferInvestmentManager(String user, TransferInvestmentManagerRequest request,Boolean sendFlag) throws ApiException;
|
||||
Boolean transferInvestmentManager(LoginUserInfo user, TransferInvestmentManagerRequest request,Boolean sendFlag) throws ApiException;
|
||||
|
||||
List<BatchTransferVO> batchTransferInvestmentManager(String userId, BatchTransferInvestmentManagerRequest request) throws ApiException;
|
||||
List<BatchTransferVO> batchTransferInvestmentManager(LoginUserInfo user, BatchTransferInvestmentManagerRequest request) throws ApiException;
|
||||
|
||||
/**
|
||||
* 分配招商经理
|
||||
|
||||
@@ -168,14 +168,10 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean transferInvestmentManager(String userId, TransferInvestmentManagerRequest request,Boolean sendFlag) throws ApiException {
|
||||
public Boolean transferInvestmentManager(LoginUserInfo user, TransferInvestmentManagerRequest request,Boolean sendFlag) throws ApiException {
|
||||
if (StringUtil.isBlank(request.getUserId())||request.getLineId()==null){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
EnterpriseUserDO user = enterpriseUserDAO.getUserInfoById(userId);
|
||||
if (user==null){
|
||||
throw new ServiceException(ErrorCodeEnum.INVESTMENT_MANAGER_NOT_EXIST);
|
||||
}
|
||||
HyPartnerLineInfoDO hyPartnerLineInfoDO = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(request.getLineId());
|
||||
//如果招商经理是当前登录用户,则无需转让
|
||||
if (request.getUserId().equals(hyPartnerLineInfoDO.getInvestmentManager())){
|
||||
@@ -232,7 +228,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BatchTransferVO> batchTransferInvestmentManager(String userId, BatchTransferInvestmentManagerRequest request) throws ApiException {
|
||||
public List<BatchTransferVO> batchTransferInvestmentManager(LoginUserInfo user, BatchTransferInvestmentManagerRequest request) throws ApiException {
|
||||
if (CollectionUtils.isEmpty(request.getLineIds())||StringUtils.isEmpty(request.getUserId())){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
@@ -249,7 +245,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
transferInvestmentManagerRequest.setUserId(request.getUserId());
|
||||
transferInvestmentManagerRequest.setLineId(lineId);
|
||||
try {
|
||||
this.transferInvestmentManager(userId,transferInvestmentManagerRequest,Boolean.FALSE);
|
||||
this.transferInvestmentManager(user,transferInvestmentManagerRequest,Boolean.FALSE);
|
||||
successLineIds.add(lineId);
|
||||
} catch (Exception e) {
|
||||
log.info("transferInvestmentManager_success Transfer_interview_management_failed,lineId:{}",lineId);
|
||||
|
||||
Reference in New Issue
Block a user