|
@@ -241,12 +241,12 @@ func (e *entnichePush) GetInfoByIds(MQFW mg.MongodbSim, pushCas []*PushCa) []*Su
|
|
|
return array
|
|
|
}
|
|
|
|
|
|
-func (e *entnichePush) Visit(PushMysql *mysql.Mysql, userId, id string) {
|
|
|
- if id == "" || userId == "" {
|
|
|
+func (e *entnichePush) Visit(PushMysql *mysql.Mysql, userId, id int) {
|
|
|
+ if id <= 0 {
|
|
|
return
|
|
|
}
|
|
|
- PushMysql.UpdateOrDeleteBySql("update pushsubscribe set isvisit=1 where userid='" + userId + "' and id=" + id)
|
|
|
- todaySubPush, err := SubscribePush.GetTodayCache(userId)
|
|
|
+ PushMysql.UpdateOrDeleteBySql("update pushsubscribe set isvisit=1 where userid=? and id=?", userId, id)
|
|
|
+ todaySubPush, err := e.GetTodayCache(userId)
|
|
|
if err == nil && todaySubPush != nil {
|
|
|
for _, v := range todaySubPush.Datas {
|
|
|
if v.Ca_index == Int64All(id) {
|
|
@@ -254,10 +254,10 @@ func (e *entnichePush) Visit(PushMysql *mysql.Mysql, userId, id string) {
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
- SubscribePush.PutTodayCache(userId, todaySubPush)
|
|
|
+ e.PutTodayCache(userId, todaySubPush)
|
|
|
}
|
|
|
//
|
|
|
- allSubPush, err := SubscribePush.GetAllCache(userId)
|
|
|
+ allSubPush, err := e.GetAllCache(userId)
|
|
|
if err == nil && allSubPush != nil {
|
|
|
for _, v := range allSubPush {
|
|
|
if v.Ca_index == Int64All(id) {
|
|
@@ -265,7 +265,7 @@ func (e *entnichePush) Visit(PushMysql *mysql.Mysql, userId, id string) {
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
- SubscribePush.PutAllCache(userId, allSubPush)
|
|
|
+ e.PutAllCache(userId, allSubPush)
|
|
|
}
|
|
|
}
|
|
|
|