Browse Source

fit:当月已使用次数

wangshan 3 years ago
parent
commit
3f956e6f68

+ 2 - 1
src/jfw/modules/subscribepay/src/entity/basePack.go

@@ -223,11 +223,12 @@ func (this *FindRecordStruct) FindJyConsumePackAllRecord() ([]map[string]interfa
 	query := map[string]interface{}{
 		"s_userId":  this.UserId,
 		"s_product": this.Name,
+		"s_month":   this.QueryTime,
 	}
 	//全部
 	total := util.MQFW.Count(jyCC, query)
 	//当月
-	query["s_month"] = this.QueryTime
+	// query["s_month"] = this.QueryTime
 	list, ok := util.MQFW.Find(jyCC, query, `{"l_updateDate":-1,"l_date":-1}`, `{"s_id":1,"s_fileName":1,"s_downUrl":1,"l_date":1,"s_title":1,"l_updateDate":1}`, false, (this.Page-1)*this.PageSize, this.PageSize)
 	if ok && list != nil {
 		if len(*list) >= 1 {

+ 6 - 0
src/jfw/modules/subscribepay/src/service/resourcePack.go

@@ -9,6 +9,7 @@ import (
 	"log"
 	"pay"
 	qu "qfw/util"
+	"qfw/util/jy"
 	"strconv"
 	"time"
 	"util"
@@ -175,6 +176,11 @@ func (this *ResourcePack) Account() {
 		this.ServeJson(Result{Error_msg: "参数错误"})
 		return
 	}
+	vipMsg := jy.GetBigVipUserBaseMsg(userId, util.Mysql, util.MQFW)
+	if vipMsg.VipStatus <= 0 {
+		this.ServeJson(Result{Error_msg: "无权限,请联系管理员"})
+		return
+	}
 	dbs := &entity.FindBalanceStruct{
 		AccountId:    userId,
 		ResourceType: config.ResConf.Product[product],