Explorar o código

知识列表修改

renjiaojiao %!s(int64=3) %!d(string=hai) anos
pai
achega
3bb0d06394

+ 2 - 0
api/knowledge/internal/logic/knowledgelistlogic.go

@@ -4,6 +4,7 @@ import (
 	"context"
 	"github.com/zeromicro/go-zero/core/logx"
 	"knowledgeBase/rpc/knowledge/knowledgeclient"
+	"log"
 
 	"knowledgeBase/api/knowledge/internal/svc"
 	"knowledgeBase/api/knowledge/internal/types"
@@ -33,6 +34,7 @@ func (l *KnowledgeListLogic) KnowledgeList(req types.ListReq) (*types.CommonRes,
 	if err != nil {
 		return nil, err
 	}
+	log.Println("返回数据:", resp.Data)
 	return &types.CommonRes{
 		Error_code: int(resp.ErrorCode),
 		Error_msg:  resp.ErrorMsg,

+ 2 - 3
go.mod

@@ -4,11 +4,10 @@ go 1.16
 
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20220421060131-a1001013ba46
-	github.com/fsnotify/fsnotify v1.5.1 // indirect
+	//bp.jydev.jianyu360.cn/BaseService/gateway v0.0.0-20220421091022-75639a9b8086
 	github.com/go-sql-driver/mysql v1.6.0
+	github.com/satori/go.uuid v1.2.0
 	github.com/zeromicro/go-zero v1.3.2
-	golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2 // indirect
 	google.golang.org/grpc v1.45.0
 	google.golang.org/protobuf v1.28.0
-	bp.jydev.jianyu360.cn/BaseService/gateway v0.0.0-20220421091022-75639a9b8086
 )

+ 4 - 0
go.sum

@@ -192,6 +192,7 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x
 github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
 github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
 github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
+github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU=
 github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
 github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
@@ -306,6 +307,7 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1
 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
 github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
 github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
+github.com/justinas/alice v1.2.0 h1:+MHSA/vccVCF4Uq37S42jwlkvI2Xzl7zTPCN5BnZNVo=
 github.com/justinas/alice v1.2.0/go.mod h1:fN5HRH/reO/zrUflLfTN43t3vXvKzvZIENsNEe7i7qA=
 github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4=
 github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
@@ -420,6 +422,8 @@ github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
 github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
 github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
 github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
+github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
 github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
 github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
 github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=

+ 4 - 4
rpc/knowledge/internal/logic/knowledgeeditlogic.go

@@ -56,7 +56,7 @@ func (l *KnowledgeEditLogic) KnowledgeEdit(in *knowledgeclient.KnowledgeEditReq)
 		newKnowledge := map[string]interface{}{
 			"knowledgeId":  in.KnowledgeId,
 			"status":       1,
-			"createTime":   time.Now().Local().Format(util.Date_Full_Layout),
+			"createTime":   time.Now().Unix(),
 			"createPerson": in.Person,
 			"answer":       in.Answer,
 			"question":     in.Question,
@@ -64,9 +64,9 @@ func (l *KnowledgeEditLogic) KnowledgeEdit(in *knowledgeclient.KnowledgeEditReq)
 			"answerId":     in.AnswerId,
 			"tenantId":     in.TenantId,
 		}
-		ok := elastic.Del(C.Es.Index, C.Es.Type, query)
-		ok = elastic.Save(C.Es.Index, C.Es.Type, newKnowledge)
-		if ok {
+		ok1 := elastic.Del(C.Es.Index, C.Es.Type, query)
+		ok := elastic.Save(C.Es.Index, C.Es.Type, newKnowledge)
+		if ok && ok1 {
 			result.ErrorCode = 0
 			result.ErrorMsg = "修改问题成功"
 		} else {

+ 26 - 14
rpc/knowledge/internal/logic/knowledgelistlogic.go

@@ -8,6 +8,7 @@ import (
 	"knowledgeBase/rpc/knowledge/internal/svc"
 	"knowledgeBase/rpc/knowledge/knowledgeclient"
 	"knowledgeBase/rpc/knowledge/util"
+	"log"
 )
 
 type KnowledgeListLogic struct {
@@ -28,23 +29,34 @@ func NewKnowledgeListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Kno
 func (l *KnowledgeListLogic) KnowledgeList(in *knowledgeclient.ListRequest) (*knowledgeclient.ListResponse, error) {
 	// todo: add your logic here and delete this line
 	result := &knowledgeclient.ListResponse{}
-	var knowledgeList []*knowledgeclient.KnowledgeEntity
-	//列表数据
-	sql := "SELECT b.content as answer,c.content as question,b.id,b.knowledge_id  FROM " + util.KNOWLEDGE +
+	var knowledgeList knowledgeclient.ListData
+	var data []*knowledgeclient.KnowledgeEntity
+	countSql := "SELECT COUNT(b.id)  FROM " + util.KNOWLEDGE +
 		" a LEFT JOIN " + util.ANSWER + " b ON a.id = b.knowledge_id LEFT JOIN " + util.QUESTION +
-		" c ON b.id = c.answer_id WHERE b.`status` =1 and a.tenant_id=? limit ?,?"
-	datalist := Mysql.SelectBySql(sql, in.TenantId, in.PageIndex, in.PageSize)
-	if datalist != nil && *datalist != nil && len(*datalist) > 0 {
-		for _, value := range *datalist {
-			knowledge := knowledgeclient.KnowledgeEntity{}
-			knowledge.Answer = quitl.ObjToString(value["answer"])
-			knowledge.Question = quitl.ObjToString(value["question"])
-			knowledge.AnswerId = quitl.Int64All(value["id"])
-			knowledge.KnowledgeId = quitl.Int64All(value["knowledge_id"])
-			knowledgeList = append(knowledgeList, &knowledge)
+		" c ON b.id = c.answer_id WHERE b.`status` =1 and a.tenant_id=?"
+	count := Mysql.CountBySql(countSql, in.TenantId)
+	log.Println("总数:", count)
+	if count > 0 {
+		//列表数据
+		sql := "SELECT b.content as answer,c.content as question,b.id,b.knowledge_id  FROM " + util.KNOWLEDGE +
+			" a LEFT JOIN " + util.ANSWER + " b ON a.id = b.knowledge_id LEFT JOIN " + util.QUESTION +
+			" c ON b.id = c.answer_id WHERE b.`status` =1 and a.tenant_id=? limit ?,?"
+		datalist := Mysql.SelectBySql(sql, in.TenantId, (in.PageIndex-1)*in.PageSize, in.PageSize)
+		if datalist != nil && *datalist != nil && len(*datalist) > 0 {
+			for _, value := range *datalist {
+				knowledge := knowledgeclient.KnowledgeEntity{}
+				knowledge.Answer = quitl.ObjToString(value["answer"])
+				knowledge.Question = quitl.ObjToString(value["question"])
+				knowledge.AnswerId = quitl.Int64All(value["id"])
+				knowledge.KnowledgeId = quitl.Int64All(value["knowledge_id"])
+				data = append(data, &knowledge)
+			}
 		}
+		log.Println("数据:", data)
+		knowledgeList.Total = count
+		knowledgeList.Data = data
 	}
 	result.ErrorCode = 0
-	result.Data = knowledgeList
+	result.Data = &knowledgeList
 	return result, nil
 }

+ 6 - 1
rpc/knowledge/knowledge.proto

@@ -43,6 +43,11 @@ message RecommendAnswerResp{
   repeated Question data = 3; //响应内容
 }
 
+message ListData {
+  int64 total = 1;
+  repeated  KnowledgeEntity Data = 2;
+}
+
 message ListRequest  {
   int64 pageSize = 1;//每页数据量,默认10
   int64 pageIndex = 2;//页码;默认第一页
@@ -51,7 +56,7 @@ message ListRequest  {
 message ListResponse  {
   int64 error_code = 1; //响应代码
   string error_msg = 2; //响应消息
-  repeated  KnowledgeEntity data = 3; //响应内容
+  ListData data = 3; //响应内容
 }
 message KnowledgeEntity{
   string question = 1; //问题

+ 206 - 132
rpc/knowledge/knowledge/knowledge.pb.go

@@ -426,6 +426,61 @@ func (x *RecommendAnswerResp) GetData() []*Question {
 	return nil
 }
 
+type ListData struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Total int64              `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
+	Data  []*KnowledgeEntity `protobuf:"bytes,2,rep,name=Data,proto3" json:"Data,omitempty"`
+}
+
+func (x *ListData) Reset() {
+	*x = ListData{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_knowledge_proto_msgTypes[6]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ListData) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListData) ProtoMessage() {}
+
+func (x *ListData) ProtoReflect() protoreflect.Message {
+	mi := &file_knowledge_proto_msgTypes[6]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListData.ProtoReflect.Descriptor instead.
+func (*ListData) Descriptor() ([]byte, []int) {
+	return file_knowledge_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *ListData) GetTotal() int64 {
+	if x != nil {
+		return x.Total
+	}
+	return 0
+}
+
+func (x *ListData) GetData() []*KnowledgeEntity {
+	if x != nil {
+		return x.Data
+	}
+	return nil
+}
+
 type ListRequest struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -439,7 +494,7 @@ type ListRequest struct {
 func (x *ListRequest) Reset() {
 	*x = ListRequest{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_knowledge_proto_msgTypes[6]
+		mi := &file_knowledge_proto_msgTypes[7]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -452,7 +507,7 @@ func (x *ListRequest) String() string {
 func (*ListRequest) ProtoMessage() {}
 
 func (x *ListRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_knowledge_proto_msgTypes[6]
+	mi := &file_knowledge_proto_msgTypes[7]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -465,7 +520,7 @@ func (x *ListRequest) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
 func (*ListRequest) Descriptor() ([]byte, []int) {
-	return file_knowledge_proto_rawDescGZIP(), []int{6}
+	return file_knowledge_proto_rawDescGZIP(), []int{7}
 }
 
 func (x *ListRequest) GetPageSize() int64 {
@@ -494,15 +549,15 @@ type ListResponse struct {
 	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      []*KnowledgeEntity `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"`                             //响应内容
+	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      *ListData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`                             //响应内容
 }
 
 func (x *ListResponse) Reset() {
 	*x = ListResponse{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_knowledge_proto_msgTypes[7]
+		mi := &file_knowledge_proto_msgTypes[8]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -515,7 +570,7 @@ func (x *ListResponse) String() string {
 func (*ListResponse) ProtoMessage() {}
 
 func (x *ListResponse) ProtoReflect() protoreflect.Message {
-	mi := &file_knowledge_proto_msgTypes[7]
+	mi := &file_knowledge_proto_msgTypes[8]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -528,7 +583,7 @@ func (x *ListResponse) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
 func (*ListResponse) Descriptor() ([]byte, []int) {
-	return file_knowledge_proto_rawDescGZIP(), []int{7}
+	return file_knowledge_proto_rawDescGZIP(), []int{8}
 }
 
 func (x *ListResponse) GetErrorCode() int64 {
@@ -545,7 +600,7 @@ func (x *ListResponse) GetErrorMsg() string {
 	return ""
 }
 
-func (x *ListResponse) GetData() []*KnowledgeEntity {
+func (x *ListResponse) GetData() *ListData {
 	if x != nil {
 		return x.Data
 	}
@@ -568,7 +623,7 @@ type KnowledgeEntity struct {
 func (x *KnowledgeEntity) Reset() {
 	*x = KnowledgeEntity{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_knowledge_proto_msgTypes[8]
+		mi := &file_knowledge_proto_msgTypes[9]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -581,7 +636,7 @@ func (x *KnowledgeEntity) String() string {
 func (*KnowledgeEntity) ProtoMessage() {}
 
 func (x *KnowledgeEntity) ProtoReflect() protoreflect.Message {
-	mi := &file_knowledge_proto_msgTypes[8]
+	mi := &file_knowledge_proto_msgTypes[9]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -594,7 +649,7 @@ func (x *KnowledgeEntity) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use KnowledgeEntity.ProtoReflect.Descriptor instead.
 func (*KnowledgeEntity) Descriptor() ([]byte, []int) {
-	return file_knowledge_proto_rawDescGZIP(), []int{8}
+	return file_knowledge_proto_rawDescGZIP(), []int{9}
 }
 
 func (x *KnowledgeEntity) GetQuestion() string {
@@ -655,7 +710,7 @@ type KnowledgeEditReq struct {
 func (x *KnowledgeEditReq) Reset() {
 	*x = KnowledgeEditReq{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_knowledge_proto_msgTypes[9]
+		mi := &file_knowledge_proto_msgTypes[10]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -668,7 +723,7 @@ func (x *KnowledgeEditReq) String() string {
 func (*KnowledgeEditReq) ProtoMessage() {}
 
 func (x *KnowledgeEditReq) ProtoReflect() protoreflect.Message {
-	mi := &file_knowledge_proto_msgTypes[9]
+	mi := &file_knowledge_proto_msgTypes[10]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -681,7 +736,7 @@ func (x *KnowledgeEditReq) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use KnowledgeEditReq.ProtoReflect.Descriptor instead.
 func (*KnowledgeEditReq) Descriptor() ([]byte, []int) {
-	return file_knowledge_proto_rawDescGZIP(), []int{9}
+	return file_knowledge_proto_rawDescGZIP(), []int{10}
 }
 
 func (x *KnowledgeEditReq) GetQuestion() string {
@@ -739,7 +794,7 @@ type InfoResponse struct {
 func (x *InfoResponse) Reset() {
 	*x = InfoResponse{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_knowledge_proto_msgTypes[10]
+		mi := &file_knowledge_proto_msgTypes[11]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -752,7 +807,7 @@ func (x *InfoResponse) String() string {
 func (*InfoResponse) ProtoMessage() {}
 
 func (x *InfoResponse) ProtoReflect() protoreflect.Message {
-	mi := &file_knowledge_proto_msgTypes[10]
+	mi := &file_knowledge_proto_msgTypes[11]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -765,7 +820,7 @@ func (x *InfoResponse) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.
 func (*InfoResponse) Descriptor() ([]byte, []int) {
-	return file_knowledge_proto_rawDescGZIP(), []int{10}
+	return file_knowledge_proto_rawDescGZIP(), []int{11}
 }
 
 func (x *InfoResponse) GetErrorCode() int64 {
@@ -800,7 +855,7 @@ type KnowledgeDelReq struct {
 func (x *KnowledgeDelReq) Reset() {
 	*x = KnowledgeDelReq{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_knowledge_proto_msgTypes[11]
+		mi := &file_knowledge_proto_msgTypes[12]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -813,7 +868,7 @@ func (x *KnowledgeDelReq) String() string {
 func (*KnowledgeDelReq) ProtoMessage() {}
 
 func (x *KnowledgeDelReq) ProtoReflect() protoreflect.Message {
-	mi := &file_knowledge_proto_msgTypes[11]
+	mi := &file_knowledge_proto_msgTypes[12]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -826,7 +881,7 @@ func (x *KnowledgeDelReq) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use KnowledgeDelReq.ProtoReflect.Descriptor instead.
 func (*KnowledgeDelReq) Descriptor() ([]byte, []int) {
-	return file_knowledge_proto_rawDescGZIP(), []int{11}
+	return file_knowledge_proto_rawDescGZIP(), []int{12}
 }
 
 func (x *KnowledgeDelReq) GetAnswerId() int64 {
@@ -882,86 +937,91 @@ var file_knowledge_proto_rawDesc = []byte{
 	0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f,
 	0x72, 0x4d, 0x73, 0x67, 0x12, 0x26, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03,
 	0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x51, 0x75,
-	0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x63, 0x0a, 0x0b,
-	0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49,
-	0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49,
-	0x64, 0x22, 0x79, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
-	0x65, 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, 0x2d, 0x0a,
-	0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65,
+	0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x4f, 0x0a, 0x08,
+	0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61,
+	0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x2d,
+	0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 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, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x63, 0x0a,
+	0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74,
+	0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74,
+	0x49, 0x64, 0x22, 0x72, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+	0x73, 0x65, 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, 0x26,
+	0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74,
+	0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61,
+	0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xb1, 0x01, 0x0a, 0x0f, 0x4b, 0x6e, 0x6f, 0x77, 0x6c,
+	0x65, 0x64, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75,
+	0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75,
+	0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x1a,
+	0x0a, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74,
+	0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65,
+	0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x6b, 0x6e, 0x6f, 0x77,
+	0x6c, 0x65, 0x64, 0x67, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6b,
+	0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x49, 0x64, 0x22, 0xb8, 0x01, 0x0a, 0x10, 0x4b,
+	0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x45, 0x64, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12,
+	0x1a, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61,
+	0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6e, 0x73,
+	0x77, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64, 0x12,
+	0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e,
+	0x74, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e,
+	0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65,
+	0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65,
+	0x64, 0x67, 0x65, 0x49, 0x64, 0x22, 0x79, 0x0a, 0x0c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73,
+	0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x2d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+	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, 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, 0x32,
+	0xde, 0x03, 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, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xb1, 0x01, 0x0a,
-	0x0f, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79,
-	0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06,
-	0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6e,
-	0x73, 0x77, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64,
-	0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x49, 0x64,
-	0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,
-	0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x20,
-	0x0a, 0x0b, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x0b, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x49, 0x64,
-	0x22, 0xb8, 0x01, 0x0a, 0x10, 0x4b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x45, 0x64,
-	0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f,
-	0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f,
-	0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6e, 0x73,
-	0x77, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x61, 0x6e, 0x73,
-	0x77, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x18,
-	0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1a, 0x0a,
-	0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6b, 0x6e, 0x6f,
-	0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b,
-	0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x49, 0x64, 0x22, 0x79, 0x0a, 0x0c, 0x49,
-	0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x2d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
-	0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 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,
-	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, 0x32, 0xde, 0x03, 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,
+	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, 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,
+	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, 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, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x6b, 0x6e, 0x6f, 0x77,
-	0x6c, 0x65, 0x64, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	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,
+	0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x62,
+	0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -976,7 +1036,7 @@ func file_knowledge_proto_rawDescGZIP() []byte {
 	return file_knowledge_proto_rawDescData
 }
 
-var file_knowledge_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
+var file_knowledge_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
 var file_knowledge_proto_goTypes = []interface{}{
 	(*Question)(nil),            // 0: template.Question
 	(*AddRequest)(nil),          // 1: template.AddRequest
@@ -984,37 +1044,39 @@ var file_knowledge_proto_goTypes = []interface{}{
 	(*FindAnswerReq)(nil),       // 3: template.FindAnswerReq
 	(*FindAnswerResp)(nil),      // 4: template.FindAnswerResp
 	(*RecommendAnswerResp)(nil), // 5: template.RecommendAnswerResp
-	(*ListRequest)(nil),         // 6: template.ListRequest
-	(*ListResponse)(nil),        // 7: template.ListResponse
-	(*KnowledgeEntity)(nil),     // 8: template.KnowledgeEntity
-	(*KnowledgeEditReq)(nil),    // 9: template.KnowledgeEditReq
-	(*InfoResponse)(nil),        // 10: template.InfoResponse
-	(*KnowledgeDelReq)(nil),     // 11: template.KnowledgeDelReq
+	(*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
 }
 var file_knowledge_proto_depIdxs = []int32{
 	0,  // 0: template.FindAnswerResp.data:type_name -> template.Question
 	0,  // 1: template.RecommendAnswerResp.data:type_name -> template.Question
-	8,  // 2: template.ListResponse.data:type_name -> template.KnowledgeEntity
-	8,  // 3: template.InfoResponse.data:type_name -> template.KnowledgeEntity
-	1,  // 4: template.knowledge.KnowledgeAdd:input_type -> template.AddRequest
-	6,  // 5: template.knowledge.KnowledgeList:input_type -> template.ListRequest
-	9,  // 6: template.knowledge.KnowledgeEdit:input_type -> template.KnowledgeEditReq
-	8,  // 7: template.knowledge.KnowledgeInfo:input_type -> template.KnowledgeEntity
-	11, // 8: template.knowledge.KnowledgeDel:input_type -> template.KnowledgeDelReq
-	3,  // 9: template.knowledge.FindAnswer:input_type -> template.FindAnswerReq
-	3,  // 10: template.knowledge.RecommendAnswer:input_type -> template.FindAnswerReq
-	2,  // 11: template.knowledge.KnowledgeAdd:output_type -> template.AddResponse
-	7,  // 12: template.knowledge.KnowledgeList:output_type -> template.ListResponse
-	2,  // 13: template.knowledge.KnowledgeEdit:output_type -> template.AddResponse
-	10, // 14: template.knowledge.KnowledgeInfo:output_type -> template.InfoResponse
-	2,  // 15: template.knowledge.KnowledgeDel:output_type -> template.AddResponse
-	4,  // 16: template.knowledge.FindAnswer:output_type -> template.FindAnswerResp
-	5,  // 17: template.knowledge.RecommendAnswer:output_type -> template.RecommendAnswerResp
-	11, // [11:18] is the sub-list for method output_type
-	4,  // [4:11] is the sub-list for method input_type
-	4,  // [4:4] is the sub-list for extension type_name
-	4,  // [4:4] is the sub-list for extension extendee
-	0,  // [0:4] is the sub-list for field type_name
+	9,  // 2: template.ListData.Data:type_name -> template.KnowledgeEntity
+	6,  // 3: template.ListResponse.data:type_name -> template.ListData
+	9,  // 4: template.InfoResponse.data:type_name -> template.KnowledgeEntity
+	1,  // 5: template.knowledge.KnowledgeAdd:input_type -> template.AddRequest
+	7,  // 6: template.knowledge.KnowledgeList:input_type -> template.ListRequest
+	10, // 7: template.knowledge.KnowledgeEdit:input_type -> template.KnowledgeEditReq
+	9,  // 8: template.knowledge.KnowledgeInfo:input_type -> template.KnowledgeEntity
+	12, // 9: template.knowledge.KnowledgeDel:input_type -> template.KnowledgeDelReq
+	3,  // 10: template.knowledge.FindAnswer:input_type -> template.FindAnswerReq
+	3,  // 11: template.knowledge.RecommendAnswer:input_type -> template.FindAnswerReq
+	2,  // 12: template.knowledge.KnowledgeAdd:output_type -> template.AddResponse
+	8,  // 13: template.knowledge.KnowledgeList:output_type -> template.ListResponse
+	2,  // 14: template.knowledge.KnowledgeEdit:output_type -> template.AddResponse
+	11, // 15: template.knowledge.KnowledgeInfo:output_type -> template.InfoResponse
+	2,  // 16: template.knowledge.KnowledgeDel:output_type -> template.AddResponse
+	4,  // 17: template.knowledge.FindAnswer:output_type -> template.FindAnswerResp
+	5,  // 18: template.knowledge.RecommendAnswer:output_type -> template.RecommendAnswerResp
+	12, // [12:19] is the sub-list for method output_type
+	5,  // [5:12] is the sub-list for method input_type
+	5,  // [5:5] is the sub-list for extension type_name
+	5,  // [5:5] is the sub-list for extension extendee
+	0,  // [0:5] is the sub-list for field type_name
 }
 
 func init() { file_knowledge_proto_init() }
@@ -1096,7 +1158,7 @@ func file_knowledge_proto_init() {
 			}
 		}
 		file_knowledge_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*ListRequest); i {
+			switch v := v.(*ListData); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1108,7 +1170,7 @@ func file_knowledge_proto_init() {
 			}
 		}
 		file_knowledge_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*ListResponse); i {
+			switch v := v.(*ListRequest); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1120,7 +1182,7 @@ func file_knowledge_proto_init() {
 			}
 		}
 		file_knowledge_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*KnowledgeEntity); i {
+			switch v := v.(*ListResponse); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1132,7 +1194,7 @@ func file_knowledge_proto_init() {
 			}
 		}
 		file_knowledge_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*KnowledgeEditReq); i {
+			switch v := v.(*KnowledgeEntity); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1144,7 +1206,7 @@ func file_knowledge_proto_init() {
 			}
 		}
 		file_knowledge_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*InfoResponse); i {
+			switch v := v.(*KnowledgeEditReq); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1156,6 +1218,18 @@ func file_knowledge_proto_init() {
 			}
 		}
 		file_knowledge_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*InfoResponse); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_knowledge_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*KnowledgeDelReq); i {
 			case 0:
 				return &v.state
@@ -1174,7 +1248,7 @@ func file_knowledge_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_knowledge_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   12,
+			NumMessages:   13,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 8 - 7
rpc/knowledge/knowledgeclient/knowledge.go

@@ -13,18 +13,19 @@ import (
 )
 
 type (
-	RecommendAnswerResp = knowledge.RecommendAnswerResp
-	ListResponse        = knowledge.ListResponse
+	KnowledgeEntity     = knowledge.KnowledgeEntity
+	KnowledgeEditReq    = knowledge.KnowledgeEditReq
 	InfoResponse        = knowledge.InfoResponse
-	KnowledgeDelReq     = knowledge.KnowledgeDelReq
 	Question            = knowledge.Question
-	AddRequest          = knowledge.AddRequest
 	AddResponse         = knowledge.AddResponse
+	ListData            = knowledge.ListData
+	ListRequest         = knowledge.ListRequest
+	ListResponse        = knowledge.ListResponse
+	AddRequest          = knowledge.AddRequest
 	FindAnswerReq       = knowledge.FindAnswerReq
 	FindAnswerResp      = knowledge.FindAnswerResp
-	ListRequest         = knowledge.ListRequest
-	KnowledgeEntity     = knowledge.KnowledgeEntity
-	KnowledgeEditReq    = knowledge.KnowledgeEditReq
+	RecommendAnswerResp = knowledge.RecommendAnswerResp
+	KnowledgeDelReq     = knowledge.KnowledgeDelReq
 
 	Knowledge interface {
 		// 知识新增

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

@@ -24,7 +24,7 @@ func Test_KnowledgeAdd(t *testing.T) {
 	TestSystem := knowledgeclient.NewKnowledge(zrpc.MustNewClient(c.TestConf))
 	req := &knowledgeclient.AddRequest{}
 	req.AppId = "10000"
-	req.TenantId = "10000"
+	req.TenantId = 10000
 	req.Question = "超级订阅在哪设置订阅提醒,超级订阅用户有哪些权益?"
 	req.Answer = "超级订阅用户权益有订阅设置。"
 	req.Person = "王三"
@@ -84,7 +84,7 @@ func Test_FindAnswer(t *testing.T) {
 	TestSystem := knowledgeclient.NewKnowledge(zrpc.MustNewClient(c.TestConf))
 	req := &knowledgeclient.FindAnswerReq{}
 	req.Question = "超级订阅用户权益有订阅设置"
-	req.TenantId = 1
+	req.TenantId = 10000
 	req.Type = 1
 	req.AppId = "10000"
 	res, err := TestSystem.FindAnswer(ctx, req)

+ 1 - 0
rpc/knowledge/util/elasticsearch_dsl.go

@@ -61,6 +61,7 @@ func DSL4SmartResponse(question string, tenantId int64, msgType int) string {
 		} else if lenQuestion < 12 {
 			queryPercent = "55%"
 		}
+		log.Println("消息类型:", msgType)
 		if msgType == 1 {
 			typeStr = "keywords"
 		} else if msgType == 2 { //百度语音过来的