Merge remote-tracking branch 'hs/dev/feat/partner1.3_20230828' into dev/feat/partner1.3_20230828
This commit is contained in:
@@ -10,10 +10,10 @@ import com.alibaba.fastjson.JSONObject;
|
||||
public enum FeiShuNoticeMsgEnum {
|
||||
|
||||
common_notice("工作台通知", "{0}", "img_v2_45d7a901-1eab-498b-a760-b38d287f0c1g"),
|
||||
ALLOCATION_INVESTMENT_MANAGER("分配招商经理", "有新的线索 于 {0} 分配给您,线索信息{1}手机号{2},请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g"),
|
||||
TRANS_INVESTMENT_MANAGER("转让招商经理", "有新的线索 于 {0} 转让给您,线索信息{1}手机号{2},请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g"),
|
||||
BATCH_TRANS_INVESTMENT_MANAGER("收到新线索", "有{0}条新线索 于 {1} 转让给您,请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g"),
|
||||
INTENTION_APPLY("加盟意向申请", "您有一个【加盟意向申请】待审核,申请人{0}手机号{1}于 {2} 提交加盟意向申请,请及时处理", "img_v2_69eb6e5f-bf12-4a02-a47f-b17ce24fcfeg"),
|
||||
ALLOCATION_INVESTMENT_MANAGER("分配招商经理", "有新的线索于 {0} 分配给您,线索信息 {1} 手机号 {2},请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g"),
|
||||
TRANS_INVESTMENT_MANAGER("转让招商经理", "有新的线索于 {0} 转让给您,线索信息 {1} 手机号 {2},请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g"),
|
||||
BATCH_TRANS_INVESTMENT_MANAGER("收到新线索", "有{0}条新线索于 {1} 转让给您,请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g"),
|
||||
INTENTION_APPLY("加盟意向申请", "您有一个【加盟意向申请】待审核,申请人 {0} 手机号 {1} 于 {2} 提交加盟意向申请,请及时处理", "img_v2_69eb6e5f-bf12-4a02-a47f-b17ce24fcfeg"),
|
||||
FOLLOW_TASK("线索跟进任务", "{0}", "img_v2_1960b7ef-8c4e-4c3d-8b67-3d918a85578g"),
|
||||
INTERVIEW_APPOINTMENT("面试预约申请", "{0}","img_v2_107bb06b-2a7a-43e1-a6ae-e5d2f2dae17g"),
|
||||
;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
from hy_outbound_mobile
|
||||
where deleted = 0
|
||||
<if test="id != null">
|
||||
id = #{id}
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="mobile != null and mobile != ''">
|
||||
and mobile = #{mobile}
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
update_user_id = #{updateUserId},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark},
|
||||
remark = #{remark}
|
||||
</if>
|
||||
</set>
|
||||
where deleted = 0
|
||||
|
||||
@@ -6,9 +6,7 @@ import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author Fun Li
|
||||
@@ -41,8 +39,8 @@ public class HyOutboundMobileDO {
|
||||
private Boolean deleted;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -114,7 +114,9 @@ public class PartnerIntentApplyInfoVO {
|
||||
String trimmedPart = part.trim();
|
||||
if (!trimmedPart.isEmpty()) {
|
||||
try {
|
||||
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
|
||||
if (userPortraitMap.get(Long.valueOf(part)) != null){
|
||||
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
log.info("Invalid format: {}" , trimmedPart);
|
||||
}
|
||||
|
||||
@@ -145,7 +145,9 @@ public class PrivateSeaLineListVo {
|
||||
String trimmedPart = part.trim();
|
||||
if (!trimmedPart.isEmpty()) {
|
||||
try {
|
||||
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
|
||||
if (userPortraitMap.get(Long.valueOf(part)) != null){
|
||||
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
log.info("Invalid format: {}" , trimmedPart);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.cool.store.dto.outbound.DeleteNumberDTO;
|
||||
import com.cool.store.dto.outbound.OutboundListDTO;
|
||||
import com.cool.store.dto.outbound.UpdateNumberDTO;
|
||||
import com.cool.store.entity.HyOutboundMobileDO;
|
||||
import com.cool.store.entity.HyPartnerLabelGroupDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.mapper.HyOutboundMobileMapper;
|
||||
@@ -14,6 +15,7 @@ import com.cool.store.vo.HyOutboundVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -41,12 +43,12 @@ public class HyOutboundServiceImpl implements HyOutboundService {
|
||||
*/
|
||||
@Override
|
||||
public void addOutboundNumber(AddNumberDTO dto) throws ApiException {
|
||||
if (whetherRepeat(dto.getOutboundNumber())) {
|
||||
HyOutboundMobileDO hyOutboundMobile = new HyOutboundMobileDO();
|
||||
hyOutboundMobile.setMobile(dto.getOutboundNumber());
|
||||
if (whetherRepeat(hyOutboundMobile)) {
|
||||
throw new ApiException(ErrorCodeEnum.OUTBOUND_NUMBER_EXIST);
|
||||
}
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
HyOutboundMobileDO hyOutboundMobile = new HyOutboundMobileDO();
|
||||
hyOutboundMobile.setMobile(dto.getOutboundNumber());
|
||||
hyOutboundMobile.setEditUserId(userId);
|
||||
hyOutboundMobile.setCreateUserId(userId);
|
||||
hyOutboundMobile.setUpdateUserId(userId);
|
||||
@@ -59,15 +61,16 @@ public class HyOutboundServiceImpl implements HyOutboundService {
|
||||
*/
|
||||
@Override
|
||||
public void updateOutboundNumber(UpdateNumberDTO dto) throws ApiException {
|
||||
if (whetherRepeat(dto.getNewOutboundNumber())) {
|
||||
throw new ApiException(ErrorCodeEnum.OUTBOUND_NUMBER_EXIST);
|
||||
}
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
HyOutboundMobileDO hyOutboundMobile = new HyOutboundMobileDO();
|
||||
hyOutboundMobile.setId(dto.getId());
|
||||
hyOutboundMobile.setMobile(dto.getNewOutboundNumber());
|
||||
if (whetherRepeat(hyOutboundMobile)) {
|
||||
throw new ApiException(ErrorCodeEnum.OUTBOUND_NUMBER_EXIST);
|
||||
}
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
hyOutboundMobile.setEditUserId(userId);
|
||||
hyOutboundMobile.setUpdateUserId(userId);
|
||||
hyOutboundMobile.setUpdateTime(new Date());
|
||||
outboundMobileMapper.updateByPrimaryKeySelective(hyOutboundMobile);
|
||||
}
|
||||
|
||||
@@ -87,14 +90,23 @@ public class HyOutboundServiceImpl implements HyOutboundService {
|
||||
|
||||
/**
|
||||
* 查询某个手机号是否重复
|
||||
* @param number 手机号
|
||||
* @param hyOutboundMobileDO 手机号信息
|
||||
* @return 是否重复
|
||||
*/
|
||||
public boolean whetherRepeat(String number) {
|
||||
HyOutboundMobileDO hyOutboundMobileDO = new HyOutboundMobileDO();
|
||||
hyOutboundMobileDO.setMobile(number);
|
||||
public boolean whetherRepeat(HyOutboundMobileDO hyOutboundMobileDO) {
|
||||
Long id = hyOutboundMobileDO.getId();
|
||||
hyOutboundMobileDO.setId(null);
|
||||
List<HyOutboundMobileDO> outboundMobileList = outboundMobileMapper.selectByPrimarySelective(hyOutboundMobileDO);
|
||||
return outboundMobileList != null && outboundMobileList.size() != 0;
|
||||
hyOutboundMobileDO.setId(id);
|
||||
//如果修改后的号码与原号码一致也不算重复,但是要记录更新人
|
||||
if (outboundMobileList != null && outboundMobileList.size() > 0) {
|
||||
//更新操作还要检查是否与原号码信息相同,相同的话也不算重复
|
||||
if (outboundMobileList.get(0).getId().equals(id)) {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -222,6 +222,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
if (CollectionUtils.isEmpty(request.getLineIds())||StringUtils.isEmpty(request.getUserId())){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
int num = request.getLineIds().size();
|
||||
List<HyPartnerLineInfoDO> hyPartnerLineInfoList = hyPartnerLineInfoDAO.getHyPartnerLineInfoList(request.getLineIds(), request.getUserId());
|
||||
//如果选中的线索中有线索招商经理已经是被装让的招商经理,则不允许批量操作
|
||||
if (CollectionUtils.isNotEmpty(hyPartnerLineInfoList)){
|
||||
@@ -232,13 +233,13 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
transferInvestmentManagerRequest.setUserId(request.getUserId());
|
||||
transferInvestmentManagerRequest.setLineId(lineId);
|
||||
try {
|
||||
this.transferInvestmentManager(user,transferInvestmentManagerRequest,Boolean.FALSE);
|
||||
this.transferInvestmentManager(user,transferInvestmentManagerRequest,num<=1?true:false);
|
||||
} catch (ApiException e) {
|
||||
log.info("transferInvestmentManager_success Transfer_interview_management_failed,lineId:{}",lineId);
|
||||
}
|
||||
}
|
||||
if (request.getLineIds().size()!=0){
|
||||
noticeService.sendFeiShuNotice(FeiShuNoticeMsgEnum.BATCH_TRANS_INVESTMENT_MANAGER,Arrays.asList(request.getUserId()),request.getLineIds().size(),DateUtil.format(new Date(),CoolDateUtils.DATE_FORMAT_SEC_7));
|
||||
if (num>1){
|
||||
noticeService.sendFeiShuNotice(FeiShuNoticeMsgEnum.BATCH_TRANS_INVESTMENT_MANAGER,Arrays.asList(request.getUserId()),num,DateUtil.format(new Date(),CoolDateUtils.DATE_FORMAT_SEC_7));
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
@@ -722,12 +723,13 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
}
|
||||
//省内调剂 有重点或者开放的 分配
|
||||
if (AcceptAdjustTypeEnum.PROVINCIAL_ADJUSTMENT.getCode().equals(acceptAdjustType)){
|
||||
|
||||
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOList= new ArrayList<>();
|
||||
if(hyOpenAreaInfoDO != null){
|
||||
String areaPath = hyOpenAreaInfoDO.getAreaPath();
|
||||
String province = areaPath.substring(0, areaPath.indexOf("/", areaPath.indexOf("/") + 1));
|
||||
hyOpenAreaInfoDOList = hyOpenAreaInfoDAO.queryByKeyword(province, true, null, true);
|
||||
//过滤一级目录
|
||||
hyOpenAreaInfoDOList = hyOpenAreaInfoDOList.stream().filter(x->x.getParentId()!=null).collect(Collectors.toList());
|
||||
}
|
||||
if (hyOpenAreaInfoDOList.size()>CommonConstants.ZERO){
|
||||
return Boolean.TRUE;
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.cool.store.dto.label.LabelGroupAddDTO;
|
||||
import com.cool.store.dto.label.LabelGroupDeleteDTO;
|
||||
import com.cool.store.dto.label.LabelGroupListDTO;
|
||||
import com.cool.store.dto.label.LabelGroupUpdateDTO;
|
||||
import com.cool.store.entity.HyPartnerLabelDO;
|
||||
import com.cool.store.entity.HyPartnerLabelGroupDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
@@ -70,6 +71,7 @@ public class LabelGroupServiceImpl implements LabelGroupService {
|
||||
public void updateLabelGroup(LabelGroupUpdateDTO dto) throws ApiException {
|
||||
HyPartnerLabelGroupDO labelGroupDO = new HyPartnerLabelGroupDO();
|
||||
labelGroupDO.setLabelGroupName(dto.getLabelGroupName());
|
||||
labelGroupDO.setId(dto.getId());
|
||||
if (whetherGroupDuplicated(labelGroupDO)) {
|
||||
throw new ApiException(ErrorCodeEnum.LABEL_GROUP_EXIST);
|
||||
}
|
||||
@@ -117,8 +119,19 @@ public class LabelGroupServiceImpl implements LabelGroupService {
|
||||
}
|
||||
|
||||
private Boolean whetherGroupDuplicated(HyPartnerLabelGroupDO labelGroupDO) {
|
||||
Long id = labelGroupDO.getId();
|
||||
labelGroupDO.setId(null);
|
||||
List<HyPartnerLabelGroupDO> hyPartnerLabelGroupDOS = labelGroupMapper.selectSelective(labelGroupDO);
|
||||
return hyPartnerLabelGroupDOS != null && hyPartnerLabelGroupDOS.size() > 0;
|
||||
labelGroupDO.setId(id);
|
||||
//如果修改后的标签组名与原标签组名一致也不算重复,但是要记录更新人
|
||||
if (hyPartnerLabelGroupDOS != null && hyPartnerLabelGroupDOS.size() > 0) {
|
||||
//更新操作还要检查是否与原标签组信息相同,相同的话也不算重复
|
||||
if (hyPartnerLabelGroupDOS.get(0).getId().equals(id)) {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -69,12 +69,12 @@ public class LabelServiceImpl implements LabelService {
|
||||
@Override
|
||||
public void updateLabel(LabelUpdateDTO dto) throws ApiException {
|
||||
HyPartnerLabelDO labelDO = new HyPartnerLabelDO();
|
||||
labelDO.setId(dto.getId());
|
||||
labelDO.setLabelName(dto.getLabelName());
|
||||
if (whetherLabelRepeat(labelDO)) {
|
||||
throw new ApiException(ErrorCodeEnum.LABEL_EXIST);
|
||||
}
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
labelDO.setId(dto.getId());
|
||||
labelDO.setLabelGroupId(dto.getLabelGroupId());
|
||||
labelDO.setEditUserId(userId);
|
||||
labelDO.setEditDate(new Date());
|
||||
@@ -99,8 +99,16 @@ public class LabelServiceImpl implements LabelService {
|
||||
}
|
||||
|
||||
private Boolean whetherLabelRepeat(HyPartnerLabelDO label) throws ApiException {
|
||||
Long id = label.getId();
|
||||
label.setId(null);
|
||||
List<HyPartnerLabelDO> hyPartnerLabelDOS = labelMapper.selectSelective(label);
|
||||
label.setId(id);
|
||||
//如果修改后的标签名与原标签名一致也不算重复,但是要记录更新人
|
||||
if (hyPartnerLabelDOS != null && hyPartnerLabelDOS.size() > 0) {
|
||||
//更新操作还要检查是否与原标签信息相同,相同的话也不算重复
|
||||
if (hyPartnerLabelDOS.get(0).getId().equals(id)) {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
@@ -139,7 +147,9 @@ public class LabelServiceImpl implements LabelService {
|
||||
String trimmedPart = part.trim();
|
||||
if (!trimmedPart.isEmpty()) {
|
||||
try {
|
||||
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
|
||||
if (userPortraitMap.get(Long.valueOf(part)) != null){
|
||||
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
log.info("Invalid format: {}" , trimmedPart);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user