推广管理零售公司

master
Caps 6 years ago
parent 14fb412d32
commit 2f1d0855fc

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

Loading…
Cancel
Save