Browse Source

客服工作台-客服话术分类列表

renjiaojiao 2 years ago
parent
commit
b2d1ee88b8

+ 5 - 0
api/knowledge/internal/handler/routes.go

@@ -66,6 +66,11 @@ func RegisterHandlers(engine *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/knowledge/commonPhrase/commonPhrasesList",
 				Handler: commonPhrasesListHandler(serverCtx),
 			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/knowledge/commonPhrase/commonPhrasesClassList",
+				Handler: commonPhrasesClassListHandler(serverCtx),
+			},
 		},
 	)
 }

+ 44 - 0
api/knowledge/internal/logic/commonphrasesaddorupdatelogic.go

@@ -0,0 +1,44 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/knowledgeclient"
+	"context"
+	"github.com/zeromicro/go-zero/core/logx"
+
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/api/knowledge/internal/svc"
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/api/knowledge/internal/types"
+)
+
+type CommonPhrasesAddOrUpdateLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewCommonPhrasesAddOrUpdateLogic(ctx context.Context, svcCtx *svc.ServiceContext) CommonPhrasesAddOrUpdateLogic {
+	return CommonPhrasesAddOrUpdateLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *CommonPhrasesAddOrUpdateLogic) CommonPhrasesAddOrUpdate(req types.CommonPhrasesAddReq) (*types.CommonRes, error) {
+	// todo: add your logic here and delete this line
+	resp, err := l.svcCtx.Knowledge.CommonPhrasesAdd(l.ctx, &knowledgeclient.CommonPhrasesAddReq{
+		Id:        req.Id,
+		Classify:  req.Classify,
+		Content:   req.Content,
+		AppId:     req.AppId,
+		EntId:     req.EntId,
+		EntUserId: req.EntUserId,
+	})
+	if err != nil {
+		return nil, err
+	}
+	return &types.CommonRes{
+		Error_code: int(resp.ErrorCode),
+		Error_msg:  resp.ErrorMsg,
+		Data:       resp.Data,
+	}, nil
+}

+ 41 - 0
api/knowledge/internal/logic/commonphrasesclasslistlogic.go

@@ -0,0 +1,41 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/knowledgeclient"
+	"context"
+	"github.com/zeromicro/go-zero/core/logx"
+
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/api/knowledge/internal/svc"
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/api/knowledge/internal/types"
+)
+
+type CommonPhrasesClassListLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewCommonPhrasesClassListLogic(ctx context.Context, svcCtx *svc.ServiceContext) CommonPhrasesClassListLogic {
+	return CommonPhrasesClassListLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *CommonPhrasesClassListLogic) CommonPhrasesClassList(req types.CommonPhrasesClassListReq) (*types.CommonRes, error) {
+	// todo: add your logic here and delete this line
+	resp, err := l.svcCtx.Knowledge.CommonPhraseClassList(l.ctx, &knowledgeclient.CommonPhrasesClassListReq{
+		EntId: req.EntId,
+		AppId: req.AppId,
+		Query: req.Query,
+	})
+	if err != nil {
+		return nil, err
+	}
+	return &types.CommonRes{
+		Error_code: int(resp.ErrorCode),
+		Error_msg:  resp.ErrorMsg,
+		Data:       resp.Data,
+	}, nil
+}

+ 38 - 0
api/knowledge/internal/logic/commonphrasesdellogic.go

@@ -0,0 +1,38 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/knowledgeclient"
+	"context"
+	"github.com/zeromicro/go-zero/core/logx"
+
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/api/knowledge/internal/svc"
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/api/knowledge/internal/types"
+)
+
+type CommonPhrasesDelLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewCommonPhrasesDelLogic(ctx context.Context, svcCtx *svc.ServiceContext) CommonPhrasesDelLogic {
+	return CommonPhrasesDelLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *CommonPhrasesDelLogic) CommonPhrasesDel(req types.CommonPhrasesInfoOrDelReq) (*types.CommonRes, error) {
+	resp, err := l.svcCtx.Knowledge.CommonPhrasesDel(l.ctx, &knowledgeclient.CommonPhrasesInfoReq{
+		Id: req.Id,
+	})
+	if err != nil {
+		return nil, err
+	}
+	return &types.CommonRes{
+		Error_code: int(resp.ErrorCode),
+		Error_msg:  resp.ErrorMsg,
+		Data:       resp.Data,
+	}, nil
+}

+ 38 - 0
api/knowledge/internal/logic/commonphrasesinfologic.go

@@ -0,0 +1,38 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/knowledgeclient"
+	"context"
+	"github.com/zeromicro/go-zero/core/logx"
+
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/api/knowledge/internal/svc"
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/api/knowledge/internal/types"
+)
+
+type CommonPhrasesInfoLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewCommonPhrasesInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) CommonPhrasesInfoLogic {
+	return CommonPhrasesInfoLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *CommonPhrasesInfoLogic) CommonPhrasesInfo(req types.CommonPhrasesInfoOrDelReq) (*types.CommonRes, error) {
+	resp, err := l.svcCtx.Knowledge.CommonPhrasesInfo(l.ctx, &knowledgeclient.CommonPhrasesInfoReq{
+		Id: req.Id,
+	})
+	if err != nil {
+		return nil, err
+	}
+	return &types.CommonRes{
+		Error_code: int(resp.ErrorCode),
+		Error_msg:  resp.ErrorMsg,
+		Data:       resp.Data,
+	}, nil
+}

