xuzhiheng %!s(int64=2) %!d(string=hai) anos
pai
achega
cac6658899

+ 1 - 0
api/entManageApplication.api

@@ -12,6 +12,7 @@ type (
 	}
 
 	usePersonListReq {
+		EntId         int64 `header:"entId"`
 		WaitEmpowerId int64 `json:"wait_empower_id"`
 	}
 

+ 1 - 0
api/internal/logic/usepersonlistlogic.go

@@ -27,6 +27,7 @@ func (l *UsePersonListLogic) UsePersonList(req types.UsePersonListReq) (*types.R
 	// todo: add your logic here and delete this line
 	res, err := l.svcCtx.EntManageApplicationRpc.UsePersonList(l.ctx, &UsePersonListReq{
 		WaitEmpowerId: req.WaitEmpowerId,
+		EntId:         req.EntId,
 	})
 	return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
 }

+ 1 - 0
api/internal/types/types.go

@@ -12,6 +12,7 @@ type BuyProductListReq struct {
 }
 
 type UsePersonListReq struct {
+	EntId         int64 `header:"entId"`
 	WaitEmpowerId int64 `json:"wait_empower_id"`
 }
 

+ 3 - 1
rpc/entManageApplication.proto

@@ -22,7 +22,8 @@ message BuyProductList {
 }
 
 message UsePersonListReq {
-	int64 wait_empower_id = 1;
+	int64 entId = 1;
+	int64 wait_empower_id = 2;
 }
 
 message UsePersonListResp {
@@ -38,6 +39,7 @@ message UsePersonList {
 	string phone = 4;
 	string department = 5;
 	string role = 6;
+	int64 status = 7;
 }
 
 message AddUsePersonReq {

+ 4 - 4
rpc/entmanageapplication/entmanageapplication.go

@@ -14,16 +14,16 @@ import (
 )
 
 type (
-	AddUsePerson       = pb.AddUsePerson
+	BuyProductListReq  = pb.BuyProductListReq
+	BuyProductListResp = pb.BuyProductListResp
+	BuyProductList     = pb.BuyProductList
 	UsePersonListReq   = pb.UsePersonListReq
 	UsePersonList      = pb.UsePersonList
-	BuyProductList     = pb.BuyProductList
 	UsePersonListResp  = pb.UsePersonListResp
 	AddUsePersonReq    = pb.AddUsePersonReq
 	AddUsePersonResp   = pb.AddUsePersonResp
+	AddUsePerson       = pb.AddUsePerson
 	DelUsePersonReq    = pb.DelUsePersonReq
-	BuyProductListReq  = pb.BuyProductListReq
-	BuyProductListResp = pb.BuyProductListResp
 
 	EntManageApplication interface {
 		BuyProductList(ctx context.Context, in *BuyProductListReq) (*BuyProductListResp, error)

+ 79 - 60
rpc/pb/entManageApplication.pb.go

@@ -231,7 +231,8 @@ type UsePersonListReq struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	WaitEmpowerId int64 `protobuf:"varint,1,opt,name=wait_empower_id,json=waitEmpowerId,proto3" json:"wait_empower_id,omitempty"`
+	EntId         int64 `protobuf:"varint,1,opt,name=entId,proto3" json:"entId,omitempty"`
+	WaitEmpowerId int64 `protobuf:"varint,2,opt,name=wait_empower_id,json=waitEmpowerId,proto3" json:"wait_empower_id,omitempty"`
 }
 
 func (x *UsePersonListReq) Reset() {
@@ -266,6 +267,13 @@ func (*UsePersonListReq) Descriptor() ([]byte, []int) {
 	return file_entManageApplication_proto_rawDescGZIP(), []int{3}
 }
 
+func (x *UsePersonListReq) GetEntId() int64 {
+	if x != nil {
+		return x.EntId
+	}
+	return 0
+}
+
 func (x *UsePersonListReq) GetWaitEmpowerId() int64 {
 	if x != nil {
 		return x.WaitEmpowerId
@@ -347,6 +355,7 @@ type UsePersonList struct {
 	Phone           string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"`
 	Department      string `protobuf:"bytes,5,opt,name=department,proto3" json:"department,omitempty"`
 	Role            string `protobuf:"bytes,6,opt,name=role,proto3" json:"role,omitempty"`
+	Status          int64  `protobuf:"varint,7,opt,name=status,proto3" json:"status,omitempty"`
 }
 
 func (x *UsePersonList) Reset() {
@@ -423,6 +432,13 @@ func (x *UsePersonList) GetRole() string {
 	return ""
 }
 
+func (x *UsePersonList) GetStatus() int64 {
+	if x != nil {
+		return x.Status
+	}
+	return 0
+}
+
 type AddUsePersonReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -672,66 +688,69 @@ var file_entManageApplication_proto_rawDesc = []byte{
 	0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65,
 	0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d,
 	0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65,
-	0x22, 0x3a, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73,
-	0x74, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x65, 0x6d, 0x70,
+	0x22, 0x50, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73,
+	0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x77, 0x61,
+	0x69, 0x74, 0x5f, 0x65, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x0d, 0x77, 0x61, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72,
+	0x49, 0x64, 0x22, 0x73, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c,
+	0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72,
+	0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72,
+	0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
+	0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72,
+	0x4d, 0x73, 0x67, 0x12, 0x22, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28,
+	0x0b, 0x32, 0x0e, 0x2e, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73,
+	0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xc7, 0x01, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x50,
+	0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x6e, 0x74,
+	0x6e, 0x69, 0x63, 0x68, 0x65, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x65, 0x6e, 0x74, 0x6e, 0x69, 0x63, 0x68, 0x65, 0x50, 0x6f,
+	0x77, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61,
+	0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12,
+	0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+	0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d,
+	0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x61, 0x72,
+	0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x06, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61,
+	0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
+	0x73, 0x22, 0x6f, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f,
+	0x6e, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x65, 0x6d, 0x70,
 	0x6f, 0x77, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x77,
-	0x61, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x49, 0x64, 0x22, 0x73, 0x0a, 0x11,
-	0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
-	0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18,
-	0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65,
-	0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x22, 0x0a,
-	0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x55, 0x73,
-	0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74,
-	0x61, 0x22, 0xaf, 0x01, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c,
-	0x69, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x6e, 0x74, 0x6e, 0x69, 0x63, 0x68, 0x65, 0x5f,
-	0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f,
-	0x65, 0x6e, 0x74, 0x6e, 0x69, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x49, 0x64, 0x12,
-	0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
-	0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f,
-	0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12,
-	0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12,
-	0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72,
-	0x6f, 0x6c, 0x65, 0x22, 0x6f, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72,
-	0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x65,
-	0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x0d, 0x77, 0x61, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e,
-	0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14,
-	0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65,
-	0x6e, 0x74, 0x49, 0x64, 0x22, 0x71, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x50, 0x65,
-	0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f,
-	0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72,
-	0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72,
-	0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f,
-	0x72, 0x4d, 0x73, 0x67, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f,
-	0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x26, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x55, 0x73,
-	0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
-	0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22,
-	0x3d, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52,
-	0x65, 0x71, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x6e, 0x74, 0x6e, 0x69, 0x63, 0x68, 0x65, 0x5f, 0x70,
-	0x6f, 0x77, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x65,
-	0x6e, 0x74, 0x6e, 0x69, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x49, 0x64, 0x32, 0xf3,
-	0x01, 0x0a, 0x14, 0x45, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x41, 0x70, 0x70, 0x6c,
-	0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0e, 0x62, 0x75, 0x79, 0x50, 0x72,
-	0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x2e, 0x42, 0x75, 0x79, 0x50,
-	0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e,
-	0x42, 0x75, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
-	0x73, 0x70, 0x12, 0x36, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c,
-	0x69, 0x73, 0x74, 0x12, 0x11, 0x2e, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c,
-	0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73,
-	0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, 0x0c, 0x61, 0x64,
-	0x64, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x10, 0x2e, 0x41, 0x64, 0x64,
-	0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x41,
-	0x64, 0x64, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12,
-	0x33, 0x0a, 0x0c, 0x64, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12,
-	0x10, 0x2e, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65,
-	0x71, 0x1a, 0x11, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e,
-	0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
-	0x6f, 0x74, 0x6f, 0x33,
+	0x61, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b,
+	0x65, 0x6e, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05,
+	0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74,
+	0x49, 0x64, 0x22, 0x71, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73,
+	0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
+	0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f,
+	0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d,
+	0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d,
+	0x73, 0x67, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
+	0x32, 0x0d, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52,
+	0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x26, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x50,
+	0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3d, 0x0a,
+	0x0f, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71,
+	0x12, 0x2a, 0x0a, 0x11, 0x65, 0x6e, 0x74, 0x6e, 0x69, 0x63, 0x68, 0x65, 0x5f, 0x70, 0x6f, 0x77,
+	0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x65, 0x6e, 0x74,
+	0x6e, 0x69, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x49, 0x64, 0x32, 0xf3, 0x01, 0x0a,
+	0x14, 0x45, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63,
+	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0e, 0x62, 0x75, 0x79, 0x50, 0x72, 0x6f, 0x64,
+	0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x2e, 0x42, 0x75, 0x79, 0x50, 0x72, 0x6f,
+	0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x42, 0x75,
+	0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
+	0x12, 0x36, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73,
+	0x74, 0x12, 0x11, 0x2e, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73,
+	0x74, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e,
+	0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x55,
+	0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x10, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73,
+	0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x41, 0x64, 0x64,
+	0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a,
+	0x0c, 0x64, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x10, 0x2e,
+	0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a,
+	0x11, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65,
+	0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x33,
 }
 
 var (

+ 26 - 11
service/service.go

@@ -85,26 +85,41 @@ func DelUsePerson(this *entmanageapplication.DelUsePersonReq) *entmanageapplicat
 }
 
 func UsePersonList(this *entmanageapplication.UsePersonListReq) *entmanageapplication.UsePersonListResp {
-	data := JyMysql.SelectBySql(`select a.id,c.name,c.phone,c.mail,g.name as department,e.name as role from entniche_power a 
+	data := JyMysql.SelectBySql(`select a.id,a.wait_empower_id,c.name,c.phone,c.mail,g.name as department,e.name as role from entniche_power a 
 		INNER JOIN entniche_user c on (a.ent_user_id=c.id and a.ent_id = c.ent_id) 
 		LEFT JOIN entniche_user_role d on (c.id=d.user_id) 
 		LEFT JOIN entniche_role e on (d.role_id=e.id) 
 		LEFT JOIN entniche_department_user f on (a.ent_user_id=f.user_id) 
 		LEFT JOIN entniche_department g on (g.id=f.dept_id) 
-		where a.wait_empower_id = ? and a.status = 1
-		order by convert(c.name using gbk) COLLATE gbk_chinese_ci asc`, this.WaitEmpowerId)
+		where a.status = 1 and a.ent_id = ?
+		order by convert(c.name using gbk) COLLATE gbk_chinese_ci asc`, this.EntId)
 	arr := []*entmanageapplication.UsePersonList{}
 	if data != nil && len(*data) > 0 {
 		for _, v := range *data {
-			obj := &entmanageapplication.UsePersonList{
-				EntnichePowerId: common.Int64All(v["id"]),
-				Name:            common.ObjToString(v["name"]),
-				Phone:           common.ObjToString(v["phone"]),
-				Email:           common.ObjToString(v["mail"]),
-				Department:      common.ObjToString(v["department"]),
-				Role:            common.ObjToString(v["role"]),
+			wait_empower_id := common.Int64All(v["wait_empower_id"])
+			if wait_empower_id == this.WaitEmpowerId {
+				obj := &entmanageapplication.UsePersonList{
+					EntnichePowerId: common.Int64All(v["id"]),
+					Name:            common.ObjToString(v["name"]),
+					Phone:           common.ObjToString(v["phone"]),
+					Email:           common.ObjToString(v["mail"]),
+					Department:      common.ObjToString(v["department"]),
+					Role:            common.ObjToString(v["role"]),
+					Status:          1,
+				}
+				arr = append(arr, obj)
+			} else {
+				obj := &entmanageapplication.UsePersonList{
+					EntnichePowerId: common.Int64All(v["id"]),
+					Name:            common.ObjToString(v["name"]),
+					Phone:           common.ObjToString(v["phone"]),
+					Email:           common.ObjToString(v["mail"]),
+					Department:      common.ObjToString(v["department"]),
+					Role:            common.ObjToString(v["role"]),
+					Status:          2,
+				}
+				arr = append(arr, obj)
 			}
-			arr = append(arr, obj)
 		}
 	}
 	return &entmanageapplication.UsePersonListResp{