更改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

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