wangchuanjin před 1 rokem
rodič
revize
afe378f0a3

+ 22 - 5
public/entity/base_ent_empower.go

@@ -99,7 +99,7 @@ func (b *base_ent_empower) Empower(appid string, function_code []string, ent_id
 	})
 }
 
-//取消授权
+//根据功能代码取消授权
 func (b *base_ent_empower) CancelEmpower(tx *sql.Tx, appid string, function_code []string, ent_id int64, ent_user_id []int64) bool {
 	args := []interface{}{appid, ent_id}
 	wh1 := []string{}
@@ -112,8 +112,25 @@ func (b *base_ent_empower) CancelEmpower(tx *sql.Tx, appid string, function_code
 		wh2 = append(wh2, "?")
 		args = append(args, v)
 	}
-	return Mysql_BaseService.ExecTx("取消授权", func(tx *sql.Tx) bool {
-		r1 := Mysql_BaseService.UpdateOrDeleteBySqlByTx(tx, `delete from base_ent_empower where appid=? and ent_id=? and function_code in (`+strings.Join(wh1, ",")+`) and ent_user_id in (`+strings.Join(wh2, ",")+`)`, args...)
-		return r1 == int64(len(function_code)*len(ent_user_id))
-	})
+	r1 := Mysql_BaseService.UpdateOrDeleteBySqlByTx(tx, `delete from base_ent_empower where appid=? and ent_id=? and function_code in (`+strings.Join(wh1, ",")+`) and ent_user_id in (`+strings.Join(wh2, ",")+`)`, args...)
+	return r1 == int64(len(function_code)*len(ent_user_id))
+}
+
+//根据功能分类取消所有授权
+func (b *base_ent_empower) CancelAllEmpower(tx *sql.Tx, appid string, function_module []string, ent_id int64, ent_user_id []int64) bool {
+	args := []interface{}{appid}
+	wh1 := []string{}
+	for _, v := range function_module {
+		wh1 = append(wh1, "?")
+		args = append(args, v)
+	}
+	args = append(args, appid, appid, ent_id)
+	wh2 := []string{}
+	for _, v := range ent_user_id {
+		wh2 = append(wh2, "?")
+		args = append(args, v)
+	}
+	return Mysql_BaseService.UpdateOrDeleteBySqlByTx(tx, `delete c from base_function_module a
+	inner join base_function b on (a.appid=? and a.name in (`+strings.Join(wh1, ",")+`) and a.id=b.pid and b.appid=?)
+	inner join base_ent_empower c on (b.code=c.function_code and c.appid=? and c.ent_id=? and c.ent_user_id in (`+strings.Join(wh2, ",")+`))`, args...) >= 0
 }

+ 28 - 2
public/service/power.go

@@ -216,7 +216,7 @@ func Empower(appid string, function_code []string, ent_id int64, ent_user_id []i
 }
 
 /*
- * 取消授权
+ * 根据功能代码取消授权
  * @param appid
  * @param function_code 功能代码
  * @param ent_id 企业id
@@ -233,7 +233,7 @@ func CancelEmpower(appid string, function_code []string, ent_id int64, ent_user_
 	} else if len(ent_user_id) == 0 {
 		return 0, errors.New("无效的参数ent_user_id")
 	}
-	if Mysql_BaseService.ExecTx("取消授权", func(tx *sql.Tx) bool {
+	if Mysql_BaseService.ExecTx("根据功能代码取消授权", func(tx *sql.Tx) bool {
 		return Base_ent_empower.CancelEmpower(tx, appid, function_code, ent_id, ent_user_id)
 	}) {
 		return 1, nil
@@ -241,6 +241,32 @@ func CancelEmpower(appid string, function_code []string, ent_id int64, ent_user_
 	return 0, nil
 }
 
+/*
+ * 根据功能分类取消所有授权
+ * @param appid
+ * @param function_code 功能代码
+ * @param ent_id 企业id
+ * @param ent_user_id 企业用户id
+ * @return 0:失败 1:成功
+ */
+func CancelAllEmpower(appid string, function_module []string, ent_id int64, ent_user_id []int64) (int64, error) {
+	if appid == "" {
+		return 0, errors.New("无效的参数appid")
+	} else if len(function_module) == 0 {
+		return 0, errors.New("无效的参数function_module")
+	} else if ent_id == 0 {
+		return 0, errors.New("无效的参数ent_id")
+	} else if len(ent_user_id) == 0 {
+		return 0, errors.New("无效的参数ent_user_id")
+	}
+	if Mysql_BaseService.ExecTx("根据功能分类取消所有授权", func(tx *sql.Tx) bool {
+		return Base_ent_empower.CancelAllEmpower(tx, appid, function_module, ent_id, ent_user_id)
+	}) {
+		return 1, nil
+	}
+	return 0, nil
+}
+
 /*
  * 授权列表
  * @param appid

+ 6 - 0
public/service/power_test.go

@@ -55,6 +55,12 @@ func TestCancelEmpower(t *testing.T) {
 	assert.Equal(t, int64(1), v)
 }
 
+func TestCancelAllEmpower(t *testing.T) {
+	v, err := CancelAllEmpower("10000", []string{"bi_电销菜单管理"}, 1, []int64{3870})
+	assert.Nil(t, err)
+	assert.Equal(t, int64(1), v)
+}
+
 func TestEmpowerList(t *testing.T) {
 	count, list, err := EmpowerList("10000", "znsj_kf_use", 14184, 2, 1)
 	assert.Nil(t, err)

+ 31 - 0
rpc/internal/logic/cancelallempowerlogic.go

@@ -0,0 +1,31 @@
+package logic
+
+import (
+	"context"
+
+	"bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/internal/svc"
+	"bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/pb"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type CancelAllEmpowerLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewCancelAllEmpowerLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CancelAllEmpowerLogic {
+	return &CancelAllEmpowerLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 取消授权
+func (l *CancelAllEmpowerLogic) CancelAllEmpower(in *pb.EmpowerReq) (*pb.Resp, error) {
+	// todo: add your logic here and delete this line
+
+	return &pb.Resp{}, nil
+}

+ 6 - 0
rpc/internal/server/resourceserver.go

@@ -64,6 +64,12 @@ func (s *ResourceServer) CancelEmpower(ctx context.Context, in *pb.EmpowerReq) (
 	return l.CancelEmpower(in)
 }
 
+// 取消授权
+func (s *ResourceServer) CancelAllEmpower(ctx context.Context, in *pb.EmpowerReq) (*pb.Resp, error) {
+	l := logic.NewCancelAllEmpowerLogic(ctx, s.svcCtx)
+	return l.CancelAllEmpower(in)
+}
+
 // 授权列表
 func (s *ResourceServer) EmpowerList(ctx context.Context, in *pb.EmpowerListReq) (*pb.EmpowerListResp, error) {
 	l := logic.NewEmpowerListLogic(ctx, s.svcCtx)

+ 244 - 147
rpc/pb/resource.pb.go

@@ -518,6 +518,77 @@ func (x *EmpowerReq) GetEntUserId() []int64 {
 	return nil
 }
 
+type EmpowerAllReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Appid          string  `protobuf:"bytes,1,opt,name=appid,proto3" json:"appid,omitempty"`
+	FunctionModule string  `protobuf:"bytes,2,opt,name=function_module,json=functionModule,proto3" json:"function_module,omitempty"` //功能分类
+	EntId          int64   `protobuf:"varint,3,opt,name=ent_id,json=entId,proto3" json:"ent_id,omitempty"`                           //企业id
+	EntUserId      []int64 `protobuf:"varint,4,rep,packed,name=ent_user_id,json=entUserId,proto3" json:"ent_user_id,omitempty"`      //企业用户id
+}
+
+func (x *EmpowerAllReq) Reset() {
+	*x = EmpowerAllReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_resource_proto_msgTypes[6]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *EmpowerAllReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EmpowerAllReq) ProtoMessage() {}
+
+func (x *EmpowerAllReq) ProtoReflect() protoreflect.Message {
+	mi := &file_resource_proto_msgTypes[6]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use EmpowerAllReq.ProtoReflect.Descriptor instead.
+func (*EmpowerAllReq) Descriptor() ([]byte, []int) {
+	return file_resource_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *EmpowerAllReq) GetAppid() string {
+	if x != nil {
+		return x.Appid
+	}
+	return ""
+}
+
+func (x *EmpowerAllReq) GetFunctionModule() string {
+	if x != nil {
+		return x.FunctionModule
+	}
+	return ""
+}
+
+func (x *EmpowerAllReq) GetEntId() int64 {
+	if x != nil {
+		return x.EntId
+	}
+	return 0
+}
+
+func (x *EmpowerAllReq) GetEntUserId() []int64 {
+	if x != nil {
+		return x.EntUserId
+	}
+	return nil
+}
+
 type EmpowerListReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -533,7 +604,7 @@ type EmpowerListReq struct {
 func (x *EmpowerListReq) Reset() {
 	*x = EmpowerListReq{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_resource_proto_msgTypes[6]
+		mi := &file_resource_proto_msgTypes[7]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -546,7 +617,7 @@ func (x *EmpowerListReq) String() string {
 func (*EmpowerListReq) ProtoMessage() {}
 
 func (x *EmpowerListReq) ProtoReflect() protoreflect.Message {
-	mi := &file_resource_proto_msgTypes[6]
+	mi := &file_resource_proto_msgTypes[7]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -559,7 +630,7 @@ func (x *EmpowerListReq) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use EmpowerListReq.ProtoReflect.Descriptor instead.
 func (*EmpowerListReq) Descriptor() ([]byte, []int) {
-	return file_resource_proto_rawDescGZIP(), []int{6}
+	return file_resource_proto_rawDescGZIP(), []int{7}
 }
 
 func (x *EmpowerListReq) GetAppid() string {
@@ -609,7 +680,7 @@ type EmpowerListResp struct {
 func (x *EmpowerListResp) Reset() {
 	*x = EmpowerListResp{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_resource_proto_msgTypes[7]
+		mi := &file_resource_proto_msgTypes[8]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -622,7 +693,7 @@ func (x *EmpowerListResp) String() string {
 func (*EmpowerListResp) ProtoMessage() {}
 
 func (x *EmpowerListResp) ProtoReflect() protoreflect.Message {
-	mi := &file_resource_proto_msgTypes[7]
+	mi := &file_resource_proto_msgTypes[8]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -635,7 +706,7 @@ func (x *EmpowerListResp) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use EmpowerListResp.ProtoReflect.Descriptor instead.
 func (*EmpowerListResp) Descriptor() ([]byte, []int) {
-	return file_resource_proto_rawDescGZIP(), []int{7}
+	return file_resource_proto_rawDescGZIP(), []int{8}
 }
 
 func (x *EmpowerListResp) GetCount() int64 {
@@ -667,7 +738,7 @@ type Resp struct {
 func (x *Resp) Reset() {
 	*x = Resp{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_resource_proto_msgTypes[8]
+		mi := &file_resource_proto_msgTypes[9]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -680,7 +751,7 @@ func (x *Resp) String() string {
 func (*Resp) ProtoMessage() {}
 
 func (x *Resp) ProtoReflect() protoreflect.Message {
-	mi := &file_resource_proto_msgTypes[8]
+	mi := &file_resource_proto_msgTypes[9]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -693,7 +764,7 @@ func (x *Resp) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use Resp.ProtoReflect.Descriptor instead.
 func (*Resp) Descriptor() ([]byte, []int) {
-	return file_resource_proto_rawDescGZIP(), []int{8}
+	return file_resource_proto_rawDescGZIP(), []int{9}
 }
 
 func (x *Resp) GetStatus() int64 {
@@ -746,7 +817,7 @@ type HaspowersReq struct {
 func (x *HaspowersReq) Reset() {
 	*x = HaspowersReq{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_resource_proto_msgTypes[9]
+		mi := &file_resource_proto_msgTypes[10]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -759,7 +830,7 @@ func (x *HaspowersReq) String() string {
 func (*HaspowersReq) ProtoMessage() {}
 
 func (x *HaspowersReq) ProtoReflect() protoreflect.Message {
-	mi := &file_resource_proto_msgTypes[9]
+	mi := &file_resource_proto_msgTypes[10]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -772,7 +843,7 @@ func (x *HaspowersReq) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use HaspowersReq.ProtoReflect.Descriptor instead.
 func (*HaspowersReq) Descriptor() ([]byte, []int) {
-	return file_resource_proto_rawDescGZIP(), []int{9}
+	return file_resource_proto_rawDescGZIP(), []int{10}
 }
 
 func (x *HaspowersReq) GetAppid() string {
@@ -821,7 +892,7 @@ type HaspowersResp struct {
 func (x *HaspowersResp) Reset() {
 	*x = HaspowersResp{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_resource_proto_msgTypes[10]
+		mi := &file_resource_proto_msgTypes[11]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -834,7 +905,7 @@ func (x *HaspowersResp) String() string {
 func (*HaspowersResp) ProtoMessage() {}
 
 func (x *HaspowersResp) ProtoReflect() protoreflect.Message {
-	mi := &file_resource_proto_msgTypes[10]
+	mi := &file_resource_proto_msgTypes[11]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -847,7 +918,7 @@ func (x *HaspowersResp) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use HaspowersResp.ProtoReflect.Descriptor instead.
 func (*HaspowersResp) Descriptor() ([]byte, []int) {
-	return file_resource_proto_rawDescGZIP(), []int{10}
+	return file_resource_proto_rawDescGZIP(), []int{11}
 }
 
 func (x *HaspowersResp) GetPowers() []string {
@@ -870,7 +941,7 @@ type WaitEmpowerDetailReq struct {
 func (x *WaitEmpowerDetailReq) Reset() {
 	*x = WaitEmpowerDetailReq{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_resource_proto_msgTypes[11]
+		mi := &file_resource_proto_msgTypes[12]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -883,7 +954,7 @@ func (x *WaitEmpowerDetailReq) String() string {
 func (*WaitEmpowerDetailReq) ProtoMessage() {}
 
 func (x *WaitEmpowerDetailReq) ProtoReflect() protoreflect.Message {
-	mi := &file_resource_proto_msgTypes[11]
+	mi := &file_resource_proto_msgTypes[12]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -896,7 +967,7 @@ func (x *WaitEmpowerDetailReq) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use WaitEmpowerDetailReq.ProtoReflect.Descriptor instead.
 func (*WaitEmpowerDetailReq) Descriptor() ([]byte, []int) {
-	return file_resource_proto_rawDescGZIP(), []int{11}
+	return file_resource_proto_rawDescGZIP(), []int{12}
 }
 
 func (x *WaitEmpowerDetailReq) GetAppid() string {
@@ -933,7 +1004,7 @@ type WaitEmpowerDetailBySpecIdReq struct {
 func (x *WaitEmpowerDetailBySpecIdReq) Reset() {
 	*x = WaitEmpowerDetailBySpecIdReq{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_resource_proto_msgTypes[12]
+		mi := &file_resource_proto_msgTypes[13]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -946,7 +1017,7 @@ func (x *WaitEmpowerDetailBySpecIdReq) String() string {
 func (*WaitEmpowerDetailBySpecIdReq) ProtoMessage() {}
 
 func (x *WaitEmpowerDetailBySpecIdReq) ProtoReflect() protoreflect.Message {
-	mi := &file_resource_proto_msgTypes[12]
+	mi := &file_resource_proto_msgTypes[13]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -959,7 +1030,7 @@ func (x *WaitEmpowerDetailBySpecIdReq) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use WaitEmpowerDetailBySpecIdReq.ProtoReflect.Descriptor instead.
 func (*WaitEmpowerDetailBySpecIdReq) Descriptor() ([]byte, []int) {
-	return file_resource_proto_rawDescGZIP(), []int{12}
+	return file_resource_proto_rawDescGZIP(), []int{13}
 }
 
 func (x *WaitEmpowerDetailBySpecIdReq) GetAppid() string {
@@ -994,7 +1065,7 @@ type WaitEmpowerDetailsResp struct {
 func (x *WaitEmpowerDetailsResp) Reset() {
 	*x = WaitEmpowerDetailsResp{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_resource_proto_msgTypes[13]
+		mi := &file_resource_proto_msgTypes[14]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -1007,7 +1078,7 @@ func (x *WaitEmpowerDetailsResp) String() string {
 func (*WaitEmpowerDetailsResp) ProtoMessage() {}
 
 func (x *WaitEmpowerDetailsResp) ProtoReflect() protoreflect.Message {
-	mi := &file_resource_proto_msgTypes[13]
+	mi := &file_resource_proto_msgTypes[14]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -1020,7 +1091,7 @@ func (x *WaitEmpowerDetailsResp) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use WaitEmpowerDetailsResp.ProtoReflect.Descriptor instead.
 func (*WaitEmpowerDetailsResp) Descriptor() ([]byte, []int) {
-	return file_resource_proto_rawDescGZIP(), []int{13}
+	return file_resource_proto_rawDescGZIP(), []int{14}
 }
 
 func (x *WaitEmpowerDetailsResp) GetWaitEmpowerDetails() []*WaitEmpowerDetailResp {
@@ -1046,7 +1117,7 @@ type WaitEmpowerDetailResp struct {
 func (x *WaitEmpowerDetailResp) Reset() {
 	*x = WaitEmpowerDetailResp{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_resource_proto_msgTypes[14]
+		mi := &file_resource_proto_msgTypes[15]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -1059,7 +1130,7 @@ func (x *WaitEmpowerDetailResp) String() string {
 func (*WaitEmpowerDetailResp) ProtoMessage() {}
 
 func (x *WaitEmpowerDetailResp) ProtoReflect() protoreflect.Message {
-	mi := &file_resource_proto_msgTypes[14]
+	mi := &file_resource_proto_msgTypes[15]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -1072,7 +1143,7 @@ func (x *WaitEmpowerDetailResp) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use WaitEmpowerDetailResp.ProtoReflect.Descriptor instead.
 func (*WaitEmpowerDetailResp) Descriptor() ([]byte, []int) {
-	return file_resource_proto_rawDescGZIP(), []int{14}
+	return file_resource_proto_rawDescGZIP(), []int{15}
 }
 
 func (x *WaitEmpowerDetailResp) GetId() int64 {
@@ -1185,90 +1256,101 @@ var file_resource_proto_rawDesc = []byte{
 	0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x5f, 0x69,
 	0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1e,
 	0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20,
-	0x03, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x9a,
-	0x01, 0x0a, 0x0e, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
-	0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x75, 0x6e, 0x63, 0x74,
-	0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
-	0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x06,
-	0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e,
-	0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x18,
-	0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1b,
-	0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x45, 0x0a, 0x0f, 0x45,
-	0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14,
-	0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63,
-	0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03,
-	0x28, 0x0b, 0x32, 0x08, 0x2e, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x04, 0x6c, 0x69,
-	0x73, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x04, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73,
-	0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61,
-	0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74,
-	0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74,
-	0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x72, 0x70, 0x6c, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e,
-	0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, 0x75, 0x72, 0x70, 0x6c, 0x75, 0x73,
-	0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74,
-	0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74,
-	0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65,
-	0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22,
-	0xa0, 0x01, 0x0a, 0x0c, 0x48, 0x61, 0x73, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71,
+	0x03, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x85,
+	0x01, 0x0a, 0x0d, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71,
 	0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
-	0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f,
-	0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63,
-	0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x65,
-	0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x65,
-	0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74,
-	0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69,
-	0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72,
-	0x49, 0x64, 0x22, 0x27, 0x0a, 0x0d, 0x48, 0x61, 0x73, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52,
-	0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20,
-	0x03, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x22, 0x68, 0x0a, 0x14, 0x57,
-	0x61, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c,
-	0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x75, 0x6e,
-	0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x0c, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x15,
-	0x0a, 0x06, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
-	0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x1c, 0x57, 0x61, 0x69, 0x74, 0x45, 0x6d, 0x70,
-	0x6f, 0x77, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x42, 0x79, 0x53, 0x70, 0x65, 0x63,
-	0x49, 0x64, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x73,
-	0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x70,
-	0x65, 0x63, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x60, 0x0a, 0x16, 0x57,
-	0x61, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c,
-	0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x46, 0x0a, 0x12, 0x77, 0x61, 0x69, 0x74, 0x45, 0x6d, 0x70,
-	0x6f, 0x77, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
-	0x0b, 0x32, 0x16, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x44,
-	0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x52, 0x12, 0x77, 0x61, 0x69, 0x74, 0x45,
-	0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0xca, 0x01,
-	0x0a, 0x15, 0x57, 0x61, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x44, 0x65, 0x74,
-	0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74,
-	0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61,
-	0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69,
-	0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d,
-	0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75,
-	0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x65, 0x6d, 0x70, 0x6f, 0x77, 0x65,
-	0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6f,
-	0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75, 0x73, 0x65, 0x43, 0x6f,
-	0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x72,
-	0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x69, 0x6d,
-	0x69, 0x74, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x32, 0xf0, 0x03, 0x0a, 0x08, 0x52,
-	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x50, 0x6f, 0x77, 0x65, 0x72,
-	0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x09, 0x2e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65,
-	0x71, 0x1a, 0x05, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63,
-	0x6b, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x0e, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f,
-	0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x05, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a,
-	0x09, 0x44, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0d, 0x2e, 0x44, 0x65, 0x64,
-	0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x05, 0x2e, 0x52, 0x65, 0x73, 0x70,
-	0x12, 0x1f, 0x0a, 0x08, 0x52, 0x65, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x12, 0x0c, 0x2e, 0x52,
-	0x65, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x05, 0x2e, 0x52, 0x65, 0x73,
-	0x70, 0x12, 0x1f, 0x0a, 0x09, 0x52, 0x65, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x0b,
-	0x2e, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x05, 0x2e, 0x52, 0x65,
-	0x73, 0x70, 0x12, 0x1d, 0x0a, 0x07, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x0b, 0x2e,
-	0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x05, 0x2e, 0x52, 0x65, 0x73,
-	0x70, 0x12, 0x23, 0x0a, 0x0d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x45, 0x6d, 0x70, 0x6f, 0x77,
+	0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
+	0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x0e, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12,
+	0x15, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x5f, 0x75, 0x73,
+	0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74,
+	0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x9a, 0x01, 0x0a, 0x0e, 0x45, 0x6d, 0x70, 0x6f, 0x77,
+	0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70,
+	0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x12,
+	0x23, 0x0a, 0x0d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+	0x43, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70,
+	0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70,
+	0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73,
+	0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53,
+	0x69, 0x7a, 0x65, 0x22, 0x45, 0x0a, 0x0f, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69,
+	0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x04,
+	0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x45, 0x6d, 0x70,
+	0x6f, 0x77, 0x65, 0x72, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x04, 0x52,
+	0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x75,
+	0x73, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08,
+	0x75, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x72, 0x70,
+	0x6c, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x0c, 0x73, 0x75, 0x72, 0x70, 0x6c, 0x75, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a,
+	0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08,
+	0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
+	0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x0c, 0x48, 0x61, 0x73, 0x70,
+	0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x69,
+	0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x12, 0x1d,
+	0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a,
+	0x0e, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
+	0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x65, 0x6e,
+	0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x27, 0x0a, 0x0d, 0x48, 0x61,
+	0x73, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x70,
+	0x6f, 0x77, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x77,
+	0x65, 0x72, 0x73, 0x22, 0x68, 0x0a, 0x14, 0x57, 0x61, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x6f, 0x77,
+	0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61,
+	0x70, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x69,
+	0x64, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f,
+	0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
+	0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x64, 0x0a,
+	0x1c, 0x57, 0x61, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61,
+	0x69, 0x6c, 0x42, 0x79, 0x53, 0x70, 0x65, 0x63, 0x49, 0x64, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a,
+	0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70,
+	0x70, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x02,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x70, 0x65, 0x63, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06,
+	0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e,
+	0x74, 0x49, 0x64, 0x22, 0x60, 0x0a, 0x16, 0x57, 0x61, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x6f, 0x77,
+	0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x46, 0x0a,
+	0x12, 0x77, 0x61, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61,
+	0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x57, 0x61, 0x69, 0x74,
+	0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73,
+	0x70, 0x52, 0x12, 0x77, 0x61, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x44, 0x65,
+	0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0xca, 0x01, 0x0a, 0x15, 0x57, 0x61, 0x69, 0x74, 0x45, 0x6d,
+	0x70, 0x6f, 0x77, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12,
+	0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19,
+	0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6d, 0x70,
+	0x6f, 0x77, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x0c, 0x65, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b,
+	0x0a, 0x09, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x08, 0x75, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x6c,
+	0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x06, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65,
+	0x67, 0x79, 0x32, 0x98, 0x04, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,
+	0x1f, 0x0a, 0x0b, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x09,
+	0x2e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x05, 0x2e, 0x52, 0x65, 0x73, 0x70,
+	0x12, 0x23, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x0e,
+	0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x05,
+	0x2e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x09, 0x44, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69,
+	0x6f, 0x6e, 0x12, 0x0d, 0x2e, 0x44, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
+	0x71, 0x1a, 0x05, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x08, 0x52, 0x65, 0x63, 0x68,
+	0x61, 0x72, 0x67, 0x65, 0x12, 0x0c, 0x2e, 0x52, 0x65, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52,
+	0x65, 0x71, 0x1a, 0x05, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x09, 0x52, 0x65, 0x45,
+	0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x0b, 0x2e, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72,
+	0x52, 0x65, 0x71, 0x1a, 0x05, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x07, 0x45, 0x6d,
+	0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x0b, 0x2e, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x52,
+	0x65, 0x71, 0x1a, 0x05, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x43, 0x61, 0x6e,
+	0x63, 0x65, 0x6c, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x0b, 0x2e, 0x45, 0x6d, 0x70,
+	0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x05, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26,
+	0x0a, 0x10, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x6c, 0x6c, 0x45, 0x6d, 0x70, 0x6f, 0x77,
 	0x65, 0x72, 0x12, 0x0b, 0x2e, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a,
 	0x05, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0b, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65,
 	0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0f, 0x2e, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x4c,
@@ -1301,7 +1383,7 @@ func file_resource_proto_rawDescGZIP() []byte {
 	return file_resource_proto_rawDescData
 }
 
-var file_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
+var file_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
 var file_resource_proto_goTypes = []interface{}{
 	(*Empower)(nil),                      // 0: Empower
 	(*PowerReq)(nil),                     // 1: PowerReq
@@ -1309,19 +1391,20 @@ var file_resource_proto_goTypes = []interface{}{
 	(*DeductionReq)(nil),                 // 3: DeductionReq
 	(*RechargeReq)(nil),                  // 4: RechargeReq
 	(*EmpowerReq)(nil),                   // 5: EmpowerReq
-	(*EmpowerListReq)(nil),               // 6: EmpowerListReq
-	(*EmpowerListResp)(nil),              // 7: EmpowerListResp
-	(*Resp)(nil),                         // 8: Resp
-	(*HaspowersReq)(nil),                 // 9: HaspowersReq
-	(*HaspowersResp)(nil),                // 10: HaspowersResp
-	(*WaitEmpowerDetailReq)(nil),         // 11: WaitEmpowerDetailReq
-	(*WaitEmpowerDetailBySpecIdReq)(nil), // 12: WaitEmpowerDetailBySpecIdReq
-	(*WaitEmpowerDetailsResp)(nil),       // 13: WaitEmpowerDetailsResp
-	(*WaitEmpowerDetailResp)(nil),        // 14: WaitEmpowerDetailResp
+	(*EmpowerAllReq)(nil),                // 6: EmpowerAllReq
+	(*EmpowerListReq)(nil),               // 7: EmpowerListReq
+	(*EmpowerListResp)(nil),              // 8: EmpowerListResp
+	(*Resp)(nil),                         // 9: Resp
+	(*HaspowersReq)(nil),                 // 10: HaspowersReq
+	(*HaspowersResp)(nil),                // 11: HaspowersResp
+	(*WaitEmpowerDetailReq)(nil),         // 12: WaitEmpowerDetailReq
+	(*WaitEmpowerDetailBySpecIdReq)(nil), // 13: WaitEmpowerDetailBySpecIdReq
+	(*WaitEmpowerDetailsResp)(nil),       // 14: WaitEmpowerDetailsResp
+	(*WaitEmpowerDetailResp)(nil),        // 15: WaitEmpowerDetailResp
 }
 var file_resource_proto_depIdxs = []int32{
 	0,  // 0: EmpowerListResp.list:type_name -> Empower
-	14, // 1: WaitEmpowerDetailsResp.waitEmpowerDetails:type_name -> WaitEmpowerDetailResp
+	15, // 1: WaitEmpowerDetailsResp.waitEmpowerDetails:type_name -> WaitEmpowerDetailResp
 	1,  // 2: Resource.PowerHandle:input_type -> PowerReq
 	2,  // 3: Resource.CheckPower:input_type -> CheckPowerReq
 	3,  // 4: Resource.Deduction:input_type -> DeductionReq
@@ -1329,23 +1412,25 @@ var file_resource_proto_depIdxs = []int32{
 	5,  // 6: Resource.ReEmpower:input_type -> EmpowerReq
 	5,  // 7: Resource.Empower:input_type -> EmpowerReq
 	5,  // 8: Resource.CancelEmpower:input_type -> EmpowerReq
-	6,  // 9: Resource.EmpowerList:input_type -> EmpowerListReq
-	9,  // 10: Resource.Haspowers:input_type -> HaspowersReq
-	11, // 11: Resource.WaitEmpowerDetail:input_type -> WaitEmpowerDetailReq
-	12, // 12: Resource.WaitEmpowerDetailBySpecId:input_type -> WaitEmpowerDetailBySpecIdReq
-	8,  // 13: Resource.PowerHandle:output_type -> Resp
-	8,  // 14: Resource.CheckPower:output_type -> Resp
-	8,  // 15: Resource.Deduction:output_type -> Resp
-	8,  // 16: Resource.Recharge:output_type -> Resp
-	8,  // 17: Resource.ReEmpower:output_type -> Resp
-	8,  // 18: Resource.Empower:output_type -> Resp
-	8,  // 19: Resource.CancelEmpower:output_type -> Resp
-	7,  // 20: Resource.EmpowerList:output_type -> EmpowerListResp
-	10, // 21: Resource.Haspowers:output_type -> HaspowersResp
-	14, // 22: Resource.WaitEmpowerDetail:output_type -> WaitEmpowerDetailResp
-	13, // 23: Resource.WaitEmpowerDetailBySpecId:output_type -> WaitEmpowerDetailsResp
-	13, // [13:24] is the sub-list for method output_type
-	2,  // [2:13] is the sub-list for method input_type
+	5,  // 9: Resource.CancelAllEmpower:input_type -> EmpowerReq
+	7,  // 10: Resource.EmpowerList:input_type -> EmpowerListReq
+	10, // 11: Resource.Haspowers:input_type -> HaspowersReq
+	12, // 12: Resource.WaitEmpowerDetail:input_type -> WaitEmpowerDetailReq
+	13, // 13: Resource.WaitEmpowerDetailBySpecId:input_type -> WaitEmpowerDetailBySpecIdReq
+	9,  // 14: Resource.PowerHandle:output_type -> Resp
+	9,  // 15: Resource.CheckPower:output_type -> Resp
+	9,  // 16: Resource.Deduction:output_type -> Resp
+	9,  // 17: Resource.Recharge:output_type -> Resp
+	9,  // 18: Resource.ReEmpower:output_type -> Resp
+	9,  // 19: Resource.Empower:output_type -> Resp
+	9,  // 20: Resource.CancelEmpower:output_type -> Resp
+	9,  // 21: Resource.CancelAllEmpower:output_type -> Resp
+	8,  // 22: Resource.EmpowerList:output_type -> EmpowerListResp
+	11, // 23: Resource.Haspowers:output_type -> HaspowersResp
+	15, // 24: Resource.WaitEmpowerDetail:output_type -> WaitEmpowerDetailResp
+	14, // 25: Resource.WaitEmpowerDetailBySpecId:output_type -> WaitEmpowerDetailsResp
+	14, // [14:26] is the sub-list for method output_type
+	2,  // [2:14] is the sub-list for method input_type
 	2,  // [2:2] is the sub-list for extension type_name
 	2,  // [2:2] is the sub-list for extension extendee
 	0,  // [0:2] is the sub-list for field type_name
@@ -1430,7 +1515,7 @@ func file_resource_proto_init() {
 			}
 		}
 		file_resource_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*EmpowerListReq); i {
+			switch v := v.(*EmpowerAllReq); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1442,7 +1527,7 @@ func file_resource_proto_init() {
 			}
 		}
 		file_resource_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*EmpowerListResp); i {
+			switch v := v.(*EmpowerListReq); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1454,7 +1539,7 @@ func file_resource_proto_init() {
 			}
 		}
 		file_resource_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*Resp); i {
+			switch v := v.(*EmpowerListResp); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1466,7 +1551,7 @@ func file_resource_proto_init() {
 			}
 		}
 		file_resource_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*HaspowersReq); i {
+			switch v := v.(*Resp); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1478,7 +1563,7 @@ func file_resource_proto_init() {
 			}
 		}
 		file_resource_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*HaspowersResp); i {
+			switch v := v.(*HaspowersReq); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1490,7 +1575,7 @@ func file_resource_proto_init() {
 			}
 		}
 		file_resource_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*WaitEmpowerDetailReq); i {
+			switch v := v.(*HaspowersResp); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1502,7 +1587,7 @@ func file_resource_proto_init() {
 			}
 		}
 		file_resource_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*WaitEmpowerDetailBySpecIdReq); i {
+			switch v := v.(*WaitEmpowerDetailReq); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1514,7 +1599,7 @@ func file_resource_proto_init() {
 			}
 		}
 		file_resource_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*WaitEmpowerDetailsResp); i {
+			switch v := v.(*WaitEmpowerDetailBySpecIdReq); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1526,6 +1611,18 @@ func file_resource_proto_init() {
 			}
 		}
 		file_resource_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*WaitEmpowerDetailsResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_resource_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*WaitEmpowerDetailResp); i {
 			case 0:
 				return &v.state
@@ -1544,7 +1641,7 @@ func file_resource_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_resource_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   15,
+			NumMessages:   16,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 38 - 0
rpc/pb/resource_grpc.pb.go

@@ -36,6 +36,8 @@ type ResourceClient interface {
 	Empower(ctx context.Context, in *EmpowerReq, opts ...grpc.CallOption) (*Resp, error)
 	//取消授权
 	CancelEmpower(ctx context.Context, in *EmpowerReq, opts ...grpc.CallOption) (*Resp, error)
+	//取消授权
+	CancelAllEmpower(ctx context.Context, in *EmpowerReq, opts ...grpc.CallOption) (*Resp, error)
 	//授权列表
 	EmpowerList(ctx context.Context, in *EmpowerListReq, opts ...grpc.CallOption) (*EmpowerListResp, error)
 	//所有的权益
@@ -117,6 +119,15 @@ func (c *resourceClient) CancelEmpower(ctx context.Context, in *EmpowerReq, opts
 	return out, nil
 }
 
+func (c *resourceClient) CancelAllEmpower(ctx context.Context, in *EmpowerReq, opts ...grpc.CallOption) (*Resp, error) {
+	out := new(Resp)
+	err := c.cc.Invoke(ctx, "/Resource/CancelAllEmpower", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 func (c *resourceClient) EmpowerList(ctx context.Context, in *EmpowerListReq, opts ...grpc.CallOption) (*EmpowerListResp, error) {
 	out := new(EmpowerListResp)
 	err := c.cc.Invoke(ctx, "/Resource/EmpowerList", in, out, opts...)
@@ -171,6 +182,8 @@ type ResourceServer interface {
 	Empower(context.Context, *EmpowerReq) (*Resp, error)
 	//取消授权
 	CancelEmpower(context.Context, *EmpowerReq) (*Resp, error)
+	//取消授权
+	CancelAllEmpower(context.Context, *EmpowerReq) (*Resp, error)
 	//授权列表
 	EmpowerList(context.Context, *EmpowerListReq) (*EmpowerListResp, error)
 	//所有的权益
@@ -207,6 +220,9 @@ func (UnimplementedResourceServer) Empower(context.Context, *EmpowerReq) (*Resp,
 func (UnimplementedResourceServer) CancelEmpower(context.Context, *EmpowerReq) (*Resp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method CancelEmpower not implemented")
 }
+func (UnimplementedResourceServer) CancelAllEmpower(context.Context, *EmpowerReq) (*Resp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CancelAllEmpower not implemented")
+}
 func (UnimplementedResourceServer) EmpowerList(context.Context, *EmpowerListReq) (*EmpowerListResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method EmpowerList not implemented")
 }
@@ -358,6 +374,24 @@ func _Resource_CancelEmpower_Handler(srv interface{}, ctx context.Context, dec f
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Resource_CancelAllEmpower_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(EmpowerReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ResourceServer).CancelAllEmpower(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/Resource/CancelAllEmpower",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ResourceServer).CancelAllEmpower(ctx, req.(*EmpowerReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 func _Resource_EmpowerList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(EmpowerListReq)
 	if err := dec(in); err != nil {
@@ -465,6 +499,10 @@ var Resource_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "CancelEmpower",
 			Handler:    _Resource_CancelEmpower_Handler,
 		},
+		{
+			MethodName: "CancelAllEmpower",
+			Handler:    _Resource_CancelAllEmpower_Handler,
+		},
 		{
 			MethodName: "EmpowerList",
 			Handler:    _Resource_EmpowerList_Handler,

+ 9 - 0
rpc/resource.proto

@@ -53,6 +53,13 @@ message EmpowerReq {
   repeated int64 ent_user_id = 4; //企业用户id
 }
 
+message EmpowerAllReq {
+  string appid = 1;
+  string function_module = 2;     //功能分类
+  int64 ent_id = 3;               //企业id
+  repeated int64 ent_user_id = 4; //企业用户id
+}
+
 message EmpowerListReq {
   string appid = 1;
   string function_code = 2; //功能代码
@@ -126,6 +133,8 @@ service Resource {
   rpc Empower(EmpowerReq) returns(Resp);
   //取消授权
   rpc CancelEmpower(EmpowerReq) returns(Resp);
+  //取消授权
+  rpc CancelAllEmpower(EmpowerReq) returns(Resp);
   //授权列表
   rpc EmpowerList(EmpowerListReq) returns(EmpowerListResp);
   //所有的权益

+ 9 - 0
rpc/resource/resource.go

@@ -16,6 +16,7 @@ type (
 	CheckPowerReq                = pb.CheckPowerReq
 	DeductionReq                 = pb.DeductionReq
 	Empower                      = pb.Empower
+	EmpowerAllReq                = pb.EmpowerAllReq
 	EmpowerListReq               = pb.EmpowerListReq
 	EmpowerListResp              = pb.EmpowerListResp
 	EmpowerReq                   = pb.EmpowerReq
@@ -44,6 +45,8 @@ type (
 		Empower(ctx context.Context, in *EmpowerReq, opts ...grpc.CallOption) (*Resp, error)
 		// 取消授权
 		CancelEmpower(ctx context.Context, in *EmpowerReq, opts ...grpc.CallOption) (*Resp, error)
+		// 取消授权
+		CancelAllEmpower(ctx context.Context, in *EmpowerReq, opts ...grpc.CallOption) (*Resp, error)
 		// 授权列表
 		EmpowerList(ctx context.Context, in *EmpowerListReq, opts ...grpc.CallOption) (*EmpowerListResp, error)
 		// 所有的权益
@@ -107,6 +110,12 @@ func (m *defaultResource) CancelEmpower(ctx context.Context, in *EmpowerReq, opt
 	return client.CancelEmpower(ctx, in, opts...)
 }
 
+// 取消授权
+func (m *defaultResource) CancelAllEmpower(ctx context.Context, in *EmpowerReq, opts ...grpc.CallOption) (*Resp, error) {
+	client := pb.NewResourceClient(m.cli.Conn())
+	return client.CancelAllEmpower(ctx, in, opts...)
+}
+
 // 授权列表
 func (m *defaultResource) EmpowerList(ctx context.Context, in *EmpowerListReq, opts ...grpc.CallOption) (*EmpowerListResp, error) {
 	client := pb.NewResourceClient(m.cli.Conn())