更改ec日志展示

This commit is contained in:
xiaodong.hu
2023-10-30 18:02:57 +08:00
parent 0d99364862
commit bb63eee4fa
3 changed files with 18 additions and 6 deletions

View File

@@ -45,7 +45,7 @@ public enum TrajectoryTypeEnum {
TRANSFER_CUSTOMER(3009, "转让客户","将此客户转换了给"), TRANSFER_CUSTOMER(3009, "转让客户","将此客户转换了给"),
MERGE_CUSTOMER(3010, "合并客户",""), MERGE_CUSTOMER(3010, "合并客户",""),
ALLOCATION_CUSTOMER(3011, "分配客户","分配此客户给"), ALLOCATION_CUSTOMER(3011, "分配客户","分配此客户给"),
GET_CUSTOMER(3012, "领取客户",""), GET_CUSTOMER(3012, "领取客户","领取了此客户"),
ABANDON_CUSTOMER(3013, "放弃客户",""), ABANDON_CUSTOMER(3013, "放弃客户",""),
ADD_MARKER_PLAN(3014, "添加销售计划",""), ADD_MARKER_PLAN(3014, "添加销售计划",""),
UPDATE_MARKER_PLAN(3015, "修改销售计划",""), UPDATE_MARKER_PLAN(3015, "修改销售计划",""),

View File

@@ -109,7 +109,11 @@ public class HyPartnerEcTrackLogDO implements Serializable {
*/ */
public static String getDetailContentJoint(HyPartnerEcTrackLogDO ecLogVo){ public static String getDetailContentJoint(HyPartnerEcTrackLogDO ecLogVo){
if (StringUtils.isNotEmpty(ecLogVo.getContent())) { if (StringUtils.isNotEmpty(ecLogVo.getContent())) {
return ecLogVo.getContent(); String str = ecLogVo.getContent();
if (str.contains("[mobile]")||str.contains("[/mobile]")) {
str = str.replaceAll("\\[mobile]", "").replaceAll("\\[/mobile]", "");
}
return str;
} }
StringBuilder detailContent = new StringBuilder(); StringBuilder detailContent = new StringBuilder();
Integer trajectoryType = ecLogVo.getTrajectoryType(); Integer trajectoryType = ecLogVo.getTrajectoryType();
@@ -120,7 +124,7 @@ public class HyPartnerEcTrackLogDO implements Serializable {
detailContent.append(TrajectoryTypeEnum.ALLOCATION_CUSTOMER.getJointText()).append(ecLogVo.getReceiveUser()); detailContent.append(TrajectoryTypeEnum.ALLOCATION_CUSTOMER.getJointText()).append(ecLogVo.getReceiveUser());
} }
if (trajectoryType.equals(TrajectoryTypeEnum.GET_CUSTOMER.getValue())) { if (trajectoryType.equals(TrajectoryTypeEnum.GET_CUSTOMER.getValue())) {
detailContent.append(ecLogVo.getReceiveUser()).append(TrajectoryTypeEnum.GET_CUSTOMER.getJointText()); detailContent.append(ecLogVo.getUserName()).append(TrajectoryTypeEnum.GET_CUSTOMER.getJointText());
} }
if (StringUtils.isEmpty(detailContent)) { if (StringUtils.isEmpty(detailContent)) {
detailContent.append(TrajectoryTypeEnum.getShowText(trajectoryType)); detailContent.append(TrajectoryTypeEnum.getShowText(trajectoryType));

View File

@@ -380,9 +380,17 @@ public class EcSyncServiceImpl implements EcSyncService {
* @param newUserPortrait * @param newUserPortrait
*/ */
private void updateUserPortrait(HyPartnerBaseInfoDO partnerIdAndLine, String oldUserPortrait, String newUserPortrait) { private void updateUserPortrait(HyPartnerBaseInfoDO partnerIdAndLine, String oldUserPortrait, String newUserPortrait) {
if (StringUtil.isNotEmpty(newUserPortrait) && !oldUserPortrait.equals(newUserPortrait)) { if (StringUtil.isEmpty(newUserPortrait)||ObjectUtil.isNull(partnerIdAndLine)) {
List<String> oldList = Arrays.asList(oldUserPortrait.split(Constants.COMMA)); return;
List<String> newList = Arrays.asList(newUserPortrait.split(Constants.COMMA)); }
if (StringUtil.isEmpty(oldUserPortrait)) {
partnerIdAndLine.setUserPortrait(newUserPortrait);
hyPartnerBaseInfoDAO.updateByPrimaryKeySelective(partnerIdAndLine);
return;
}
if (!newUserPortrait.equals(oldUserPortrait)) {
List<String> oldList = new ArrayList<>(Arrays.asList(oldUserPortrait.split(Constants.COMMA))).stream().filter(item->StringUtil.isNotEmpty(item)).collect(Collectors.toList());
List<String> newList = new ArrayList<>(Arrays.asList(newUserPortrait.split(Constants.COMMA))).stream().filter(item->StringUtil.isNotEmpty(item)).collect(Collectors.toList());
oldList.addAll(newList); oldList.addAll(newList);
String userPortrait = Constants.COMMA.concat(oldList.stream().distinct().collect(Collectors.joining(Constants.COMMA))).concat(Constants.COMMA); String userPortrait = Constants.COMMA.concat(oldList.stream().distinct().collect(Collectors.joining(Constants.COMMA))).concat(Constants.COMMA);
partnerIdAndLine.setUserPortrait(userPortrait); partnerIdAndLine.setUserPortrait(userPortrait);