Commit 684bfd50 by mushishixian

fix

parent ddfbf150
Showing with 4 additions and 3 deletions
...@@ -98,7 +98,6 @@ func main() { ...@@ -98,7 +98,6 @@ func main() {
logger.Error(err.Error()) logger.Error(err.Error())
fmt.Println(err.Error()) fmt.Println(err.Error())
} }
fmt.Println(len(giftActivityList))
//统计满赠活动****************** //统计满赠活动******************
for _, activity := range giftActivityList { for _, activity := range giftActivityList {
orderNum, _ := db.Reset().Table("lie_order_gift").Where("activity_id", activity.Id).Where("status", "!=", -1).Count() orderNum, _ := db.Reset().Table("lie_order_gift").Where("activity_id", activity.Id).Where("status", "!=", -1).Count()
...@@ -115,7 +114,8 @@ func main() { ...@@ -115,7 +114,8 @@ func main() {
data["activity_id"] = activity.Id data["activity_id"] = activity.Id
data["type"] = 2 data["type"] = 2
if count > 0 { 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()) fmt.Println(specialDb.LastSql())
if err != nil { if err != nil {
logger.Error(err.Error()) logger.Error(err.Error())
...@@ -210,7 +210,8 @@ func main() { ...@@ -210,7 +210,8 @@ func main() {
data["activity_id"] = activity.Id data["activity_id"] = activity.Id
data["type"] = 1 data["type"] = 1
if count > 0 { 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 { if err != nil {
logger.Error(err.Error()) logger.Error(err.Error())
fmt.Println(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