Explorar o código

Merge branch 'feature/v4.8.85_ws' of qmx/jy into feature/v4.8.85

wangshan hai 1 ano
pai
achega
a226bce175
Modificáronse 1 ficheiros con 15 adicións e 0 borrados
  1. 15 0
      src/jfw/modules/subscribepay/src/entity/basePack.go

+ 15 - 0
src/jfw/modules/subscribepay/src/entity/basePack.go

@@ -2,12 +2,15 @@ package entity
 
 import (
 	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
+	"app.yhyue.com/moapp/jybase/redis"
+	"bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/entity"
 	"encoding/json"
 	"fmt"
 	"github.com/gogf/gf/v2/util/gconv"
 	"jy/src/jfw/modules/subscribepay/src/config"
 	"jy/src/jfw/modules/subscribepay/src/util"
 	"log"
+	"strconv"
 	"time"
 
 	qutil "app.yhyue.com/moapp/jybase/common"
@@ -81,6 +84,18 @@ func (this *UseBalanceStruct) fileConsume() (r map[string]interface{}, m string,
 			isExists = true
 		}
 	}
+	//P450 v4.8.85
+	//免费用户 清除留资附件缓存
+	if BaseMsg.Status <= 0 && BaseMsg.VipStatus <= 0 && BaseMsg.EntnicheStatus <= 0 {
+		sess := this.Session.GetMultiple()
+		userId := this.UserId
+		if qutil.IntAll(sess["positionId"]) == 1 {
+			userId = strconv.Itoa(qutil.IntAll(sess["positionId"]))
+		}
+		if ok := redis.Del(entity.PowerCacheDb, fmt.Sprintf(entity.PowerCacheFileKey, userId)); !ok {
+			log.Println("free user clear file  download power  false:", userId)
+		}
+	}
 	if BaseMsg.Status > 0 && BaseMsg.PowerMap[3] {
 		if this.Remarks["infoType"] != nil && this.Remarks["infoType"].(string) == "S" {
 			r = SupplyInfoFile(_fileName, _id)