|
|
|
@ -25,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -155,11 +156,14 @@ public class CustomerService {
|
|
|
|
|
PageHelper.startPage(pageNum,pageSize);
|
|
|
|
|
List<OpCustomerDTO> customers = opCustomerDOMapper.selectCustomerInfoByShopIds(shopIds, startDate, endDate);
|
|
|
|
|
|
|
|
|
|
AtomicInteger number = new AtomicInteger(1 + ((pageNum-1) * pageSize));
|
|
|
|
|
//求分页总数
|
|
|
|
|
Page<OpCustomerDTO> pageList = (Page<OpCustomerDTO>)customers;
|
|
|
|
|
Long totalSize = pageList.getTotal();
|
|
|
|
|
for (OpCustomerDTO m : customers ) {
|
|
|
|
|
m.setTotalSize(totalSize);
|
|
|
|
|
m.setNumber(number.get());
|
|
|
|
|
number.incrementAndGet();
|
|
|
|
|
}
|
|
|
|
|
return customers;
|
|
|
|
|
}
|
|
|
|
|