Compare commits

...

2 Commits

Author SHA1 Message Date
c49bb4cdb3 Merge remote-tracking branch 'origin/master'
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
2025-07-08 16:08:38 +08:00
bb98a34fa6 1、 2025-07-08 16:08:19 +08:00
2 changed files with 5 additions and 3 deletions

View File

@@ -61,4 +61,7 @@ public interface PlantsRentalOrderMapper extends BaseMapperPlus<PlantsRentalOrde
"FROM plants_rental_order")
Map<String, Object> countOrderAndAmount();
@Select("SELECT COUNT(DISTINCT customer_name) FROM plants_rental_order")
Integer countDistinctCustomerName();
}

View File

@@ -406,10 +406,9 @@ public class PlantsRentalOrderServiceImpl implements IPlantsRentalOrderService {
*/
@Override
public Map<String, Integer> countCustomers() {
LambdaQueryWrapper<PlantsRentalOrder> lqw = Wrappers.lambdaQuery();
lqw.groupBy(PlantsRentalOrder::getCustomerName);
Integer count= baseMapper.countDistinctCustomerName();
Map<String, Integer> map = new HashMap<>();
map.put("count",baseMapper.selectVoList(lqw).size());
map.put("count",count);
return map;
}
}