Browse Source

更新

master
huangjiajun 1 year ago
parent
commit
ea61d4b165
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      app/svc/platform/svc_withdrawal.go

+ 6
- 6
app/svc/platform/svc_withdrawal.go View File

@@ -421,16 +421,16 @@ func masterMonthAmount(mid string) map[string]string {
lastMonthTimeRange := utils.GetTimeRange("last_month") lastMonthTimeRange := utils.GetTimeRange("last_month")
currentMonthTimeRange := utils.GetTimeRange("current_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 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 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 monthSettleSum += hwMonthSettleSum + guideMonthSettleSum


res := map[string]string{ res := map[string]string{


Loading…
Cancel
Save