Jianghan 8 hónapja
szülő
commit
731635d56c
2 módosított fájl, 2 hozzáadás és 2 törlés
  1. 1 1
      handler/activity/newUserAward.go
  2. 1 1
      handler/activity/task.go

+ 1 - 1
handler/activity/newUserAward.go

@@ -59,7 +59,7 @@ func NewUserActivity(msg *model.Message) {
 	entTime := gtime.NewFromStrLayout(gcfg.Instance().MustGet(gctx.New(), "newRegister.entTime").String(), "2006-01-02T15:04:05Z").Time
 	now := time.Now()
 	if now.After(startTime) && now.Before(entTime) {
-		c := db.Mysql.CountBySql("SELECT * FROM dataexport_order WHERE user_id = ? AND distribution_channel = 'x054'", msg.E_userId)
+		c := db.Mysql.CountBySql("SELECT count(1) FROM dataexport_order WHERE user_id = ? AND distribution_channel = 'x054'", msg.E_userId)
 		if c <= 0 {
 			_ = award.GivenSubVip(msg.E_userId, award.SubVip{
 				Num:          gcfg.Instance().MustGet(gctx.New(), "newRegister.supVip", nil).Int64(),

+ 1 - 1
handler/activity/task.go

@@ -50,7 +50,7 @@ func Task(msg *model.Message) {
 	entTime := gtime.NewFromStrLayout(gcfg.Instance().MustGet(gctx.New(), "newRegister.entTime").String(), "2006-01-02T15:04:05Z").Time
 	if time.Now().After(startTime) && time.Now().Before(entTime) && gconv.Bool(msg.E_body["isOnlyBind"]) {
 		//  查询该用户活动时间内是否赠送过
-		c := db.Mysql.CountBySql("SELECT * FROM dataexport_order WHERE user_id = ? AND distribution_channel = 'x054'", msg.E_userId)
+		c := db.Mysql.CountBySql("SELECT count(1) FROM dataexport_order WHERE user_id = ? AND distribution_channel = 'x054'", msg.E_userId)
 		if c <= 0 {
 			_ = award.GivenSubVip(msg.E_userId, award.SubVip{
 				Num:          gcfg.Instance().MustGet(gctx.New(), "newRegister.supVip", nil).Int64(),