瀏覽代碼

fix:搜索相关添加修改

duxin 3 年之前
父節點
當前提交
710c844a35

+ 1 - 0
jyBXBase/api/bxbase.api

@@ -77,6 +77,7 @@ type (
 		FileExists   string `json:"fileExists,optional"`  //附件
 		Notkey       string `json:"notkey,optional"`      //排除词
 		Tabularflag  string `json:"tabularflag,optional"`
+		InKey        string `json:"InKey,optional"`
 	}
 
 	//公共接口返回

+ 1 - 0
jyBXBase/api/internal/logic/addSearchScreenLogic.go

@@ -47,6 +47,7 @@ func (l *AddSearchScreenLogic) AddSearchScreen(req *types.AddSearchScreen) (resp
 		FileExists:   req.FileExists,
 		NotKey:       req.Notkey,
 		TabularFlag:  req.Tabularflag,
+		InKey:        req.InKey,
 	})
 	if err0 != nil {
 		return &types.CommonRes{

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

@@ -68,6 +68,7 @@ type AddSearchScreen struct {
 	FileExists   string `json:"fileExists,optional"`  //附件
 	Notkey       string `json:"notkey,optional"`      //排除词
 	Tabularflag  string `json:"tabularflag,optional"`
+	InKey        string `json:"InKey,optional"`
 }
 
 type CommonRes struct {

+ 9 - 1
jyBXBase/rpc/bxbase.proto

@@ -149,6 +149,7 @@ message AddSearchReq{
   string notKey =15;//排除词
   string  city=16;
   string tabularFlag =17;
+  string inKey =18;
 }
 
 message DelSearchReq{
@@ -160,6 +161,13 @@ message CommonRes {
   int64 err_code = 1;
   string err_msg = 2;
 }
+//公共返回
+message CheckRes {
+  int64 err_code = 1;
+  string err_msg = 2;
+  string data = 3;
+}
+
 
 //servie
 service bxbase {
@@ -181,7 +189,7 @@ service bxbase {
   //添加删选列表
   rpc AddSearch(AddSearchReq) returns(CommonRes);
   //修改筛选列表
-  rpc CheckSearch(AddSearchReq) returns(CommonRes);
+  rpc CheckSearch(AddSearchReq) returns(CheckRes);
   //删除筛选列表
   rpc DelSearch(DelSearchReq) returns(CommonRes);
 }

+ 3 - 2
jyBXBase/rpc/bxbase/bxbase.go

@@ -17,6 +17,7 @@ type (
 	AddlabelReq       = bxbase.AddlabelReq
 	AddlabelRes       = bxbase.AddlabelRes
 	BCActionReq       = bxbase.BCActionReq
+	CheckRes          = bxbase.CheckRes
 	ColData           = bxbase.ColData
 	ColList           = bxbase.ColList
 	CommonRes         = bxbase.CommonRes
@@ -54,7 +55,7 @@ type (
 		// 添加删选列表
 		AddSearch(ctx context.Context, in *AddSearchReq, opts ...grpc.CallOption) (*CommonRes, error)
 		// 修改筛选列表
-		CheckSearch(ctx context.Context, in *AddSearchReq, opts ...grpc.CallOption) (*CommonRes, error)
+		CheckSearch(ctx context.Context, in *AddSearchReq, opts ...grpc.CallOption) (*CheckRes, error)
 		// 删除筛选列表
 		DelSearch(ctx context.Context, in *DelSearchReq, opts ...grpc.CallOption) (*CommonRes, error)
 	}
@@ -119,7 +120,7 @@ func (m *defaultBxbase) AddSearch(ctx context.Context, in *AddSearchReq, opts ..
 }
 
 // 修改筛选列表
-func (m *defaultBxbase) CheckSearch(ctx context.Context, in *AddSearchReq, opts ...grpc.CallOption) (*CommonRes, error) {
+func (m *defaultBxbase) CheckSearch(ctx context.Context, in *AddSearchReq, opts ...grpc.CallOption) (*CheckRes, error) {
 	client := bxbase.NewBxbaseClient(m.cli.Conn())
 	return client.CheckSearch(ctx, in, opts...)
 }

+ 1 - 0
jyBXBase/rpc/internal/logic/addsearchlogic.go

@@ -58,6 +58,7 @@ func (l *AddSearchLogic) AddSearch(in *bxbase.AddSearchReq) (res *bxbase.CommonR
 	newData["tabular_flag"] = in.TabularFlag
 	newData["creation_time"] = time.Now().Unix()
 	newData["user_id"] = in.UserId
+	newData["in_key"] = in.InKey
 	IC.Mgo.Save("search_condition", newData)
 	return
 }

+ 89 - 19
jyBXBase/rpc/internal/logic/checksearchlogic.go

@@ -1,9 +1,15 @@
 package logic
 
 import (
+	"app.yhyue.com/moapp/jybase/common"
+	"bytes"
 	"context"
+	"crypto/md5"
+	"fmt"
 	IC "jyBXBase/rpc/init"
 	"log"
+	"net/url"
+	"sort"
 	"strings"
 
 	"jyBXBase/rpc/bxbase"
@@ -27,9 +33,9 @@ func NewCheckSearchLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Check
 }
 
 // 校验搜索列表
-func (l *CheckSearchLogic) CheckSearch(in *bxbase.AddSearchReq) (res *bxbase.CommonRes, err error) {
+func (l *CheckSearchLogic) CheckSearch(in *bxbase.AddSearchReq) (res *bxbase.CheckRes, err error) {
 	// todo: add your logic here and delete this line
-	res = new(bxbase.CommonRes)
+	res = new(bxbase.CheckRes)
 	if in.UserId == "" {
 		res.ErrCode = 1
 		res.ErrMsg = "用户未登录"
@@ -46,30 +52,94 @@ func (l *CheckSearchLogic) CheckSearch(in *bxbase.AddSearchReq) (res *bxbase.Com
 	query := map[string]interface{}{
 		"user_id": in.UserId,
 	}
-	if IC.Mgo.Count("search_condition", query) >= 10 {
+	if IC.Mgo.Count("search_condition", query) > 0 {
 		res.ErrCode = 1
 		res.ErrMsg = "对不起,最多可保存10个筛选条件。"
 		return
 	}
-	query["keywords"] = in.Keywords
-	query["type"] = in.Type
-	query["publish_time"] = in.PublishTime
-	query["area"] = in.Area
-	query["city"] = in.City
-	query["subtype"] = in.Subtype
-	query["min_price"] = in.MinPrice
-	query["max_price"] = in.MaxPrice
-	query["industry"] = in.Industry
-	query["select_type"] = in.SelectType
-	query["buyer_class"] = in.BuyerClass
-	query["buyer_tel"] = in.HasBuyerTel
-	query["winner_tel"] = in.HasWinnerTel
-	query["file_exists"] = in.FileExists
-	query["not_key"] = in.NotKey
-	query["tabular_flag"] = in.TabularFlag
+	in.Keywords = ValueSort(in.Keywords)
+	in.Area = ValueSort(in.Area)
+	in.City = ValueSort(in.City)
+	in.Subtype = ValueSort(in.Subtype)
+	in.Industry = ValueSort(in.Industry)
+	in.SelectType = ValueSort(in.SelectType)
+	in.BuyerClass = ValueSort(in.BuyerClass)
+	in.NotKey = ValueSort(in.NotKey)
+	inMap := common.StructToMapMore(in)
+	inKey := GetKeysByParam(inMap)
+	query["in_key"] = inKey
+	res.ErrMsg = inKey
 	if IC.Mgo.Count("search_condition", query) > 0 {
 		res.ErrCode = 1
 		res.ErrMsg = "该条件已保存,无需重复添加。"
 	}
 	return
 }
+
+func ValueSort(v string) string {
+	vs := strings.Split(v, ",")
+	sort.Slice(vs, func(i, j int) bool {
+		return vs[i] < vs[j]
+	})
+	return strings.Join(vs, ",")
+}
+
+func GetKeysByParam(param map[string]interface{}) string {
+	ps := &paramSorter{[]string{}, []string{}}
+	for k, v := range param {
+		ps.Keys = append(ps.Keys, k)
+		ps.Vals = append(ps.Vals, common.ObjToString(v))
+	}
+	ps.Sort()
+	reqStr := ps.String()
+	str := percentEncode(reqStr)
+	str = SP(str, "%3A", "%253A", -1)
+	return MD5(str)
+}
+
+func MD5(str string) string {
+	data := []byte(str)
+	has := md5.Sum(data)
+	md5str := fmt.Sprintf("%x", has)
+	return md5str
+}
+
+var SP = strings.Replace
+
+func percentEncode(str string) string {
+	str = url.QueryEscape(str)
+	str = SP(SP(SP(str, "+", "%20", -1), "*", "%2A", -1), "%7E", "~", -1)
+	return str
+}
+
+type paramSorter struct {
+	Keys []string
+	Vals []string
+}
+
+func (ps *paramSorter) String() string {
+	str := ""
+	for n, k := range ps.Keys {
+		str += k + "=" + ps.Vals[n]
+		if n < len(ps.Keys)-1 {
+			str += "&"
+		}
+	}
+	return str
+}
+
+func (ps *paramSorter) Sort() {
+	sort.Sort(ps)
+}
+func (ps *paramSorter) Len() int {
+	return len(ps.Vals)
+}
+
+func (ps *paramSorter) Less(i, j int) bool {
+	return bytes.Compare([]byte(ps.Keys[i]), []byte(ps.Keys[j])) < 0
+}
+
+func (ps *paramSorter) Swap(i, j int) {
+	ps.Vals[i], ps.Vals[j] = ps.Vals[j], ps.Vals[i]
+	ps.Keys[i], ps.Keys[j] = ps.Keys[j], ps.Keys[i]
+}

+ 2 - 2
jyBXBase/rpc/internal/logic/showsearchlogic.go

@@ -68,8 +68,8 @@ func (l *ShowSearchLogic) ShowSearch(in *bxbase.ShowSearchReq) (res *bxbase.Show
 			listSearch.Notkey = common.InterfaceToStr(vlu["not_key"])
 			listSearch.Tabularflag = common.InterfaceToStr(vlu["tabular_flag"])
 			//ppa,buyer,winner,agency
-			if (listSearch.SelectType != "title,content" && listSearch.SelectType != "title" && listSearch.SelectType != "content") ||
-				(listSearch.Publishtime != "lately-7" && listSearch.Publishtime != "thisyear" && listSearch.Publishtime != "lately-30") ||
+			if (listSearch.SelectType != "title,content" && listSearch.SelectType != "title" && listSearch.SelectType != "content" && listSearch.SelectType != "content,title") ||
+				(listSearch.Publishtime != "lately-7" && listSearch.Publishtime != "lately-30" && listSearch.Publishtime != "thisyear") ||
 				listSearch.City != "" || listSearch.Notkey != "" || listSearch.Winnertel != "" || listSearch.Buyertel != "" || listSearch.Buyerclass != "" {
 				listSearch.IsPay = true
 			}

+ 1 - 1
jyBXBase/rpc/internal/server/bxbaseserver.go

@@ -71,7 +71,7 @@ func (s *BxbaseServer) AddSearch(ctx context.Context, in *bxbase.AddSearchReq) (
 }
 
 // 修改筛选列表
-func (s *BxbaseServer) CheckSearch(ctx context.Context, in *bxbase.AddSearchReq) (*bxbase.CommonRes, error) {
+func (s *BxbaseServer) CheckSearch(ctx context.Context, in *bxbase.AddSearchReq) (*bxbase.CheckRes, error) {
 	l := logic.NewCheckSearchLogic(ctx, s.svcCtx)
 	return l.CheckSearch(in)
 }

+ 139 - 52
jyBXBase/rpc/type/bxbase/bxbase.pb.go

@@ -1,13 +1,12 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.23.0
-// 	protoc        v3.15.5
+// 	protoc-gen-go v1.28.0
+// 	protoc        v3.19.4
 // source: bxbase.proto
 
 package bxbase
 
 import (
-	proto "github.com/golang/protobuf/proto"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
 	reflect "reflect"
@@ -21,10 +20,6 @@ const (
 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
 )
 
-// This is a compile-time assertion that a sufficiently up-to-date version
-// of the legacy proto package is being used.
-const _ = proto.ProtoPackageIsVersion4
-
 type AddlabelReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -1476,6 +1471,7 @@ type AddSearchReq struct {
 	NotKey       string `protobuf:"bytes,15,opt,name=notKey,proto3" json:"notKey,omitempty"`             //排除词
 	City         string `protobuf:"bytes,16,opt,name=city,proto3" json:"city,omitempty"`
 	TabularFlag  string `protobuf:"bytes,17,opt,name=tabularFlag,proto3" json:"tabularFlag,omitempty"`
+	InKey        string `protobuf:"bytes,18,opt,name=inKey,proto3" json:"inKey,omitempty"`
 }
 
 func (x *AddSearchReq) Reset() {
@@ -1629,6 +1625,13 @@ func (x *AddSearchReq) GetTabularFlag() string {
 	return ""
 }
 
+func (x *AddSearchReq) GetInKey() string {
+	if x != nil {
+		return x.InKey
+	}
+	return ""
+}
+
 type DelSearchReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -1732,6 +1735,70 @@ func (x *CommonRes) GetErrMsg() string {
 	return ""
 }
 
+//公共返回
+type CheckRes struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ErrCode int64  `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code,omitempty"`
+	ErrMsg  string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
+	Data    string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
+}
+
+func (x *CheckRes) Reset() {
+	*x = CheckRes{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_bxbase_proto_msgTypes[22]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CheckRes) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CheckRes) ProtoMessage() {}
+
+func (x *CheckRes) ProtoReflect() protoreflect.Message {
+	mi := &file_bxbase_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 CheckRes.ProtoReflect.Descriptor instead.
+func (*CheckRes) Descriptor() ([]byte, []int) {
+	return file_bxbase_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *CheckRes) GetErrCode() int64 {
+	if x != nil {
+		return x.ErrCode
+	}
+	return 0
+}
+
+func (x *CheckRes) GetErrMsg() string {
+	if x != nil {
+		return x.ErrMsg
+	}
+	return ""
+}
+
+func (x *CheckRes) GetData() string {
+	if x != nil {
+		return x.Data
+	}
+	return ""
+}
+
 var File_bxbase_proto protoreflect.FileDescriptor
 
 var file_bxbase_proto_rawDesc = []byte{
@@ -1897,7 +1964,7 @@ var file_bxbase_proto_rawDesc = []byte{
 	0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x50, 0x61, 0x79, 0x12, 0x20, 0x0a,
 	0x0b, 0x74, 0x61, 0x62, 0x75, 0x6c, 0x61, 0x72, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x13, 0x20, 0x01,
 	0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x75, 0x6c, 0x61, 0x72, 0x66, 0x6c, 0x61, 0x67, 0x22,
-	0xee, 0x03, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71,
+	0x84, 0x04, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71,
 	0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
 	0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
 	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08,
@@ -1928,49 +1995,56 @@ var file_bxbase_proto_rawDesc = []byte{
 	0x74, 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x20,
 	0x0a, 0x0b, 0x74, 0x61, 0x62, 0x75, 0x6c, 0x61, 0x72, 0x46, 0x6c, 0x61, 0x67, 0x18, 0x11, 0x20,
 	0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x75, 0x6c, 0x61, 0x72, 0x46, 0x6c, 0x61, 0x67,
-	0x22, 0x1e, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71,
-	0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
-	0x22, 0x3f, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x19, 0x0a,
-	0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f,
-	0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73,
-	0x67, 0x32, 0xb6, 0x04, 0x0a, 0x06, 0x62, 0x78, 0x62, 0x61, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08,
-	0x41, 0x64, 0x64, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c,
-	0x2e, 0x41, 0x64, 0x64, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x62,
-	0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x64, 0x64, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x73,
-	0x12, 0x44, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69,
-	0x6f, 0x6e, 0x12, 0x18, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61,
-	0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x62,
+	0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x05, 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x22, 0x1e, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x53, 0x65, 0x61,
+	0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3f, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+	0x52, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17,
+	0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x52, 0x0a, 0x08, 0x43, 0x68, 0x65, 0x63, 0x6b,
+	0x52, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17,
+	0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0xb5, 0x04, 0x0a, 0x06,
+	0x62, 0x78, 0x62, 0x61, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x6c, 0x61, 0x62,
+	0x65, 0x6c, 0x12, 0x12, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x64, 0x64, 0x6c, 0x61,
+	0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x41,
+	0x64, 0x64, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0e, 0x47, 0x65,
+	0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x2e, 0x62,
 	0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74,
-	0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41,
-	0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x4c, 0x61,
-	0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x62,
-	0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
-	0x52, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x42, 0x43, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
-	0x12, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x42, 0x43, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
-	0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x4c, 0x61, 0x62, 0x65,
-	0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x0c, 0x49, 0x73,
-	0x43, 0x6f, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x62, 0x78, 0x63,
-	0x6f, 0x6c, 0x2e, 0x49, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52,
-	0x65, 0x71, 0x1a, 0x16, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x49, 0x73, 0x43, 0x6f, 0x6c,
-	0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x04, 0x4c, 0x69,
-	0x73, 0x74, 0x12, 0x0e, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52,
-	0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52,
-	0x65, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x53, 0x68, 0x6f, 0x77, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,
-	0x12, 0x14, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x53, 0x65, 0x61,
-	0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x53,
-	0x68, 0x6f, 0x77, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x09,
-	0x41, 0x64, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x13, 0x2e, 0x62, 0x78, 0x63, 0x6f,
-	0x6c, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x10,
-	0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73,
-	0x12, 0x34, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12,
-	0x13, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63,
-	0x68, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x6f, 0x6d,
-	0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x53, 0x65, 0x61,
-	0x72, 0x63, 0x68, 0x12, 0x13, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x6c, 0x53,
+	0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x47,
+	0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
+	0x12, 0x3b, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+	0x15, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74,
+	0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x4c,
+	0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x35, 0x0a,
+	0x08, 0x42, 0x43, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x2e, 0x62, 0x78, 0x63, 0x6f,
+	0x6c, 0x2e, 0x42, 0x43, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e,
+	0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f,
+	0x6e, 0x52, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x0c, 0x49, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x41, 0x63,
+	0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x49, 0x73, 0x43,
+	0x6f, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x62,
+	0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x49, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f,
+	0x6e, 0x52, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0e, 0x2e, 0x62,
+	0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x62,
+	0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x0a,
+	0x53, 0x68, 0x6f, 0x77, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x14, 0x2e, 0x62, 0x78, 0x63,
+	0x6f, 0x6c, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71,
+	0x1a, 0x14, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x53, 0x65, 0x61,
+	0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x53, 0x65, 0x61,
+	0x72, 0x63, 0x68, 0x12, 0x13, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x64, 0x64, 0x53,
 	0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c,
-	0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f,
-	0x62, 0x78, 0x62, 0x61, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x0b, 0x43, 0x68,
+	0x65, 0x63, 0x6b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x13, 0x2e, 0x62, 0x78, 0x63, 0x6f,
+	0x6c, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x0f,
+	0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x12,
+	0x32, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x13, 0x2e, 0x62,
+	0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x6c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65,
+	0x71, 0x1a, 0x10, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+	0x52, 0x65, 0x73, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x62, 0x78, 0x62, 0x61, 0x73, 0x65, 0x62,
+	0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -1985,7 +2059,7 @@ func file_bxbase_proto_rawDescGZIP() []byte {
 	return file_bxbase_proto_rawDescData
 }
 
-var file_bxbase_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
+var file_bxbase_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
 var file_bxbase_proto_goTypes = []interface{}{
 	(*AddlabelReq)(nil),       // 0: bxcol.AddlabelReq
 	(*AddlabelRes)(nil),       // 1: bxcol.AddlabelRes
@@ -2009,6 +2083,7 @@ var file_bxbase_proto_goTypes = []interface{}{
 	(*AddSearchReq)(nil),      // 19: bxcol.AddSearchReq
 	(*DelSearchReq)(nil),      // 20: bxcol.DelSearchReq
 	(*CommonRes)(nil),         // 21: bxcol.CommonRes
+	(*CheckRes)(nil),          // 22: bxcol.CheckRes
 }
 var file_bxbase_proto_depIdxs = []int32{
 	4,  // 0: bxcol.GetLabelActionRes.labels:type_name -> bxcol.LabelByUser
@@ -2035,7 +2110,7 @@ var file_bxbase_proto_depIdxs = []int32{
 	13, // 21: bxcol.bxbase.List:output_type -> bxcol.ListRes
 	17, // 22: bxcol.bxbase.ShowSearch:output_type -> bxcol.ShowSearchRes
 	21, // 23: bxcol.bxbase.AddSearch:output_type -> bxcol.CommonRes
-	21, // 24: bxcol.bxbase.CheckSearch:output_type -> bxcol.CommonRes
+	22, // 24: bxcol.bxbase.CheckSearch:output_type -> bxcol.CheckRes
 	21, // 25: bxcol.bxbase.DelSearch:output_type -> bxcol.CommonRes
 	16, // [16:26] is the sub-list for method output_type
 	6,  // [6:16] is the sub-list for method input_type
@@ -2314,6 +2389,18 @@ func file_bxbase_proto_init() {
 				return nil
 			}
 		}
+		file_bxbase_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CheckRes); 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{
@@ -2321,7 +2408,7 @@ func file_bxbase_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_bxbase_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   22,
+			NumMessages:   23,
 			NumExtensions: 0,
 			NumServices:   1,
 		},