abiao лет назад: 5
Родитель
Сommit
bc805ef5bb

+ 5 - 9
go/gopath/src/fohow.com/apps/controllers/railsadmin_controller/user_perfomance_controller.go

@@ -57,17 +57,13 @@ func (self *RailsadminController) UserPerfomance() {
 	self.ServeJSON()
 }
 
-func GetTeamPerfomance(list []*user_model.WxUser, beginTime, endTime int64) (OrderPerfomance, ShopOrderPerfomance, ShopPerfomance, BalanceOrderPerfomance int64) {
-	orderPerfomance := int64(0)
-	shopOrderPerfomance := int64(0)
-	shopPerfomance := int64(0)
-	balanceOrderPerfomance := int64(0)
+func GetTeamPerfomance(list []*user_model.WxUser, beginTime, endTime int64) (orderPerfomance, shopOrderPerfomance, shopPerfomance, balanceOrderPerfomance int64) {
 	//递归获取
 	for _, item := range list {
-		orderPerfomance = summary_model.GetSumOrderPerfomance(item.Id, int64(0), beginTime, endTime)
-		shopOrderPerfomance = summary_model.GetSumOrderPerfomance(item.Id, int64(2), beginTime, endTime)
-		shopPerfomance = summary_model.GetSumShopPerfomance(item.Id, beginTime, endTime)
-		balanceOrderPerfomance = summary_model.GetSumOrderPerfomance(item.Id, int64(0), beginTime, endTime)
+		orderPerfomance += summary_model.GetSumOrderPerfomance(item.Id, int64(0), beginTime, endTime)
+		shopOrderPerfomance += summary_model.GetSumOrderPerfomance(item.Id, int64(2), beginTime, endTime)
+		shopPerfomance += summary_model.GetSumShopPerfomance(item.Id, beginTime, endTime)
+		balanceOrderPerfomance += summary_model.GetSumOrderPerfomance(item.Id, int64(0), beginTime, endTime)
 
 		secondList := user_model.GetWxUsersByInviteIdAll(item.Id, false)
 		newOrderPerfomance, newShopOrderPerfomance, newShopPerfomance, newBalanceOrderPerfomance := GetTeamPerfomance(secondList, beginTime, endTime)