|
@@ -74,13 +74,11 @@ func (this *SubVipPortrait) SubVipWinnerNewMsg() {
|
|
|
if entId == "" {
|
|
|
return nil, fmt.Errorf("参数异常")
|
|
|
}
|
|
|
- cepm, power, err, free := entity.CreateSubVipPortraitManager(userId, "entNewMsg", entId, true, this.Session())
|
|
|
+ cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "entNewMsg", entId, true, this.Session())
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
- if free {
|
|
|
- return nil, errors.New("无查看权益")
|
|
|
- }
|
|
|
+
|
|
|
if power <= 1 {
|
|
|
return nil, errors.New("非法请求")
|
|
|
}
|
|
@@ -196,11 +194,11 @@ func (this *SubVipPortrait) SubVipPortrait() {
|
|
|
if entId == "" {
|
|
|
return nil, fmt.Errorf("参数异常")
|
|
|
}
|
|
|
- cepm, power, err, free := entity.CreateSubVipPortraitManager(userId, "entPortrait", entId, true, this.Session())
|
|
|
+ cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "entPortrait", entId, true, this.Session())
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
- if free {
|
|
|
+ if power <= 1 {
|
|
|
return nil, fmt.Errorf("无查看权益")
|
|
|
}
|
|
|
rData, err := cepm.WinnerPortraitData(&entity.PortraitScreen{
|
|
@@ -347,11 +345,11 @@ func (this *SubVipPortrait) BuyerNewMsg() {
|
|
|
}
|
|
|
pageNum, _ := this.GetInteger("pageNum")
|
|
|
pageSize, _ := this.GetInteger("pageSize")
|
|
|
- cepm, power, err, free := entity.CreateSubVipPortraitManagerForOpen(userId, "buyerPortrait", buyer, false, this.Session())
|
|
|
+ cepm, power, err, _ := entity.CreateSubVipPortraitManagerForOpen(userId, "buyerPortrait", buyer, false, this.Session())
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
- if free {
|
|
|
+ if power <= 1 {
|
|
|
return nil, fmt.Errorf("无查看权益")
|
|
|
}
|
|
|
//免费用户仅可查看三条记录
|
|
@@ -479,7 +477,7 @@ func (this *SubVipPortrait) BuyerPortrait() {
|
|
|
return nil, err
|
|
|
}
|
|
|
redisKey := fmt.Sprintf("buyerPortraitKey_%s", buyerName)
|
|
|
- if userId == "" || isFree {
|
|
|
+ if userId == "" || power <= 1 {
|
|
|
if bytes, err := redis.GetBytes("other", redisKey); err == nil && bytes != nil {
|
|
|
rData := make(map[string]interface{})
|
|
|
if err = json.Unmarshal(*bytes, &rData); err != nil {
|