|
|
@@ -421,16 +421,16 @@ 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.NotIn("status", []string{"订单退款"}).Where("uid=? and create_time>=? and create_time<?", mid, currentMonthTimeRange["start"], currentMonthTimeRange["end"]).Sum(&model.HwOrder{}, "commission") |
|
|
|
guideMonthSettleSum, _ := db.ZhimengDb.NotIn("status", []string{"订单退款"}).Where("uid=? and create_time>=? and create_time<?", mid, currentMonthTimeRange["start"], currentMonthTimeRange["end"]).Sum(&model.GuideOrder{}, "real_commission") |
|
|
|
hwMonthSettleSum, _ := db.ZhimengDb.NotIn("status", []string{"订单退款", "订单失效"}).Where("uid=? and create_time>=? and create_time<?", mid, currentMonthTimeRange["start"], currentMonthTimeRange["end"]).Sum(&model.HwOrder{}, "commission") |
|
|
|
guideMonthSettleSum, _ := db.ZhimengDb.NotIn("status", []string{"订单退款", "订单失效"}).Where("uid=? and create_time>=? and create_time<?", mid, currentMonthTimeRange["start"], currentMonthTimeRange["end"]).Sum(&model.GuideOrder{}, "real_commission") |
|
|
|
monthSettleSum += hwMonthSettleSum + guideMonthSettleSum |
|
|
|
|
|
|
|
res := map[string]string{ |
|
|
|