|
@@ -466,18 +466,20 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
|
|
}
|
|
|
|
|
|
|
|
|
- query.select("GROUP_CONCAT(IFNULL(tag,'')) as tag");
|
|
|
- Customer customer = baseMapper.selectOne(query);
|
|
|
+ query.select("IFNULL(tag,'') as tag");
|
|
|
+ List<Customer> customerList = this.list(query);
|
|
|
|
|
|
Integer sumCount = 0;
|
|
|
Map<String, Integer> map = new HashMap<>();
|
|
|
- if (ObjectUtil.isNotEmpty(customer)) {
|
|
|
- String tags = customer.getTag();
|
|
|
- String[] split = tags.split(",");
|
|
|
- for (String tag : split) {
|
|
|
- Integer count = map.getOrDefault(tag, 0);
|
|
|
- map.put(tag, ++count);
|
|
|
- sumCount++;
|
|
|
+ if (ObjectUtil.isNotEmpty(customerList)) {
|
|
|
+ for (Customer customer : customerList) {
|
|
|
+ String tags = customer.getTag();
|
|
|
+ String[] split = tags.split(",");
|
|
|
+ for (String tag : split) {
|
|
|
+ Integer count = map.getOrDefault(tag, 0);
|
|
|
+ map.put(tag, ++count);
|
|
|
+ sumCount++;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|