更改ec日志展示
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user