|
@@ -30,7 +30,6 @@ func CreateProjectFollowManager(userid string, mustBuy ...bool) (*ProjectFollow,
|
|
|
if len(mustBuy) > 0 && !isBuy {
|
|
|
return nil, errors.New("非法请求")
|
|
|
}
|
|
|
-
|
|
|
if isBuy { //收费版
|
|
|
uid := qutil.If(bigMsg.Pid == "", userid, bigMsg.Pid).(string) //若为子账号则存储为主账号userid
|
|
|
return &ProjectFollow{true, uid, bigMsg.ProNum, "follow_project_bigvip"}, nil
|
|
@@ -219,7 +218,7 @@ func (this *ProjectFollow) GetDetailByFid(fid string) (returnData map[string]int
|
|
|
//大会员查询项目信息
|
|
|
func (this *ProjectFollow) GetProjectDetailBySid(sid string) (res map[string]interface{}, err error) {
|
|
|
redisKey := fmt.Sprintf("project_%s", sid)
|
|
|
- log.Println("redisKey:", redisKey)
|
|
|
+ // log.Println("redisKey:", redisKey)
|
|
|
if reidsCatche, redisErr := redis.GetBytes("other", redisKey); redisErr == nil && reidsCatche != nil {
|
|
|
err = json.Unmarshal(*reidsCatche, &res)
|
|
|
if err == nil {
|
|
@@ -294,6 +293,8 @@ func (this *ProjectFollow) GetFollowList(pNum, pSize int) (followData []map[stri
|
|
|
sid := qutil.ObjToString(followOne["s_id"])
|
|
|
if followOne["l_lastpushtime"] != nil && followOne["l_lastpushtime"] != "" {
|
|
|
followOne["l_createtime"] = followOne["l_lastpushtime"]
|
|
|
+ } else if followOne["l_lastpushtime"] == nil {
|
|
|
+ followOne["l_lastpushtime"] = followOne["l_createtime"]
|
|
|
}
|
|
|
sidArr = append(sidArr, sid)
|
|
|
followSetting[sid] = followOne
|
|
@@ -384,7 +385,7 @@ func (this *ProjectFollow) CancelFollow(sid, fid string) error {
|
|
|
if fid != "" {
|
|
|
query["_id"] = StringTOBsonId(fid)
|
|
|
}
|
|
|
- log.Println(query)
|
|
|
+ // log.Println(query)
|
|
|
data, _ := db.Mgo.FindOne(this.SaveTable, query)
|
|
|
if data == nil || len(*data) == 0 {
|
|
|
return errors.New("未找到相应数据")
|