|
|
@@ -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) |
|
|
|