소스 검색

feat:已留资处理

wangshan 1 년 전
부모
커밋
0ce5352b0b
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      src/jfw/modules/subscribepay/src/entity/basePack.go

+ 5 - 5
src/jfw/modules/subscribepay/src/entity/basePack.go

@@ -48,8 +48,8 @@ func (this *UseBalanceStruct) fileConsume() (r map[string]interface{}, m string,
 	BaseMsg := jy.GetBigVipUserBaseMsg(this.Session, *config.Middleground)
 	log.Println("---:", this.Remarks)
 	//P450 v4.8.85
-	var freeClear = func() {
-		//免费用户 清除留资附件缓存
+	var freeFileCacheUpdate = func() {
+		//免费用户 更新留资附件缓存
 		if BaseMsg.Status <= 0 && BaseMsg.VipStatus <= 0 && BaseMsg.EntnicheStatus <= 0 {
 			sess := this.Session.GetMultiple()
 			userId := this.UserId
@@ -59,7 +59,7 @@ func (this *UseBalanceStruct) fileConsume() (r map[string]interface{}, m string,
 			//已留资
 			if c := qutil.Int64All(redis.GetInt("other", fmt.Sprintf("free_article_attach_%s", userId))); c > 0 {
 				if ok := redis.PutKV(fmt.Sprintf("free_article_attach_%s", userId), -1); !ok {
-					log.Println("free user clear file  download power  false:", userId)
+					log.Println("free user update file  download power  false:", userId)
 				}
 			}
 		}
@@ -75,7 +75,7 @@ func (this *UseBalanceStruct) fileConsume() (r map[string]interface{}, m string,
 	if data == nil || err != nil {
 		c = -1
 		m = "余额不足"
-		go freeClear()
+		go freeFileCacheUpdate()
 		return
 	}
 	number := 0
@@ -101,7 +101,7 @@ func (this *UseBalanceStruct) fileConsume() (r map[string]interface{}, m string,
 			isExists = true
 		}
 	}
-	go freeClear()
+	go freeFileCacheUpdate()
 	if BaseMsg.Status > 0 && BaseMsg.PowerMap[3] {
 		if this.Remarks["infoType"] != nil && this.Remarks["infoType"].(string) == "S" {
 			r = SupplyInfoFile(_fileName, _id)