From aa9776a39b03e4eab22a42bd40156eabb7ddf75a Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期六, 16 五月 2020 15:07:16 +0800
Subject: [PATCH] 添加创建时间

---
 fanli/src/main/java/com/yeshi/fanli/dao/order/OrderMoneyDailyCountDao.java |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/dao/order/OrderMoneyDailyCountDao.java b/fanli/src/main/java/com/yeshi/fanli/dao/order/OrderMoneyDailyCountDao.java
index 5fb7f62..84ea1a9 100644
--- a/fanli/src/main/java/com/yeshi/fanli/dao/order/OrderMoneyDailyCountDao.java
+++ b/fanli/src/main/java/com/yeshi/fanli/dao/order/OrderMoneyDailyCountDao.java
@@ -56,6 +56,12 @@
 			update.set("teamSubsidy", info.getTeamSubsidy());
 		if (info.getTeamSubsidyNum() != null)
 			update.set("teamSubsidyNum", info.getTeamSubsidyNum());
+		if (info.getDirectOrderNum() != null)
+			update.set("directOrderNum", info.getDirectOrderNum());
+		if (info.getInDirectOrderNum() != null)
+			update.set("inDirectOrderNum", info.getInDirectOrderNum());
+		if (info.getBeyondOrderNum() != null)
+			update.set("beyondOrderNum", info.getBeyondOrderNum());
 		update.set("updateTime", new Date());
 		update(query, update);
 	}
@@ -126,6 +132,10 @@
 
 			for (int i = 0; i < mapResult.size(); i++) {
 				BasicDBObject object = mapResult.get(i + "");
+				if (object == null || object.get("sourceType") == null) {
+					continue;
+				}
+				
 				SourceTypeEnum sourceTypeEnum = null;
 				for (int m = 0; m < arrayEnun.length; m++) {
 					if (arrayEnun[m].name().equals(object.get("sourceType").toString())) {
@@ -191,8 +201,10 @@
 			SourceTypeEnum[] arrayEnun = SourceTypeEnum.values();
 			for (int i = 0; i < mapResult.size(); i++) {
 				BasicDBObject object = mapResult.get(i + "");
-				OrderMoneyDailyCount dailyCount = new OrderMoneyDailyCount();
-
+				if (object == null || object.get("sourceType") == null) {
+					continue;
+				}
+				
 				SourceTypeEnum sourceTypeEnum = null;
 				for (int m = 0; m < arrayEnun.length; m++) {
 					if (arrayEnun[m].name().equals(object.get("sourceType").toString())) {
@@ -200,6 +212,7 @@
 						break;
 					}
 				}
+				OrderMoneyDailyCount dailyCount = new OrderMoneyDailyCount();
 				dailyCount.setSourceType(sourceTypeEnum);
 				dailyCount.setIncome(new BigDecimal(object.get("totalIncome").toString()).intValue());
 				dailyCount.setOrderNum(new BigDecimal(object.get("totalNum").toString()).intValue());

--
Gitblit v1.8.0