|
|
@@ -421,12 +421,12 @@ func masterMonthAmount(mid string) map[string]string { |
|
|
|
lastMonthTimeRange := utils.GetTimeRange("last_month") |
|
|
|
currentMonthTimeRange := utils.GetTimeRange("current_month") |
|
|
|
|
|
|
|
hwSum, _ := db.ZhimengDb.NotIn("status", []string{"订单退款", "订单失效"}).Where("uid=? and create_time>=? and create_time<?", mid, lastMonthTimeRange["start"], lastMonthTimeRange["end"]).Sum(&model.HwOrder{}, "commission") |
|
|
|
guideSum, _ := db.ZhimengDb.NotIn("status", []string{"订单退款", "订单失效"}).Where("uid=? and create_time>=? and create_time<?", mid, lastMonthTimeRange["start"], lastMonthTimeRange["end"]).Sum(&model.GuideOrder{}, "commission") |
|
|
|
hwSum, _ := db.ZhimengDb.NotIn("status", []string{"创建订单", "订单退款", "订单失效"}).Where("uid=? and create_time>=? and create_time<?", mid, lastMonthTimeRange["start"], lastMonthTimeRange["end"]).Sum(&model.HwOrder{}, "commission") |
|
|
|
guideSum, _ := db.ZhimengDb.NotIn("status", []string{"创建订单", "订单退款", "订单失效"}).Where("uid=? and create_time>=? and create_time<?", mid, lastMonthTimeRange["start"], lastMonthTimeRange["end"]).Sum(&model.GuideOrder{}, "commission") |
|
|
|
lastMonthSum += hwSum + guideSum |
|
|
|
|
|
|
|
hwMonthSum, _ := db.ZhimengDb.NotIn("status", []string{"订单退款", "订单失效"}).Where("uid=? and create_time>=? and create_time<?", mid, currentMonthTimeRange["start"], currentMonthTimeRange["end"]).Sum(&model.HwOrder{}, "commission") |
|
|
|
guideMonthSum, _ := db.ZhimengDb.NotIn("status", []string{"订单退款", "订单失效"}).Where("uid=? and create_time>=? and create_time<?", mid, currentMonthTimeRange["start"], currentMonthTimeRange["end"]).Sum(&model.GuideOrder{}, "commission") |
|
|
|
hwMonthSum, _ := db.ZhimengDb.NotIn("status", []string{"创建订单", "订单退款", "订单失效"}).Where("uid=? and create_time>=? and create_time<?", mid, currentMonthTimeRange["start"], currentMonthTimeRange["end"]).Sum(&model.HwOrder{}, "commission") |
|
|
|
guideMonthSum, _ := db.ZhimengDb.NotIn("status", []string{"创建订单", "订单退款", "订单失效"}).Where("uid=? and create_time>=? and create_time<?", mid, currentMonthTimeRange["start"], currentMonthTimeRange["end"]).Sum(&model.GuideOrder{}, "commission") |
|
|
|
monthSum += hwMonthSum + guideMonthSum |
|
|
|
|
|
|
|
hwMonthSettleSum, _ := db.ZhimengDb.In("status", []string{"订单结算"}).Where("uid=? and create_time>=? and create_time<?", mid, currentMonthTimeRange["start"], currentMonthTimeRange["end"]).Sum(&model.HwOrder{}, "commission") |
|
|
|