+ 41 - 0
api/knowledge/internal/logic/commonphraseslistlogic.go

@@ -0,0 +1,41 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/knowledgeclient"
+	"context"
+	"github.com/zeromicro/go-zero/core/logx"
+
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/api/knowledge/internal/svc"
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/api/knowledge/internal/types"
+)
+
+type CommonPhrasesListLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewCommonPhrasesListLogic(ctx context.Context, svcCtx *svc.ServiceContext) CommonPhrasesListLogic {
+	return CommonPhrasesListLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *CommonPhrasesListLogic) CommonPhrasesList(req types.CommonPhrasesListReq) (*types.CommonRes, error) {
+	resp, err := l.svcCtx.Knowledge.CommonPhrasesList(l.ctx, &knowledgeclient.CommonPhrasesListReq{
+		EntId:     req.EntId,
+		PageIndex: req.PageIndex,
+		PageSize:  req.PageSize,
+		AppId:     req.AppId,
+	})
+	if err != nil {
+		return nil, err
+	}
+	return &types.CommonRes{
+		Error_code: int(resp.ErrorCode),
+		Error_msg:  resp.ErrorMsg,
+		Data:       resp.Data,
+	}, nil
+}

+ 6 - 0
api/knowledge/internal/types/types.go

@@ -70,3 +70,9 @@ type CommonPhrasesListReq struct {
 	EntId     int64  `header:"entId"`
 	AppId     string `header:"appId"`
 }
+
+type CommonPhrasesClassListReq struct {
+	Query string `json:"query"`
+	EntId int64  `header:"entId"` //企业id
+	AppId string `header:"appId"`
+}

+ 7 - 0
api/knowledge/knowledge.api

@@ -62,6 +62,11 @@ type CommonPhrasesListReq {
 	EntId     int64  `header:"entId"`
 	AppId     string `header:"appId"`
 }
+type CommonPhrasesClassListReq {
+	Query string `json:"query"`
+	EntId int64  `header:"entId"` //企业id
+	AppId string `header:"appId"`
+}
 
 service knowledge-api {
 	@handler knowledgeAdd
@@ -86,4 +91,6 @@ service knowledge-api {
 	post /knowledge/commonPhrase/commonPhrasesDel (CommonPhrasesInfoOrDelReq) returns (CommonRes);
 	@handler commonPhrasesList
 	post /knowledge/commonPhrase/commonPhrasesList (CommonPhrasesListReq) returns (CommonRes);
+	@handler commonPhrasesClassList
+	post /knowledge/commonPhrase/commonPhrasesClassList (CommonPhrasesClassListReq) returns (CommonRes);
 }

+ 35 - 0
rpc/knowledge/internal/logic/commonphraseclasslistlogic.go

@@ -0,0 +1,35 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/internal/service"
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/knowledgeclient"
+	"context"
+	"github.com/zeromicro/go-zero/core/logx"
+
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/internal/svc"
+)
+
+type CommonPhraseClassListLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewCommonPhraseClassListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CommonPhraseClassListLogic {
+	return &CommonPhraseClassListLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// CommonPhraseClassList 客服话术分类查询
+func (l *CommonPhraseClassListLogic) CommonPhraseClassList(in *knowledgeclient.CommonPhrasesClassListReq) (*knowledgeclient.CommonPhrasesClassListResp, error) {
+	// todo: add your logic here and delete this line
+	result := &knowledgeclient.CommonPhrasesClassListResp{}
+	c := service.CommonPhrasesService{}
+	commonPhrasesClassList := c.CommonPhrasesClassList(in)
+	result.ErrorCode = 0
+	result.Data = commonPhrasesClassList
+	return result, nil
+}

+ 6 - 0
rpc/knowledge/internal/server/knowledgeserver.go

@@ -86,3 +86,9 @@ func (s *KnowledgeServer) CommonPhrasesDel(ctx context.Context, in *knowledgecli
 	l := logic.NewCommonPhrasesDelLogic(ctx, s.svcCtx)
 	return l.CommonPhrasesDel(in)
 }
+
+// 客服话术分类查询
+func (s *KnowledgeServer) CommonPhraseClassList(ctx context.Context, in *knowledgeclient.CommonPhrasesClassListReq) (*knowledgeclient.CommonPhrasesClassListResp, error) {
+	l := logic.NewCommonPhraseClassListLogic(ctx, s.svcCtx)
+	return l.CommonPhraseClassList(in)
+}

+ 37 - 0
rpc/knowledge/internal/service/commonPhrasesService.go

@@ -140,3 +140,40 @@ func (c *CommonPhrasesService) CommonPhrasesList(param *knowledgeclient.CommonPh
 	}
 	return &commonPhrasesList
 }
