update
This commit is contained in:
+33
-18
@@ -87,6 +87,8 @@ public class CustomerStatServiceImpl implements CustomerStatService {
|
|||||||
// 删除之前这个用户的统计数据,每天都是最新的
|
// 删除之前这个用户的统计数据,每天都是最新的
|
||||||
this.removeCustomerStat(eid, uid);
|
this.removeCustomerStat(eid, uid);
|
||||||
|
|
||||||
|
long hosueCount = 0;
|
||||||
|
Double housePrice = 0.0;
|
||||||
int level = this.getFinanciaCustomerLevel(eid, uid, financiaFilterConfig, financialCustomersList);
|
int level = this.getFinanciaCustomerLevel(eid, uid, financiaFilterConfig, financialCustomersList);
|
||||||
if (level > 0) {
|
if (level > 0) {
|
||||||
CustomerStat stat = new CustomerStat();
|
CustomerStat stat = new CustomerStat();
|
||||||
@@ -94,26 +96,34 @@ public class CustomerStatServiceImpl implements CustomerStatService {
|
|||||||
stat.setUid(uid);
|
stat.setUid(uid);
|
||||||
stat.setCity(user.getCity());
|
stat.setCity(user.getCity());
|
||||||
stat.setRegion(user.getRegion());
|
stat.setRegion(user.getRegion());
|
||||||
stat.setHouseCount(houseInfoService.queryCountByEidAndUid(eid, uid));
|
hosueCount = houseInfoService.queryCountByEidAndUid(eid, uid);
|
||||||
stat.setHousePrice(houseInfoService.querySumMoneyByEidAndUid(eid, uid));
|
stat.setHouseCount(hosueCount);
|
||||||
|
housePrice = houseInfoService.querySumMoneyByEidAndUid(eid, uid);
|
||||||
|
stat.setHousePrice(housePrice);
|
||||||
stat.setCreateDate(new Date());
|
stat.setCreateDate(new Date());
|
||||||
stat.setType(1);
|
stat.setType(1);
|
||||||
stat.setLevel(level);
|
stat.setLevel(level);
|
||||||
mongoTemplate.save(stat);
|
mongoTemplate.save(stat);
|
||||||
}
|
}
|
||||||
|
|
||||||
level = getLoanCustomerLevel(eid, uid, loanFilterConfig, loanCustomersConfigList);
|
int levelLoan = getLoanCustomerLevel(eid, uid, loanFilterConfig, loanCustomersConfigList);
|
||||||
if (level > 0) {
|
if (levelLoan > 0) {
|
||||||
CustomerStat stat = new CustomerStat();
|
CustomerStat stat = new CustomerStat();
|
||||||
stat.setEid(eid);
|
stat.setEid(eid);
|
||||||
stat.setUid(uid);
|
stat.setUid(uid);
|
||||||
stat.setCity(user.getCity());
|
stat.setCity(user.getCity());
|
||||||
stat.setRegion(user.getRegion());
|
stat.setRegion(user.getRegion());
|
||||||
stat.setHouseCount(houseInfoService.queryCountByEidAndUid(eid, uid));
|
// 理财级别有的情况下就用上面已经查询好的数据,避免重复查询
|
||||||
stat.setHousePrice(houseInfoService.querySumMoneyByEidAndUid(eid, uid));
|
if (level > 0) {
|
||||||
|
stat.setHouseCount(hosueCount);
|
||||||
|
stat.setHousePrice(housePrice);
|
||||||
|
} else {
|
||||||
|
stat.setHouseCount(houseInfoService.queryCountByEidAndUid(eid, uid));
|
||||||
|
stat.setHousePrice(houseInfoService.querySumMoneyByEidAndUid(eid, uid));
|
||||||
|
}
|
||||||
stat.setCreateDate(new Date());
|
stat.setCreateDate(new Date());
|
||||||
stat.setType(2);
|
stat.setType(2);
|
||||||
stat.setLevel(level);
|
stat.setLevel(levelLoan);
|
||||||
mongoTemplate.save(stat);
|
mongoTemplate.save(stat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -276,38 +286,35 @@ public class CustomerStatServiceImpl implements CustomerStatService {
|
|||||||
start = timeMap.get("start");
|
start = timeMap.get("start");
|
||||||
end = timeMap.get("end");
|
end = timeMap.get("end");
|
||||||
}
|
}
|
||||||
// 判断用户理财广告点击率
|
|
||||||
if (config.getAdClickRate() > 0) {
|
|
||||||
double adClickRate = getFinancialAdClickRate(eid, uid, start, end);
|
|
||||||
if (adClickRate <= config.getAdClickRate()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 判断房产分析PV
|
// 判断房产分析PV
|
||||||
if (config.getHouseAnalyPv() > 0) {
|
if (config.getHouseAnalyPv() > 0) {
|
||||||
if (visitLogService.queryPvCountByUser(eid, uid, Arrays.asList("/fsh/result"), start, end) <= config.getHouseAnalyPv()) {
|
long count = visitLogService.queryPvCountByUser(eid, uid, Arrays.asList("/fsh/result"), start, end);
|
||||||
|
if (count <= config.getHouseAnalyPv()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断出售分析PV
|
// 判断出售分析PV
|
||||||
if (config.getSaleAnalyPv() > 0) {
|
if (config.getSaleAnalyPv() > 0) {
|
||||||
if (visitLogService.queryPvCountByUser(eid, uid, Arrays.asList("/saleAnalysis/analysisDetail"), start, end) <= config.getSaleAnalyPv()) {
|
long count = visitLogService.queryPvCountByUser(eid, uid, Arrays.asList("/saleAnalysis/analysisDetail"), start, end);
|
||||||
|
if (count <= config.getSaleAnalyPv()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断出租管理PV
|
// 判断出租管理PV
|
||||||
if (config.getRentManagerPv() > 0) {
|
if (config.getRentManagerPv() > 0) {
|
||||||
if (visitLogService.queryPvCountByUser(eid, uid, Arrays.asList("/rent/index"), start, end) <= config.getRentManagerPv()) {
|
long count = visitLogService.queryPvCountByUser(eid, uid, Arrays.asList("/rent/index"), start, end);
|
||||||
|
if (count <= config.getRentManagerPv()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断房产数量
|
// 判断房产数量
|
||||||
if (config.getHouseCountRank() > 0) {
|
if (config.getHouseCountRank() > 0) {
|
||||||
if (houseInfoService.queryCountByEidAndUid(eid, uid) <= config.getHouseCountRank()) {
|
long count = houseInfoService.queryCountByEidAndUid(eid, uid);
|
||||||
|
if (count <= config.getHouseCountRank()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -330,6 +337,14 @@ public class CustomerStatServiceImpl implements CustomerStatService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 判断用户理财广告点击率
|
||||||
|
if (config.getAdClickRate() > 0) {
|
||||||
|
double adClickRate = getFinancialAdClickRate(eid, uid, start, end);
|
||||||
|
if (adClickRate <= config.getAdClickRate()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user