瀏覽代碼

更新

three
huangjiajun 11 月之前
父節點
當前提交
2c8f648d3f
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      consume/zhios_order_total.go

+ 2
- 2
consume/zhios_order_total.go 查看文件

@@ -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…
取消
儲存