+
+// CommonPhrasesClassList 客服话术分类
+func (c *CommonPhrasesService) CommonPhrasesClassList(param *knowledgeclient.CommonPhrasesClassListReq) []*knowledgeclient.CommonPhrasesClassListData {
+	var classListArr []*knowledgeclient.CommonPhrasesClassListData
+	//先查询数据在分类、排序
+	query := map[string]interface{}{
+		"entId": param.EntId,
+		"appId": param.AppId,
+	}
+	if param.Query != "" {
+		query["content"] = param.Query
+	}
+	data := Mysql.Find(util.COMMONPHRASES, query, "classify,content", "id desc", -1, -1)
+	if data != nil && len(*data) > 0 {
+		m := map[string][]string{}
+		for _, val := range *data {
+			classify := cm.ObjToString(val["classify"])
+			m[classify] = append(m[classify], cm.ObjToString(val["content"]))
+		}
+		if m != nil && len(m) > 0 {
+
+			for k, v := range m {
+				classList := &knowledgeclient.CommonPhrasesClassListData{}
+				classList.Classify = k
+				for _, i := range v {
+					classList.ClassList = append(classList.ClassList, &knowledgeclient.Content{
+						Content: i,
+					})
+				}
+				classListArr = append(classListArr, classList)
+			}
+			//sort.Sort(classListArr)
+		}
+	}
+
+	return classListArr
+}

+ 19 - 0
rpc/knowledge/knowledge.proto

@@ -119,6 +119,23 @@ message CommonPhrasesListResp{
   string error_msg = 2; //响应消息
   CommonPhrasesList data = 3; //响应内容
 }
