Commit 684bfd50 by mushishixian

fix

parent ddfbf150
Showing with 4 additions and 3 deletions
......@@ -98,7 +98,6 @@ func main() {
logger.Error(err.Error())
fmt.Println(err.Error())
}
fmt.Println(len(giftActivityList))
//统计满赠活动******************
for _, activity := range giftActivityList {
orderNum, _ := db.Reset().Table("lie_order_gift").Where("activity_id", activity.Id).Where("status", "!=", -1).Count()
......@@ -115,7 +114,8 @@ func main() {
data["activity_id"] = activity.Id
data["type"] = 2
if count > 0 {
_, err = specialDb.Reset().Table("lie_activity_statistics").Where("activity_id", activity.Id).Data(data).Update()
_, err = specialDb.Reset().Table("lie_activity_statistics").Where("activity_id", activity.Id).
Where("type",2).Data(data).Update()
fmt.Println(specialDb.LastSql())
if err != nil {
logger.Error(err.Error())
......@@ -210,7 +210,8 @@ func main() {
data["activity_id"] = activity.Id
data["type"] = 1
if count > 0 {
_, err = specialDb.Reset().Table("lie_activity_statistics").Where("activity_id", activity.Id).Data(data).Update()
_, err = specialDb.Reset().Table("lie_activity_statistics").Where("activity_id", activity.Id).Where("type",1).
Data(data).Update()
if err != nil {
logger.Error(err.Error())
fmt.Println(err.Error())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment