|
@@ -595,15 +595,20 @@ func delRedisByPowerCheck(positionId string) bool {
|
|
func ResourcePowerHandle(identity *usercenter.Identity, waitEmpowerId, t int64) {
|
|
func ResourcePowerHandle(identity *usercenter.Identity, waitEmpowerId, t int64) {
|
|
//如果是运营商数据定制及分析产品,调用资源中台,取消对应菜单权限
|
|
//如果是运营商数据定制及分析产品,调用资源中台,取消对应菜单权限
|
|
if JyMysql.CountBySql(`select count(1) as count from `+EntnicheWaitEmpower+` where id=? and product_type=?`, waitEmpowerId, YYSSJDZYFX) > 0 {
|
|
if JyMysql.CountBySql(`select count(1) as count from `+EntnicheWaitEmpower+` where id=? and product_type=?`, waitEmpowerId, YYSSJDZYFX) > 0 {
|
|
- entity.ResourceRpc.PowerHandle(context.Background(), &pb.PowerReq{
|
|
|
|
- Appid: "10000",
|
|
|
|
- GoodsCode: "special_nosale_goods",
|
|
|
|
- GoodsSpecId: 31,
|
|
|
|
- BuyNum: 1,
|
|
|
|
- Type: t,
|
|
|
|
- AccountId: identity.AccountId,
|
|
|
|
- EntAccountId: identity.EntAccountId,
|
|
|
|
- EntId: identity.EntId,
|
|
|
|
- })
|
|
|
|
|
|
+ if t == 1 {
|
|
|
|
+ entity.ResourceRpc.Empower(context.Background(), &pb.EmpowerReq{
|
|
|
|
+ Appid: "10000",
|
|
|
|
+ FunctionCode: "bi_sj_yyszs",
|
|
|
|
+ EntId: identity.EntId,
|
|
|
|
+ EntUserId: []int64{identity.EntUserId},
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ entity.ResourceRpc.CancelEmpower(context.Background(), &pb.EmpowerReq{
|
|
|
|
+ Appid: "10000",
|
|
|
|
+ FunctionCode: "bi_sj_yyszs",
|
|
|
|
+ EntId: identity.EntId,
|
|
|
|
+ EntUserId: []int64{identity.EntUserId},
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|