Przeglądaj źródła

修改包的引用

renjiaojiao 2 lat temu
rodzic
commit
a8b0345f91

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

@@ -46,6 +46,26 @@ func RegisterHandlers(engine *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/knowledge/recommendAnswer",
 				Handler: recommendAnswerHandler(serverCtx),
 			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/commonPhrase/commonPhrasesAddOrUpdate",
+				Handler: commonPhrasesAddOrUpdateHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/commonPhrase/commonPhrasesInfo",
+				Handler: commonPhrasesInfoHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/commonPhrase/commonPhrasesDel",
+				Handler: commonPhrasesDelHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/commonPhrase/commonPhrasesList",
+				Handler: commonPhrasesListHandler(serverCtx),
+			},
 		},
 	)
 }

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

@@ -50,3 +50,23 @@ type CommonRes struct {
 	Error_msg  string      `json:"error_msg"`
 	Data       interface{} `json:"data"`
 }
+
+type CommonPhrasesAddReq struct {
+	Id        int64  `json:"id"`
+	Classify  string `json:"classify"`
+	Content   string `json:"content"`
+	EntId     int64  `header:"entId"`
+	AppId     string `header:"appId"`
+	EntUserId int64  `header:"entUserId"`
+}
+
+type CommonPhrasesInfoOrDelReq struct {
+	Id int64 `json:"id"`
+}
+
+type CommonPhrasesListReq struct {
+	PageSize  int64  `json:"pageSize"`
+	PageIndex int64  `json:"pageIndex"`
+	EntId     int64  `header:"entId"`
+	AppId     string `header:"appId"`
+}

+ 26 - 0
api/knowledge/knowledge.api

@@ -45,6 +45,24 @@ type CommonRes {
 	Data       interface{} `json:"data"`
 }
 
