|
@@ -1,9 +1,7 @@
|
|
package activity
|
|
package activity
|
|
|
|
|
|
import (
|
|
import (
|
|
- qu "app.yhyue.com/moapp/jybase/common"
|
|
|
|
"app.yhyue.com/moapp/message/db"
|
|
"app.yhyue.com/moapp/message/db"
|
|
- "fmt"
|
|
|
|
"strconv"
|
|
"strconv"
|
|
"time"
|
|
"time"
|
|
|
|
|
|
@@ -61,13 +59,7 @@ func NewUserActivity(msg *model.Message) {
|
|
entTime := gtime.NewFromStrLayout(gcfg.Instance().MustGet(gctx.New(), "newRegister.entTime").String(), "2006-01-02T15:04:05Z").Time
|
|
entTime := gtime.NewFromStrLayout(gcfg.Instance().MustGet(gctx.New(), "newRegister.entTime").String(), "2006-01-02T15:04:05Z").Time
|
|
now := time.Now()
|
|
now := time.Now()
|
|
if now.After(startTime) && now.Before(entTime) {
|
|
if now.After(startTime) && now.Before(entTime) {
|
|
- data, ok := db.Mgo.FindById("user", msg.E_userId, `{"l_registedate":1}`)
|
|
|
|
- if data == nil || len(*data) == 0 || !ok {
|
|
|
|
- logger.Info(fmt.Sprintf("未找到用户%s,无法增加积分%v。", msg.E_userId, msg.E_code))
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- phone := qu.If(qu.ObjToString((*data)["s_phone"]) != "", qu.ObjToString((*data)["s_phone"]), qu.ObjToString((*data)["s_m_phone"]))
|
|
|
|
- c := db.Mysql.CountBySql("SELECT count(1) FROM dataexport_order WHERE (user_id = ? OR user_phone = ?) AND distribution_channel = 'x054'", msg.E_userId, phone)
|
|
|
|
|
|
+ c := db.Mysql.CountBySql("SELECT count(1) FROM dataexport_order WHERE user_id = ? AND distribution_channel = 'x054'", msg.E_userId)
|
|
if c <= 0 {
|
|
if c <= 0 {
|
|
_ = award.GivenSubVip(msg.E_userId, award.SubVip{
|
|
_ = award.GivenSubVip(msg.E_userId, award.SubVip{
|
|
Num: gcfg.Instance().MustGet(gctx.New(), "newRegister.supVip", nil).Int64(),
|
|
Num: gcfg.Instance().MustGet(gctx.New(), "newRegister.supVip", nil).Int64(),
|