|
@@ -254,15 +254,16 @@ func (s *Short) Article(stype, id string) error {
|
|
|
s.T["forceShareFlag"] = public.CheckUserNeedForceShare(userId, public.ShareType_detail) //是否强制分享
|
|
|
if from_userid != "" && from_userid != userId && util.ObjToString(obj["subtype"]) != "拟建" { //分享开打的
|
|
|
article_id := util.CommonDecodeArticle(stype, id)[0]
|
|
|
- if redis.Get("other", fmt.Sprintf("integral_article_%s_%s_%s", article_id, from_userid, userId)) == nil {
|
|
|
- fmt.Println("from_userid", se.DecodeStringByCheck(from_userid))
|
|
|
+ key := fmt.Sprintf("integral_article_%s_%s_%s", article_id, from_userid, userId)
|
|
|
+ if redis.Incr("other", key) == 1 {
|
|
|
+ redis.SetExpire("other", key, 60*60*24)
|
|
|
err := jy.Publish(public.Mgo_Log, config.Sysconfig["nsq"].(string), jy.Jyweb_article_open, se.DecodeStringByCheck(from_userid), jy.Jywx_node1)
|
|
|
if err != nil {
|
|
|
log.Println("nsq队列写入失败-->", jy.Jyweb_article_open, se.DecodeStringByCheck(from_userid))
|
|
|
- } else {
|
|
|
+ } /* else {
|
|
|
//integral_article_ +userId+ 三级页id
|
|
|
- redis.Put("other", fmt.Sprintf("integral_article_%s_%s_%s", article_id, from_userid, userId), "1", 60*60*24)
|
|
|
- }
|
|
|
+ redis.Put("other", fmt.Sprintf("integral_article_%s_%s_%s", article_id, from_userid, userId), 1, 60*60*24)
|
|
|
+ }*/
|
|
|
}
|
|
|
}
|
|
|
content, _ := s.Render4Cache("/weixin/wxinfocontent"+rec+".html", &s.T)
|