wangshan 3 年之前
父节点
当前提交
856e05005c
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      src/jfw/modules/subscribepay/src/entity/areaPack.go

+ 8 - 2
src/jfw/modules/subscribepay/src/entity/areaPack.go

@@ -3,6 +3,7 @@ package entity
 import (
 	"encoding/json"
 	"fmt"
+	"jfw/modules/common/src/qfw/util/jy"
 	"log"
 	qutil "qfw/util"
 	"time"
@@ -201,9 +202,14 @@ func (this *AreaPackFilter) Power(userid string, startime, endtime time.Time) bo
 		setMap["o_jy.l_areaStart_p"] = startime.Unix()
 		setMap["o_jy.o_area_p"] = this.Area
 	}
-	return util.MQFW.UpdateById("user", userid, map[string]interface{}{
+	if util.MQFW.UpdateById("user", userid, map[string]interface{}{
 		"$set": setMap,
-	})
+	}) {
+		//清除 用户权限缓存
+		jy.ClearBigVipUserPower(userid)
+		return true
+	}
+	return false
 }
 
 //获取产品id