+type CommonPhrasesAddReq {
+	Id        int64  `json:"id"`
+	Classify  string `json:"classify"`
+	Content   string `json:"content"`
+	EntId     int64  `header:"entId"`
+	AppId     string `header:"appId"`
+	EntUserId int64  `header:"entUserId"`
+}
+type CommonPhrasesInfoOrDelReq {
+	Id int64 `json:"id"`
+}
+type CommonPhrasesListReq {
+	PageSize  int64  `json:"pageSize"`
+	PageIndex int64  `json:"pageIndex"`
+	EntId     int64  `header:"entId"`
+	AppId     string `header:"appId"`
+}
+
 service knowledge-api {
 	@handler knowledgeAdd
 	post /knowledge/knowledgeAdd (AddKnowledgeReq) returns (CommonRes);
@@ -60,4 +78,12 @@ service knowledge-api {
 	post /knowledge/findAnswer (FindAnswerReq) returns (CommonRes);
 	@handler recommendAnswer
 	post /knowledge/recommendAnswer (RecommendAnswerReq) returns (CommonRes);
+	@handler commonPhrasesAddOrUpdate
+	post /knowledge/commonPhrase/commonPhrasesAddOrUpdate (CommonPhrasesAddReq) returns (CommonRes);
+	@handler commonPhrasesInfo
+	post /knowledge/commonPhrase/commonPhrasesInfo (CommonPhrasesInfoOrDelReq) returns (CommonRes);
+	@handler commonPhrasesDel
+	post /knowledge/commonPhrase/commonPhrasesDel (CommonPhrasesInfoOrDelReq) returns (CommonRes);
+	@handler commonPhrasesList
+	post /knowledge/commonPhrase/commonPhrasesList (CommonPhrasesListReq) returns (CommonRes);
 }

+ 7 - 2
rpc/knowledge/internal/logic/commonphraseslistlogic.go

@@ -1,6 +1,7 @@
 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"
@@ -24,7 +25,11 @@ func NewCommonPhrasesListLogic(ctx context.Context, svcCtx *svc.ServiceContext)
 
 // CommonPhrasesList 客服话术列表
 func (l *CommonPhrasesListLogic) CommonPhrasesList(in *knowledgeclient.CommonPhrasesListReq) (*knowledgeclient.CommonPhrasesListResp, error) {
-	// todo: add your logic here and delete this line
+	result := &knowledgeclient.CommonPhrasesListResp{}
+	c := service.CommonPhrasesService{}
+	commonPhrasesList := c.CommonPhrasesList(in)
+	result.ErrorCode = 0
+	result.Data = commonPhrasesList
 
-	return &knowledgeclient.CommonPhrasesListResp{}, nil
+	return result, nil
 }

+ 54 - 15
rpc/knowledge/internal/service/commonPhrasesService.go

@@ -5,28 +5,55 @@ import (
 	. "bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/entity"
 	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/knowledgeclient"
 	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/util"
+	"time"
 )
 
 type CommonPhrasesService struct{}
 
 // CommonPhrasesAdd 客服话术添加
-func (c *CommonPhrasesService) CommonPhrasesAdd(param *knowledgeclient.CommonPhrasesAddReq) int64 {
-	insertData := map[string]interface{}{
-		"entId":    param.EntId,
-		"appId":    param.AppId,
-		"classify": param.Classify,
-		"content":  param.Content,
+func (c *CommonPhrasesService) CommonPhrasesAdd(param *knowledgeclient.CommonPhrasesAddReq) (ok bool, msg string) {
+	ok = true
+	msg = "操作成功"
+	if param.Id > 0 {
+		//编辑
+		updateData := map[string]interface{}{
+			"classify":     param.Classify,
+			"content":      param.Content,
+			"createPerson": param.EntUserId,
+			"createTime":   time.Now().Local().Format(util.DateFullLayout),
+		}
+		ok = Mysql.Update(util.COMMONPHRASES, map[string]interface{}{"id": param.Id}, updateData)
+		if !ok {
+			msg = "操作失败"
+		}
+	} else {
+		insertData := map[string]interface{}{
+			"entId":        param.EntId,
+			"appId":        param.AppId,
+			"classify":     param.Classify,
+			"content":      param.Content,
+			"createPerson": param.EntUserId,
+			"status":       0,
+			"createTime":   time.Now().Local().Format(util.DateFullLayout),
+		}
+		in := Mysql.Insert(util.COMMONPHRASES, insertData)
+		if in < 0 {
+			ok = false
+			msg = "操作失败"
+		}
 	}
-	in := Mysql.Insert(util.COMMONPHRASES, insertData)
-	return in
+
+	return ok, msg
 }
 
 // CommonPhrasesInfo 客服话术详情
 func (c *CommonPhrasesService) CommonPhrasesInfo(id int64) (data *knowledgeclient.CommonPhrases, ok bool) {
 	info := Mysql.FindOne(util.COMMONPHRASES, map[string]interface{}{"id": id}, "", "")
-	if info != nil && *info != nil && len(*info) > 0 {
+
+	if info != nil && len(*info) > 0 {
+		data = &knowledgeclient.CommonPhrases{}
 		data.Id = cm.Int64All((*info)["id"])
-		data.Classify = cm.Int64All((*info)["classify"])
+		data.Classify = cm.ObjToString((*info)["classify"])
 		data.Content = cm.ObjToString((*info)["content"])
 		return data, true
 	}
@@ -35,16 +62,28 @@ func (c *CommonPhrasesService) CommonPhrasesInfo(id int64) (data *knowledgeclien
 
 // CommonPhrasesDel 客服话术删除
 func (c *CommonPhrasesService) CommonPhrasesDel(id int64) bool {
-	ok := Mysql.Delete(util.COMMONPHRASES, map[string]interface{}{"id": id})
+	ok := Mysql.Update(util.COMMONPHRASES, map[string]interface{}{"id": id}, map[string]interface{}{"status": 1})
 	return ok
 }
 
 // CommonPhrasesList 客服话术列表
-/*func (c *CommonPhrasesService) CommonPhrasesList(param *knowledgeclient.CommonPhrasesListReq) {
+func (c *CommonPhrasesService) CommonPhrasesList(param *knowledgeclient.CommonPhrasesListReq) *knowledgeclient.CommonPhrasesList {
 	var commonPhrasesList knowledgeclient.CommonPhrasesList
 	var data []*knowledgeclient.CommonPhrases
-	count := Mysql.Count(util.COMMONPHRASES, map[string]interface{}{"status": 0})
+	count := Mysql.Count(util.COMMONPHRASES, map[string]interface{}{"status": 0, "appId": param.AppId, "entId": param.EntId})
 	if count > 0 {
-		dataList := Mysql.Find(util.COMMONPHRASES, map[string]interface{}{"status": 0},"","desc id", cm.IntAll((param.PageIndex-1)*param.PageSize), cm.IntAll(param.PageSize))
+		dataList := Mysql.Find(util.COMMONPHRASES, map[string]interface{}{"status": 0, "appId": param.AppId, "entId": param.EntId}, "", "id desc", cm.IntAll((param.PageIndex-1)*param.PageSize), cm.IntAll(param.PageSize))
+		if dataList != nil && len(*dataList) > 0 {
+			for _, val := range *dataList {
+				data = append(data, &knowledgeclient.CommonPhrases{
+					Id:       cm.Int64All(val["id"]),
+					Content:  cm.ObjToString(val["content"]),
+					Classify: cm.ObjToString(val["classify"]),
+				})
+			}
+		}
+		commonPhrasesList.Data = data
+		commonPhrasesList.Total = count
 	}
-}*/
+	return &commonPhrasesList
+}

+ 3 - 2
rpc/knowledge/knowledge.proto

@@ -85,10 +85,11 @@ message KnowledgeDelReq{
 
 message CommonPhrasesAddReq{
   int64 id = 1;
-  int64 classify = 2; //分类
+  string classify = 2; //分类
   string content = 3; //话术内容
   int64 entId = 4;//企业id
   string appId = 5;
+  int64 entUserId = 6;
 }
 message CommonPhrasesInfoReq{
   int64 id = 1;
@@ -101,7 +102,7 @@ message CommonPhrasesListReq{
 }
 message CommonPhrases{
   int64 id = 1;
-  int64 classify = 2; //分类
+  string classify = 2; //分类
   string content = 3; //话术内容
 }
 message CommonPhrasesInfoResp{

+ 113 - 103
rpc/knowledge/knowledge/knowledge.pb.go

@@ -896,11 +896,12 @@ type CommonPhrasesAddReq struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Id       int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
-	Classify int64  `protobuf:"varint,2,opt,name=classify,proto3" json:"classify,omitempty"` //分类
-	Content  string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`    //话术内容
-	EntId    int64  `protobuf:"varint,4,opt,name=entId,proto3" json:"entId,omitempty"`       //企业id
-	AppId    string `protobuf:"bytes,5,opt,name=appId,proto3" json:"appId,omitempty"`
+	Id        int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+	Classify  string `protobuf:"bytes,2,opt,name=classify,proto3" json:"classify,omitempty"` //分类
+	Content   string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`   //话术内容
+	EntId     int64  `protobuf:"varint,4,opt,name=entId,proto3" json:"entId,omitempty"`      //企业id
+	AppId     string `protobuf:"bytes,5,opt,name=appId,proto3" json:"appId,omitempty"`
+	EntUserId int64  `protobuf:"varint,6,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
 }
 
 func (x *CommonPhrasesAddReq) Reset() {
@@ -942,11 +943,11 @@ func (x *CommonPhrasesAddReq) GetId() int64 {
 	return 0
 }
 
-func (x *CommonPhrasesAddReq) GetClassify() int64 {
+func (x *CommonPhrasesAddReq) GetClassify() string {
 	if x != nil {
 		return x.Classify
 	}
-	return 0
+	return ""
 }
 
 func (x *CommonPhrasesAddReq) GetContent() string {
@@ -970,6 +971,13 @@ func (x *CommonPhrasesAddReq) GetAppId() string {
 	return ""
 }
 
+func (x *CommonPhrasesAddReq) GetEntUserId() int64 {
+	if x != nil {
+		return x.EntUserId
+	}
+	return 0
+}
+
 type CommonPhrasesInfoReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -1094,8 +1102,8 @@ type CommonPhrases struct {
 	unknownFields protoimpl.UnknownFields
 
 	Id       int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
-	Classify int64  `protobuf:"varint,2,opt,name=classify,proto3" json:"classify,omitempty"` //分类
-	Content  string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`    //话术内容
+	Classify string `protobuf:"bytes,2,opt,name=classify,proto3" json:"classify,omitempty"` //分类
+	Content  string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`   //话术内容
 }
 
 func (x *CommonPhrases) Reset() {
@@ -1137,11 +1145,11 @@ func (x *CommonPhrases) GetId() int64 {
 	return 0
 }
 
-func (x *CommonPhrases) GetClassify() int64 {
+func (x *CommonPhrases) GetClassify() string {
 	if x != nil {
 		return x.Classify
 	}
-	return 0
+	return ""
 }
 
 func (x *CommonPhrases) GetContent() string {
@@ -1430,105 +1438,107 @@ var file_knowledge_proto_rawDesc = []byte{
 	0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2d,
 	0x0a, 0x0f, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x52, 0x65,
 	0x71, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x22, 0x87, 0x01,
+	0x01, 0x28, 0x03, 0x52, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x22, 0xa5, 0x01,
 	0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x41,
 	0x64, 0x64, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
 	0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66,
-	0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66,
+	0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66,
 	0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01,
 	0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65,
 	0x6e, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49,
 	0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x26, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
-	0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12,
-	0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22,
-	0x7c, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73,
-	0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53,
-	0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53,
-	0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78,
-	0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65,
-	0x78, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64,
-	0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x55, 0x0a,
-	0x0d, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x12, 0x0e,
-	0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a,
-	0x0a, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x08, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,
-	0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e,
-	0x74, 0x65, 0x6e, 0x74, 0x22, 0x80, 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50,
-	0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 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, 0x2b, 0x0a, 0x04, 0x64, 0x61,
-	0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c,
-	0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65,
-	0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x56, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
-	0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05,
-	0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74,
-	0x61, 0x6c, 0x12, 0x2b, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
-	0x32, 0x17, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
-	0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22,
-	0x84, 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65,
-	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, 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, 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, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x6b, 0x6e,
-	0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73,
+	0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55,
+	0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x26, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50,
+	0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a,
+	0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x7c, 0x0a,
+	0x14, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x4c, 0x69,
+	0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a,
+	0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a,
+	0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12,
+	0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
+	0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x04,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x55, 0x0a, 0x0d, 0x43,
+	0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02,
+	0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08,
+	0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
+	0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74,
+	0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
+	0x6e, 0x74, 0x22, 0x80, 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72,
+	0x61, 0x73, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 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, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
+	0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x52,
+	0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x56, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50,
+	0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f,
+	0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c,
+	0x12, 0x2b, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17,
+	0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+	0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x84, 0x01,
+	0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 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, 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,
+	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, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x6b, 0x6e, 0x6f, 0x77,
+	0x6c, 0x65, 0x64, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 12 - 12
rpc/knowledge/knowledgeclient/knowledge.go

@@ -13,26 +13,26 @@ import (
 )
 
 type (
-	ListData              = knowledge.ListData
 	ListRequest           = knowledge.ListRequest
-	KnowledgeEditReq      = knowledge.KnowledgeEditReq
+	KnowledgeEntity       = knowledge.KnowledgeEntity
+	KnowledgeDelReq       = knowledge.KnowledgeDelReq
 	InfoResponse          = knowledge.InfoResponse
-	CommonPhrasesListReq  = knowledge.CommonPhrasesListReq
-	FindAnswerReq         = knowledge.FindAnswerReq
 	CommonPhrasesAddReq   = knowledge.CommonPhrasesAddReq
 	CommonPhrasesInfoReq  = knowledge.CommonPhrasesInfoReq
-	CommonPhrasesListResp = knowledge.CommonPhrasesListResp
-	KnowledgeEntity       = knowledge.KnowledgeEntity
-	CommonPhrasesList     = knowledge.CommonPhrasesList
-	AddRequest            = knowledge.AddRequest
-	AddResponse           = knowledge.AddResponse
+	CommonPhrasesListReq  = knowledge.CommonPhrasesListReq
+	FindAnswerReq         = knowledge.FindAnswerReq
 	FindAnswerResp        = knowledge.FindAnswerResp
-	RecommendAnswerResp   = knowledge.RecommendAnswerResp
 	ListResponse          = knowledge.ListResponse
-	KnowledgeDelReq       = knowledge.KnowledgeDelReq
+	KnowledgeEditReq      = knowledge.KnowledgeEditReq
 	CommonPhrases         = knowledge.CommonPhrases
-	Question              = knowledge.Question
+	CommonPhrasesList     = knowledge.CommonPhrasesList
+	CommonPhrasesListResp = knowledge.CommonPhrasesListResp
+	ListData              = knowledge.ListData
 	CommonPhrasesInfoResp = knowledge.CommonPhrasesInfoResp
+	Question              = knowledge.Question
+	AddRequest            = knowledge.AddRequest
+	AddResponse           = knowledge.AddResponse
+	RecommendAnswerResp   = knowledge.RecommendAnswerResp
 
 	Knowledge interface {
 		// 知识新增

+ 58 - 0
rpc/knowledge/test/commonPhrases_test.go

@@ -0,0 +1,58 @@
+package test
+
+import (
+	"bp.jydev.jianyu360.cn/SocialPlatform/knowledgeBase/rpc/knowledge/knowledgeclient"
+	"context"
+	"github.com/zeromicro/go-zero/zrpc"
+	"log"
+	"testing"
+	"time"
+)
+
+func Test_CommonPhrasesAddOrEdit(t *testing.T) {
+	ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
+	TestSystem := knowledgeclient.NewKnowledge(zrpc.MustNewClient(c.TestConf))
+	req := &knowledgeclient.CommonPhrasesAddReq{}
+	req.AppId = "10000"
+	req.EntId = 14929
+	req.Content = "麻烦你聪明点吧1111222"
+	req.EntUserId = 4315
+	req.Id = 6
+	req.Classify = "客户问题1222"
+	res, err := TestSystem.CommonPhrasesAdd(ctx, req)
+	log.Println("res ", res)
+	log.Println("err ", err)
+}
+
+func Test_CommonPhrasesInfo(t *testing.T) {
+	ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
+	TestSystem := knowledgeclient.NewKnowledge(zrpc.MustNewClient(c.TestConf))
+	req := &knowledgeclient.CommonPhrasesInfoReq{}
+	req.Id = 2
+	res, err := TestSystem.CommonPhrasesInfo(ctx, req)
+	log.Println("res ", res)
+	log.Println("err ", err)
+}
+
+func Test_CommonPhrasesDel(t *testing.T) {
+	ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
+	TestSystem := knowledgeclient.NewKnowledge(zrpc.MustNewClient(c.TestConf))
+	req := &knowledgeclient.CommonPhrasesInfoReq{}
+	req.Id = 2
+	res, err := TestSystem.CommonPhrasesDel(ctx, req)
+	log.Println("res ", res)
+	log.Println("err ", err)
+}
+
+func Test_CommonPhrasesList(t *testing.T) {
+	ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
+	TestSystem := knowledgeclient.NewKnowledge(zrpc.MustNewClient(c.TestConf))
+	req := &knowledgeclient.CommonPhrasesListReq{}
+	req.PageIndex = 1
+	req.EntId = 14929
+	req.AppId = "10000"
+	req.PageSize = 10
+	res, err := TestSystem.CommonPhrasesList(ctx, req)
+	log.Println("res ", res)
+	log.Println("err ", err)
+}