+message CommonPhrasesClassListReq{
+  string query = 1;
+  int64 entId = 2;//企业id
+  string appId = 3;
+}
+message Content {
+  string content = 1;
+}
+message CommonPhrasesClassListData{
+  string classify = 1;
+  repeated  Content classList = 2;
+}
+message CommonPhrasesClassListResp{
+  int64 error_code = 1; //响应代码
+  string error_msg = 2; //响应消息
+  repeated CommonPhrasesClassListData Data = 3;
+}
 
 service knowledge {
   //知识新增
@@ -143,4 +160,6 @@ service knowledge {
   rpc CommonPhrasesList(CommonPhrasesListReq) returns(CommonPhrasesListResp);
   //客服话术删除
   rpc CommonPhrasesDel(CommonPhrasesInfoReq) returns(AddResponse);
+  //客服话术分类查询
+  rpc CommonPhraseClassList(CommonPhrasesClassListReq) returns(CommonPhrasesClassListResp);
 }

+ 452 - 99
rpc/knowledge/knowledge/knowledge.pb.go

@@ -1340,6 +1340,234 @@ func (x *CommonPhrasesListResp) GetData() *CommonPhrasesList {
 	return nil
 }
 
+type CommonPhrasesClassListReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
+	EntId int64  `protobuf:"varint,2,opt,name=entId,proto3" json:"entId,omitempty"` //企业id
+	AppId string `protobuf:"bytes,3,opt,name=appId,proto3" json:"appId,omitempty"`
+}
+
+func (x *CommonPhrasesClassListReq) Reset() {
+	*x = CommonPhrasesClassListReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_knowledge_proto_msgTypes[20]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CommonPhrasesClassListReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CommonPhrasesClassListReq) ProtoMessage() {}
+
+func (x *CommonPhrasesClassListReq) ProtoReflect() protoreflect.Message {
+	mi := &file_knowledge_proto_msgTypes[20]
+	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 CommonPhrasesClassListReq.ProtoReflect.Descriptor instead.
+func (*CommonPhrasesClassListReq) Descriptor() ([]byte, []int) {
+	return file_knowledge_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *CommonPhrasesClassListReq) GetQuery() string {
+	if x != nil {
+		return x.Query
+	}
+	return ""
+}
+
+func (x *CommonPhrasesClassListReq) GetEntId() int64 {
+	if x != nil {
+		return x.EntId
+	}
+	return 0
+}
+
+func (x *CommonPhrasesClassListReq) GetAppId() string {
+	if x != nil {
+		return x.AppId
+	}
+	return ""
+}
+
+type Content struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
+}
+
+func (x *Content) Reset() {
+	*x = Content{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_knowledge_proto_msgTypes[21]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Content) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Content) ProtoMessage() {}
+
+func (x *Content) ProtoReflect() protoreflect.Message {
+	mi := &file_knowledge_proto_msgTypes[21]
+	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 Content.ProtoReflect.Descriptor instead.
+func (*Content) Descriptor() ([]byte, []int) {
+	return file_knowledge_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *Content) GetContent() string {
+	if x != nil {
+		return x.Content
+	}
+	return ""
+}
+
+type CommonPhrasesClassListData struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Classify  string     `protobuf:"bytes,1,opt,name=classify,proto3" json:"classify,omitempty"`
+	ClassList []*Content `protobuf:"bytes,2,rep,name=classList,proto3" json:"classList,omitempty"`
+}
+
+func (x *CommonPhrasesClassListData) Reset() {
+	*x = CommonPhrasesClassListData{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_knowledge_proto_msgTypes[22]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CommonPhrasesClassListData) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CommonPhrasesClassListData) ProtoMessage() {}
+
+func (x *CommonPhrasesClassListData) ProtoReflect() protoreflect.Message {
+	mi := &file_knowledge_proto_msgTypes[22]
+	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 CommonPhrasesClassListData.ProtoReflect.Descriptor instead.
+func (*CommonPhrasesClassListData) Descriptor() ([]byte, []int) {
+	return file_knowledge_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *CommonPhrasesClassListData) GetClassify() string {
+	if x != nil {
+		return x.Classify
+	}
+	return ""
+}
+
+func (x *CommonPhrasesClassListData) GetClassList() []*Content {
+	if x != nil {
+		return x.ClassList
+	}
+	return nil
+}
+
+type CommonPhrasesClassListResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ErrorCode int64                         `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` //响应代码
+	ErrorMsg  string                        `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`     //响应消息
+	Data      []*CommonPhrasesClassListData `protobuf:"bytes,3,rep,name=Data,proto3" json:"Data,omitempty"`
+}
+
+func (x *CommonPhrasesClassListResp) Reset() {
+	*x = CommonPhrasesClassListResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_knowledge_proto_msgTypes[23]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CommonPhrasesClassListResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CommonPhrasesClassListResp) ProtoMessage() {}
+
+func (x *CommonPhrasesClassListResp) ProtoReflect() protoreflect.Message {
+	mi := &file_knowledge_proto_msgTypes[23]
+	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 CommonPhrasesClassListResp.ProtoReflect.Descriptor instead.
+func (*CommonPhrasesClassListResp) Descriptor() ([]byte, []int) {
+	return file_knowledge_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *CommonPhrasesClassListResp) GetErrorCode() int64 {
+	if x != nil {
+		return x.ErrorCode
+	}
+	return 0
+}
+
+func (x *CommonPhrasesClassListResp) GetErrorMsg() string {
+	if x != nil {
+		return x.ErrorMsg
+	}
+	return ""
+}
+
+func (x *CommonPhrasesClassListResp) GetData() []*CommonPhrasesClassListData {
+	if x != nil {
+		return x.Data
+	}
+	return nil
+}
+
 var File_knowledge_proto protoreflect.FileDescriptor
 
 var file_knowledge_proto_rawDesc = []byte{
@@ -1487,58 +1715,89 @@ var file_knowledge_proto_rawDesc = []byte{
 	0x4d, 0x73, 0x67, 0x12, 0x2f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28,
 	0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6d,
 	0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x04,
-	0x64, 0x61, 0x74, 0x61, 0x32, 0x9f, 0x06, 0x0a, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64,
-	0x67, 0x65, 0x12, 0x3b, 0x0a, 0x0c, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x41,
-	0x64, 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x64,
-	0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c,
-	0x61, 0x74, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
-	0x3e, 0x0a, 0x0d, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74,
-	0x12, 0x15, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74,
-	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61,
-	0x74, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
-	0x42, 0x0a, 0x0d, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x45, 0x64, 0x69, 0x74,
-	0x12, 0x1a, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77,
-	0x6c, 0x65, 0x64, 0x67, 0x65, 0x45, 0x64, 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x74,
+	0x64, 0x61, 0x74, 0x61, 0x22, 0x5d, 0x0a, 0x19, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68,
+	0x72, 0x61, 0x73, 0x65, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
+	0x71, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a,
+	0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70,
+	0x70, 0x49, 0x64, 0x22, 0x23, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x18,
+	0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x69, 0x0a, 0x1a, 0x43, 0x6f, 0x6d, 0x6d,
+	0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4c, 0x69,
+	0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69,
+	0x66, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69,
+	0x66, 0x79, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x18,
+	0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
+	0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4c,
+	0x69, 0x73, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x1a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68,
+	0x72, 0x61, 0x73, 0x65, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 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, 0x38,
+	0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x74,
+	0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68,
+	0x72, 0x61, 0x73, 0x65, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61,
+	0x74, 0x61, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x32, 0x83, 0x07, 0x0a, 0x09, 0x6b, 0x6e, 0x6f,
+	0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x12, 0x3b, 0x0a, 0x0c, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65,
+	0x64, 0x67, 0x65, 0x41, 0x64, 0x64, 0x12, 0x14, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
+	0x65, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x74,
 	0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f,
+	0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65,
+	0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e,
+	0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x74, 0x65,
+	0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
 	0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65,
-	0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e,
-	0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x1a,
-	0x16, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52,
-	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4b, 0x6e, 0x6f, 0x77, 0x6c,
-	0x65, 0x64, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x12, 0x19, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61,
-	0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x52,
-	0x65, 0x71, 0x1a, 0x15, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x64,
-	0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x46, 0x69, 0x6e,
-	0x64, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61,
-	0x74, 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71,
-	0x1a, 0x18, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64,
-	0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x0f, 0x52, 0x65,
-	0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x17, 0x2e,
-	0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x73,
-	0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
-	0x65, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65,
-	0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x48, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50,
-	0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x41, 0x64, 0x64, 0x12, 0x1d, 0x2e, 0x74, 0x65, 0x6d, 0x70,
-	0x6c, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73,
-	0x65, 0x73, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c,
-	0x61, 0x74, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
-	0x54, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73,
-	0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e,
-	0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x49, 0x6e, 0x66,
-	0x6f, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e,
-	0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x49, 0x6e, 0x66,
-	0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x54, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50,
-	0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x74, 0x65, 0x6d,
-	0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61,
-	0x73, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x74, 0x65, 0x6d,
-	0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61,
-	0x73, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x10, 0x43,
-	0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x12,
-	0x1e, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
-	0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a,
-	0x15, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65,
-	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x6b, 0x6e, 0x6f, 0x77,
-	0x6c, 0x65, 0x64, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x45, 0x64, 0x69, 0x74, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e,
+	0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x45, 0x64, 0x69, 0x74, 0x52, 0x65, 0x71,
+	0x1a, 0x15, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x52,
+	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x4b, 0x6e, 0x6f, 0x77, 0x6c,
+	0x65, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c,
+	0x61, 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x45, 0x6e, 0x74,
+	0x69, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x49,
+	0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4b,
+	0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x12, 0x19, 0x2e, 0x74, 0x65,
+	0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65,
+	0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
+	0x65, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a,
+	0x0a, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x74, 0x65,
+	0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65,
+	0x72, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e,
+	0x46, 0x69, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x49,
+	0x0a, 0x0f, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x41, 0x6e, 0x73, 0x77, 0x65,
+	0x72, 0x12, 0x17, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x6e,
+	0x64, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x6d,
+	0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x41,
+	0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x48, 0x0a, 0x10, 0x43, 0x6f, 0x6d,
+	0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x41, 0x64, 0x64, 0x12, 0x1d, 0x2e,
+	0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50,
+	0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x74,
+	0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f,
+	0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72,
+	0x61, 0x73, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c,
+	0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65,
+	0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c,
+	0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65,
+	0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x54, 0x0a, 0x11, 0x43, 0x6f, 0x6d,
+	0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e,
+	0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+	0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f,
+	0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+	0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x49, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73,
+	0x44, 0x65, 0x6c, 0x12, 0x1e, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x43,
+	0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f,
+	0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x41,
+	0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x15, 0x43, 0x6f,
+	0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4c,
+	0x69, 0x73, 0x74, 0x12, 0x23, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x43,
+	0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x43, 0x6c, 0x61, 0x73,
+	0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c,
+	0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65,
+	0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0d,
+	0x5a, 0x0b, 0x2e, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x62, 0x06, 0x70,
+	0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -1553,28 +1812,32 @@ func file_knowledge_proto_rawDescGZIP() []byte {
 	return file_knowledge_proto_rawDescData
 }
 
-var file_knowledge_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
+var file_knowledge_proto_msgTypes = make([]protoimpl.MessageInfo, 24)
 var file_knowledge_proto_goTypes = []interface{}{
-	(*Question)(nil),              // 0: template.Question
-	(*AddRequest)(nil),            // 1: template.AddRequest
-	(*AddResponse)(nil),           // 2: template.AddResponse
-	(*FindAnswerReq)(nil),         // 3: template.FindAnswerReq
-	(*FindAnswerResp)(nil),        // 4: template.FindAnswerResp
-	(*RecommendAnswerResp)(nil),   // 5: template.RecommendAnswerResp
-	(*ListData)(nil),              // 6: template.ListData
-	(*ListRequest)(nil),           // 7: template.ListRequest
-	(*ListResponse)(nil),          // 8: template.ListResponse
-	(*KnowledgeEntity)(nil),       // 9: template.KnowledgeEntity
-	(*KnowledgeEditReq)(nil),      // 10: template.KnowledgeEditReq
-	(*InfoResponse)(nil),          // 11: template.InfoResponse
-	(*KnowledgeDelReq)(nil),       // 12: template.KnowledgeDelReq
-	(*CommonPhrasesAddReq)(nil),   // 13: template.CommonPhrasesAddReq
-	(*CommonPhrasesInfoReq)(nil),  // 14: template.CommonPhrasesInfoReq
-	(*CommonPhrasesListReq)(nil),  // 15: template.CommonPhrasesListReq
-	(*CommonPhrases)(nil),         // 16: template.CommonPhrases
-	(*CommonPhrasesInfoResp)(nil), // 17: template.CommonPhrasesInfoResp
-	(*CommonPhrasesList)(nil),     // 18: template.CommonPhrasesList
-	(*CommonPhrasesListResp)(nil), // 19: template.CommonPhrasesListResp
+	(*Question)(nil),                   // 0: template.Question
+	(*AddRequest)(nil),                 // 1: template.AddRequest
+	(*AddResponse)(nil),                // 2: template.AddResponse
+	(*FindAnswerReq)(nil),              // 3: template.FindAnswerReq
+	(*FindAnswerResp)(nil),             // 4: template.FindAnswerResp
+	(*RecommendAnswerResp)(nil),        // 5: template.RecommendAnswerResp
+	(*ListData)(nil),                   // 6: template.ListData
+	(*ListRequest)(nil),                // 7: template.ListRequest
+	(*ListResponse)(nil),               // 8: template.ListResponse
+	(*KnowledgeEntity)(nil),            // 9: template.KnowledgeEntity
+	(*KnowledgeEditReq)(nil),           // 10: template.KnowledgeEditReq
+	(*InfoResponse)(nil),               // 11: template.InfoResponse
+	(*KnowledgeDelReq)(nil),            // 12: template.KnowledgeDelReq
+	(*CommonPhrasesAddReq)(nil),        // 13: template.CommonPhrasesAddReq
+	(*CommonPhrasesInfoReq)(nil),       // 14: template.CommonPhrasesInfoReq
+	(*CommonPhrasesListReq)(nil),       // 15: template.CommonPhrasesListReq
+	(*CommonPhrases)(nil),              // 16: template.CommonPhrases
+	(*CommonPhrasesInfoResp)(nil),      // 17: template.CommonPhrasesInfoResp
+	(*CommonPhrasesList)(nil),          // 18: template.CommonPhrasesList
+	(*CommonPhrasesListResp)(nil),      // 19: template.CommonPhrasesListResp
+	(*CommonPhrasesClassListReq)(nil),  // 20: template.CommonPhrasesClassListReq
+	(*Content)(nil),                    // 21: template.Content
+	(*CommonPhrasesClassListData)(nil), // 22: template.CommonPhrasesClassListData
+	(*CommonPhrasesClassListResp)(nil), // 23: template.CommonPhrasesClassListResp
 }
 var file_knowledge_proto_depIdxs = []int32{
 	0,  // 0: template.FindAnswerResp.data:type_name -> template.Question
@@ -1585,33 +1848,37 @@ var file_knowledge_proto_depIdxs = []int32{
 	16, // 5: template.CommonPhrasesInfoResp.data:type_name -> template.CommonPhrases
 	16, // 6: template.CommonPhrasesList.Data:type_name -> template.CommonPhrases
 	18, // 7: template.CommonPhrasesListResp.data:type_name -> template.CommonPhrasesList
-	1,  // 8: template.knowledge.KnowledgeAdd:input_type -> template.AddRequest
-	7,  // 9: template.knowledge.KnowledgeList:input_type -> template.ListRequest
-	10, // 10: template.knowledge.KnowledgeEdit:input_type -> template.KnowledgeEditReq
-	9,  // 11: template.knowledge.KnowledgeInfo:input_type -> template.KnowledgeEntity
-	12, // 12: template.knowledge.KnowledgeDel:input_type -> template.KnowledgeDelReq
-	3,  // 13: template.knowledge.FindAnswer:input_type -> template.FindAnswerReq
-	3,  // 14: template.knowledge.RecommendAnswer:input_type -> template.FindAnswerReq
-	13, // 15: template.knowledge.CommonPhrasesAdd:input_type -> template.CommonPhrasesAddReq
-	14, // 16: template.knowledge.CommonPhrasesInfo:input_type -> template.CommonPhrasesInfoReq
-	15, // 17: template.knowledge.CommonPhrasesList:input_type -> template.CommonPhrasesListReq
-	14, // 18: template.knowledge.CommonPhrasesDel:input_type -> template.CommonPhrasesInfoReq
-	2,  // 19: template.knowledge.KnowledgeAdd:output_type -> template.AddResponse
-	8,  // 20: template.knowledge.KnowledgeList:output_type -> template.ListResponse
-	2,  // 21: template.knowledge.KnowledgeEdit:output_type -> template.AddResponse
-	11, // 22: template.knowledge.KnowledgeInfo:output_type -> template.InfoResponse
-	2,  // 23: template.knowledge.KnowledgeDel:output_type -> template.AddResponse
-	4,  // 24: template.knowledge.FindAnswer:output_type -> template.FindAnswerResp
-	5,  // 25: template.knowledge.RecommendAnswer:output_type -> template.RecommendAnswerResp
-	2,  // 26: template.knowledge.CommonPhrasesAdd:output_type -> template.AddResponse
-	17, // 27: template.knowledge.CommonPhrasesInfo:output_type -> template.CommonPhrasesInfoResp
-	19, // 28: template.knowledge.CommonPhrasesList:output_type -> template.CommonPhrasesListResp
-	2,  // 29: template.knowledge.CommonPhrasesDel:output_type -> template.AddResponse
-	19, // [19:30] is the sub-list for method output_type
-	8,  // [8:19] is the sub-list for method input_type
-	8,  // [8:8] is the sub-list for extension type_name
-	8,  // [8:8] is the sub-list for extension extendee
-	0,  // [0:8] is the sub-list for field type_name
+	21, // 8: template.CommonPhrasesClassListData.classList:type_name -> template.Content
+	22, // 9: template.CommonPhrasesClassListResp.Data:type_name -> template.CommonPhrasesClassListData
+	1,  // 10: template.knowledge.KnowledgeAdd:input_type -> template.AddRequest
+	7,  // 11: template.knowledge.KnowledgeList:input_type -> template.ListRequest
+	10, // 12: template.knowledge.KnowledgeEdit:input_type -> template.KnowledgeEditReq
+	9,  // 13: template.knowledge.KnowledgeInfo:input_type -> template.KnowledgeEntity
+	12, // 14: template.knowledge.KnowledgeDel:input_type -> template.KnowledgeDelReq
+	3,  // 15: template.knowledge.FindAnswer:input_type -> template.FindAnswerReq
+	3,  // 16: template.knowledge.RecommendAnswer:input_type -> template.FindAnswerReq
+	13, // 17: template.knowledge.CommonPhrasesAdd:input_type -> template.CommonPhrasesAddReq
+	14, // 18: template.knowledge.CommonPhrasesInfo:input_type -> template.CommonPhrasesInfoReq
+	15, // 19: template.knowledge.CommonPhrasesList:input_type -> template.CommonPhrasesListReq
+	14, // 20: template.knowledge.CommonPhrasesDel:input_type -> template.CommonPhrasesInfoReq
+	20, // 21: template.knowledge.CommonPhraseClassList:input_type -> template.CommonPhrasesClassListReq
+	2,  // 22: template.knowledge.KnowledgeAdd:output_type -> template.AddResponse
+	8,  // 23: template.knowledge.KnowledgeList:output_type -> template.ListResponse
+	2,  // 24: template.knowledge.KnowledgeEdit:output_type -> template.AddResponse
+	11, // 25: template.knowledge.KnowledgeInfo:output_type -> template.InfoResponse
+	2,  // 26: template.knowledge.KnowledgeDel:output_type -> template.AddResponse
+	4,  // 27: template.knowledge.FindAnswer:output_type -> template.FindAnswerResp
+	5,  // 28: template.knowledge.RecommendAnswer:output_type -> template.RecommendAnswerResp
+	2,  // 29: template.knowledge.CommonPhrasesAdd:output_type -> template.AddResponse
+	17, // 30: template.knowledge.CommonPhrasesInfo:output_type -> template.CommonPhrasesInfoResp
+	19, // 31: template.knowledge.CommonPhrasesList:output_type -> template.CommonPhrasesListResp
+	2,  // 32: template.knowledge.CommonPhrasesDel:output_type -> template.AddResponse
+	23, // 33: template.knowledge.CommonPhraseClassList:output_type -> template.CommonPhrasesClassListResp
+	22, // [22:34] is the sub-list for method output_type
+	10, // [10:22] is the sub-list for method input_type
+	10, // [10:10] is the sub-list for extension type_name
+	10, // [10:10] is the sub-list for extension extendee
+	0,  // [0:10] is the sub-list for field type_name
 }
 
 func init() { file_knowledge_proto_init() }
@@ -1860,6 +2127,54 @@ func file_knowledge_proto_init() {
 				return nil
 			}
 		}
+		file_knowledge_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CommonPhrasesClassListReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_knowledge_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Content); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_knowledge_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CommonPhrasesClassListData); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_knowledge_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CommonPhrasesClassListResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
 	}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
