|
|
|
@ -424,6 +424,8 @@ public class RetailCompanyService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void newCustomerStore(String startTime, String endTime, DataVO organizationalVO, List<Long> storeIds) {
|
|
|
|
|
LocalDate l;
|
|
|
|
|
l = LocalDate.parse(endTime);
|
|
|
|
|
//最初时间的总客户人数
|
|
|
|
|
QueryWrapper<OpSellerCustomerRelation> wrapper2 = new QueryWrapper<>();
|
|
|
|
|
wrapper2.in("store_id", storeIds);
|
|
|
|
@ -439,13 +441,13 @@ public class RetailCompanyService {
|
|
|
|
|
//最后时间的总客户人数
|
|
|
|
|
QueryWrapper<OpSellerCustomerRelation> wrapper3 = new QueryWrapper<>();
|
|
|
|
|
wrapper3.in("store_id", storeIds);
|
|
|
|
|
wrapper3.lt("create_time", endTime);
|
|
|
|
|
wrapper3.lt("create_time", l.plus(1,ChronoUnit.DAYS));
|
|
|
|
|
List<OpSellerCustomerRelation> opRelationsEnd = opSellerCustomerRelationDOMapper.selectList(wrapper3);
|
|
|
|
|
long countEnd = opRelationsEnd.stream().map(OpSellerCustomerRelation::getCustomerId).distinct().count();
|
|
|
|
|
//最后时间的有效总客户人数
|
|
|
|
|
wrapper3.in("store_id", storeIds);
|
|
|
|
|
wrapper3.eq("type", 1);
|
|
|
|
|
wrapper3.lt("create_time", endTime);
|
|
|
|
|
wrapper3.lt("create_time", l.plus(1,ChronoUnit.DAYS));
|
|
|
|
|
List<OpSellerCustomerRelation> opRelationsEnd2 = opSellerCustomerRelationDOMapper.selectList(wrapper3);
|
|
|
|
|
long countEnd2 = opRelationsEnd2.stream().map(OpSellerCustomerRelation::getCustomerId).distinct().count();
|
|
|
|
|
|
|
|
|
|