yzc 1 vuosi sitten
vanhempi
commit
7f6f8d1a58

+ 2 - 2
hx-customer/src/main/java/com/fjhx/customer/service/customer/impl/CustomerServiceImpl.java

@@ -474,8 +474,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
         if (ObjectUtil.isNotEmpty(customerList)) {
             for (Customer customer : customerList) {
                 String tags = customer.getTag();
-                String[] split = tags.split(",");
-                for (String tag : split) {
+                List<String> tagList = Arrays.stream(tags.split(",")).distinct().collect(Collectors.toList());
+                for (String tag : tagList) {
                     Integer count = map.getOrDefault(tag, 0);
                     map.put(tag, ++count);
                     sumCount++;