@@ -1867,7 +2182,7 @@ func file_knowledge_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_knowledge_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   20,
+			NumMessages:   24,
 			NumExtensions: 0,
 			NumServices:   1,
 		},
@@ -1915,6 +2230,8 @@ type KnowledgeClient interface {
 	CommonPhrasesList(ctx context.Context, in *CommonPhrasesListReq, opts ...grpc.CallOption) (*CommonPhrasesListResp, error)
 	//客服话术删除
 	CommonPhrasesDel(ctx context.Context, in *CommonPhrasesInfoReq, opts ...grpc.CallOption) (*AddResponse, error)
+	//客服话术分类查询
+	CommonPhraseClassList(ctx context.Context, in *CommonPhrasesClassListReq, opts ...grpc.CallOption) (*CommonPhrasesClassListResp, error)
 }
 
 type knowledgeClient struct {
@@ -2024,6 +2341,15 @@ func (c *knowledgeClient) CommonPhrasesDel(ctx context.Context, in *CommonPhrase
 	return out, nil
 }
 
+func (c *knowledgeClient) CommonPhraseClassList(ctx context.Context, in *CommonPhrasesClassListReq, opts ...grpc.CallOption) (*CommonPhrasesClassListResp, error) {
+	out := new(CommonPhrasesClassListResp)
+	err := c.cc.Invoke(ctx, "/template.knowledge/CommonPhraseClassList", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // KnowledgeServer is the server API for Knowledge service.
 type KnowledgeServer interface {
 	//知识新增
@@ -2048,6 +2374,8 @@ type KnowledgeServer interface {
 	CommonPhrasesList(context.Context, *CommonPhrasesListReq) (*CommonPhrasesListResp, error)
 	//客服话术删除
 	CommonPhrasesDel(context.Context, *CommonPhrasesInfoReq) (*AddResponse, error)
+	//客服话术分类查询
+	CommonPhraseClassList(context.Context, *CommonPhrasesClassListReq) (*CommonPhrasesClassListResp, error)
 }
 
 // UnimplementedKnowledgeServer can be embedded to have forward compatible implementations.
@@ -2087,6 +2415,9 @@ func (*UnimplementedKnowledgeServer) CommonPhrasesList(context.Context, *CommonP
 func (*UnimplementedKnowledgeServer) CommonPhrasesDel(context.Context, *CommonPhrasesInfoReq) (*AddResponse, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method CommonPhrasesDel not implemented")
 }
+func (*UnimplementedKnowledgeServer) CommonPhraseClassList(context.Context, *CommonPhrasesClassListReq) (*CommonPhrasesClassListResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CommonPhraseClassList not implemented")
+}
 
 func RegisterKnowledgeServer(s *grpc.Server, srv KnowledgeServer) {
 	s.RegisterService(&_Knowledge_serviceDesc, srv)
@@ -2290,6 +2621,24 @@ func _Knowledge_CommonPhrasesDel_Handler(srv interface{}, ctx context.Context, d
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Knowledge_CommonPhraseClassList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(CommonPhrasesClassListReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(KnowledgeServer).CommonPhraseClassList(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/template.knowledge/CommonPhraseClassList",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(KnowledgeServer).CommonPhraseClassList(ctx, req.(*CommonPhrasesClassListReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 var _Knowledge_serviceDesc = grpc.ServiceDesc{
 	ServiceName: "template.knowledge",
 	HandlerType: (*KnowledgeServer)(nil),
@@ -2338,6 +2687,10 @@ var _Knowledge_serviceDesc = grpc.ServiceDesc{
 			MethodName: "CommonPhrasesDel",
 			Handler:    _Knowledge_CommonPhrasesDel_Handler,
 		},
+		{
+			MethodName: "CommonPhraseClassList",
+			Handler:    _Knowledge_CommonPhraseClassList_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "knowledge.proto",

+ 32 - 20
rpc/knowledge/knowledgeclient/knowledge.go

@@ -13,26 +13,30 @@ import (
 )
 
 type (
-	ListRequest           = knowledge.ListRequest
-	KnowledgeEntity       = knowledge.KnowledgeEntity
-	KnowledgeDelReq       = knowledge.KnowledgeDelReq
-	InfoResponse          = knowledge.InfoResponse
-	CommonPhrasesAddReq   = knowledge.CommonPhrasesAddReq
-	CommonPhrasesInfoReq  = knowledge.CommonPhrasesInfoReq
-	CommonPhrasesListReq  = knowledge.CommonPhrasesListReq
-	FindAnswerReq         = knowledge.FindAnswerReq
-	FindAnswerResp        = knowledge.FindAnswerResp
-	ListResponse          = knowledge.ListResponse
-	KnowledgeEditReq      = knowledge.KnowledgeEditReq
-	CommonPhrases         = knowledge.CommonPhrases
-	CommonPhrasesList     = knowledge.CommonPhrasesList
-	CommonPhrasesListResp = knowledge.CommonPhrasesListResp
-	ListData              = knowledge.ListData
-	CommonPhrasesInfoResp = knowledge.CommonPhrasesInfoResp
-	Question              = knowledge.Question
-	AddRequest            = knowledge.AddRequest
-	AddResponse           = knowledge.AddResponse
-	RecommendAnswerResp   = knowledge.RecommendAnswerResp
+	ListResponse               = knowledge.ListResponse
+	CommonPhrasesInfoResp      = knowledge.CommonPhrasesInfoResp
+	Content                    = knowledge.Content
+	Question                   = knowledge.Question
+	FindAnswerReq              = knowledge.FindAnswerReq
+	ListData                   = knowledge.ListData
+	InfoResponse               = knowledge.InfoResponse
+	CommonPhrasesListReq       = knowledge.CommonPhrasesListReq
+	CommonPhrases              = knowledge.CommonPhrases
+	CommonPhrasesList          = knowledge.CommonPhrasesList
+	AddRequest                 = knowledge.AddRequest
+	AddResponse                = knowledge.AddResponse
+	FindAnswerResp             = knowledge.FindAnswerResp
+	RecommendAnswerResp        = knowledge.RecommendAnswerResp
+	KnowledgeEntity            = knowledge.KnowledgeEntity
+	KnowledgeDelReq            = knowledge.KnowledgeDelReq
+	CommonPhrasesInfoReq       = knowledge.CommonPhrasesInfoReq
+	CommonPhrasesListResp      = knowledge.CommonPhrasesListResp
+	CommonPhrasesClassListResp = knowledge.CommonPhrasesClassListResp
+	ListRequest                = knowledge.ListRequest
+	KnowledgeEditReq           = knowledge.KnowledgeEditReq
+	CommonPhrasesAddReq        = knowledge.CommonPhrasesAddReq
+	CommonPhrasesClassListReq  = knowledge.CommonPhrasesClassListReq
+	CommonPhrasesClassListData = knowledge.CommonPhrasesClassListData
 
 	Knowledge interface {
 		// 知识新增
@@ -57,6 +61,8 @@ type (
 		CommonPhrasesList(ctx context.Context, in *CommonPhrasesListReq) (*CommonPhrasesListResp, error)
 		// 客服话术删除
 		CommonPhrasesDel(ctx context.Context, in *CommonPhrasesInfoReq) (*AddResponse, error)
+		// 客服话术分类查询
+		CommonPhraseClassList(ctx context.Context, in *CommonPhrasesClassListReq) (*CommonPhrasesClassListResp, error)
 	}
 
 	defaultKnowledge struct {
@@ -135,3 +141,9 @@ func (m *defaultKnowledge) CommonPhrasesDel(ctx context.Context, in *CommonPhras
 	client := knowledge.NewKnowledgeClient(m.cli.Conn())
 	return client.CommonPhrasesDel(ctx, in)
 }
+
+// 客服话术分类查询
+func (m *defaultKnowledge) CommonPhraseClassList(ctx context.Context, in *CommonPhrasesClassListReq) (*CommonPhrasesClassListResp, error) {
+	client := knowledge.NewKnowledgeClient(m.cli.Conn())
+	return client.CommonPhraseClassList(ctx, in)
+}

+ 2 - 2
rpc/knowledge/test/commonPhrases_test.go

@@ -15,10 +15,10 @@ func Test_CommonPhrasesAddOrEdit(t *testing.T) {
 	req := &knowledgeclient.CommonPhrasesAddReq{}
 	req.AppId = "10000"
 	req.EntId = 14929
-	req.Content = "推荐11111"
+	req.Content = "排序看一下"
 	req.EntUserId = 4315
 	req.Id = 32
-	req.Classify = "产品推荐"
+	req.Classify = "排序"
 	res, err := TestSystem.CommonPhrasesAdd(ctx, req)
 	log.Println("res ", res)
 	log.Println("err ", err)