ソースを参照

更新

master
huangjiajun 1年前
コミット
8a087c51ca
1個のファイルの変更15行の追加0行の削除
  1. +15
    -0
      app/svc/platform/svc_withdrawal.go

+ 15
- 0
app/svc/platform/svc_withdrawal.go ファイルの表示

@@ -418,6 +418,21 @@ func masterMonthAmount(mid string) map[string]string {
lastMonthSum := playletSaleOrder.PlayletVideoOrderSum(mid, "", "last_month")
monthSum := playletSaleOrder.PlayletVideoOrderSum(mid, "", "current_month")
monthSettleSum := playletSaleOrder.PlayletVideoOrderSum(mid, "订单结算", "current_month")
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")
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")
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")
monthSettleSum += hwMonthSettleSum + guideMonthSettleSum

res := map[string]string{
"last_month_amount": utils.Float64ToStr(lastMonthSum),
"month_amount": utils.Float64ToStr(monthSum),


読み込み中…
キャンセル
保存