1、
This commit is contained in:
parent
1ca5352a9d
commit
bb98a34fa6
@ -61,4 +61,7 @@ public interface PlantsRentalOrderMapper extends BaseMapperPlus<PlantsRentalOrde
|
|||||||
"FROM plants_rental_order")
|
"FROM plants_rental_order")
|
||||||
Map<String, Object> countOrderAndAmount();
|
Map<String, Object> countOrderAndAmount();
|
||||||
|
|
||||||
|
@Select("SELECT COUNT(DISTINCT customer_name) FROM plants_rental_order")
|
||||||
|
Integer countDistinctCustomerName();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -406,10 +406,9 @@ public class PlantsRentalOrderServiceImpl implements IPlantsRentalOrderService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Integer> countCustomers() {
|
public Map<String, Integer> countCustomers() {
|
||||||
LambdaQueryWrapper<PlantsRentalOrder> lqw = Wrappers.lambdaQuery();
|
Integer count= baseMapper.countDistinctCustomerName();
|
||||||
lqw.groupBy(PlantsRentalOrder::getCustomerName);
|
|
||||||
Map<String, Integer> map = new HashMap<>();
|
Map<String, Integer> map = new HashMap<>();
|
||||||
map.put("count",baseMapper.selectVoList(lqw).size());
|
map.put("count",count);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user