Browse Source

更新

three
huangjiajun 1 year ago
parent
commit
2c8f648d3f
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      consume/zhios_order_total.go

+ 2
- 2
consume/zhios_order_total.go View File

@@ -94,7 +94,7 @@ func statUserOrderMoney(eg *xorm.Engine, req *md.ZhiosOrderBuckle) (map[string]s
lastMonthRange := utils.GetTimeRange("last_month")
var thisMonthData model.UserMonthAmount
thismonth := time.Unix(thisMonthRange["start"], 0).Format("200601")
eg.Where("uid=? and date=?", req.Uid, thismonth).Get(&data)
eg.Where("uid=? and date=?", req.Uid, thismonth).Get(&thisMonthData)
if thisMonthData.Id == 0 {
thisMonthData.Uid = utils.StrToInt(req.Uid)
thisMonthData.Date = utils.StrToInt(thismonth)
@@ -103,7 +103,7 @@ func statUserOrderMoney(eg *xorm.Engine, req *md.ZhiosOrderBuckle) (map[string]s

var lastMonthData model.UserMonthAmount
lastmonth := time.Unix(lastMonthRange["start"], 0).Format("200601")
eg.Where("uid=? and date=?", req.Uid, lastmonth).Get(&data)
eg.Where("uid=? and date=?", req.Uid, lastmonth).Get(&lastMonthData)
if lastMonthData.Id == 0 {
lastMonthData.Uid = utils.StrToInt(req.Uid)
lastMonthData.Date = utils.StrToInt(lastmonth)


Loading…
Cancel
Save