wangshan hace 3 años
padre
commit
2bdfaa71a3
Se han modificado 40 ficheros con 947 adiciones y 648 borrados
  1. 4 1
      api/jyinfo.api
  2. 2 2
      rpc/common/common.go
  3. 1 1
      rpc/common/common.proto
  4. 13 13
      rpc/common/commonclient/commonclient.go
  5. 8 8
      rpc/common/internal/logic/areainfologic.go
  6. 21 21
      rpc/common/internal/logic/industryinfologic.go
  7. 7 7
      rpc/common/internal/logic/sensitivemethodlogic.go
  8. 8 7
      rpc/common/internal/logic/statemethodlogic.go
  9. 8 8
      rpc/common/internal/server/commonclientserver.go
  10. 31 26
      rpc/common/type/common/common.pb.go
  11. 55 55
      rpc/common/type/common/common_grpc.pb.go
  12. 2 2
      rpc/consumer/consumer.go
  13. 2 2
      rpc/consumer/consumer.proto
  14. 25 25
      rpc/consumer/consumerclient/consumerclient.go
  15. 5 5
      rpc/consumer/internal/logic/infobyuseridlogic.go
  16. 7 7
      rpc/consumer/internal/logic/infochangelogic.go
  17. 3 3
      rpc/consumer/internal/logic/infofiledellogic.go
  18. 4 4
      rpc/consumer/internal/logic/infofileuploadlogic.go
  19. 4 4
      rpc/consumer/internal/logic/inforelatedlogic.go
  20. 5 5
      rpc/consumer/internal/logic/mypublishlistlogic.go
  21. 4 5
      rpc/consumer/internal/logic/publishinfologic.go
  22. 7 7
      rpc/consumer/internal/logic/statusquerylogic.go
  23. 7 7
      rpc/consumer/internal/logic/supplyinfodetaillogic.go
  24. 18 8
      rpc/consumer/internal/logic/supplyinfosearchlogic.go
  25. 83 0
      rpc/consumer/internal/server/consumerclientserver.go
  26. 0 83
      rpc/consumer/internal/server/consumerserver.go
  27. 65 65
      rpc/consumer/type/consumer/consumer.pb.go
  28. 102 102
      rpc/consumer/type/consumer/consumer_grpc.pb.go
  29. 1 0
      rpc/manager/go_build_manager_go_linux_linux
  30. 31 0
      rpc/manager/internal/logic/infoonekeyactionlogic.go
  31. 53 0
      rpc/manager/internal/server/managerclientserver.go
  32. 0 47
      rpc/manager/internal/server/managerserver.go
  33. BIN
      rpc/manager/manager.exe
  34. 2 2
      rpc/manager/manager.go
  35. 15 5
      rpc/manager/manager.proto
  36. 22 13
      rpc/manager/managerclient/managerclient.go
  37. 149 36
      rpc/manager/type/manager/manager.pb.go
  38. 93 55
      rpc/manager/type/manager/manager_grpc.pb.go
  39. 6 7
      rpc/model/es/es.go
  40. 74 0
      rpc/util/elastic.go

+ 4 - 1
api/jyinfo.api

@@ -39,7 +39,7 @@ type (
 	myPublishCommonReq {
 		MsgId   string `json:"msgId"`
 		UserId  string `json:"userId"`
-		Type    int64  `json:"type"`
+		Type    int64  `json:"type"`//处理信息类型:([前端用户:]0:获取发布信息详情(默认);1:删除发布的信息;)(()[管理后台:]1:管理后台一键敏感词过滤;1:管理后台一键发布)
 		MsgType int64  `json:"msgType,optional"`
 		AppId   string `json:"appId"`
 	}
@@ -166,4 +166,7 @@ service Info-api {
 	//管理后台审核
 	@handler organFrozen
 	post /jyinfo/manage/organFrozen (commonReq) returns (commonRes)
+	//一键敏感词过滤Filter&一键发布Publish
+	@handler oneKeyAction
+	post /jyinfo/manage/oneKeyAction (myPublishCommonReq) returns (commonRes)
 }

+ 2 - 2
rpc/common/common.go

@@ -26,10 +26,10 @@ func main() {
 		}
 	}()
 	ctx := svc.NewServiceContext(IC.C)
-	srv := server.NewCommonServer(ctx)
+	srv := server.NewCommonClientServer(ctx)
 
 	s := zrpc.MustNewServer(IC.C.RpcServerConf, func(grpcServer *grpc.Server) {
-		common.RegisterCommonServer(grpcServer, srv)
+		common.RegisterCommonClientServer(grpcServer, srv)
 	})
 	//日志记录
 	//s.AddUnaryInterceptors(util.CustomInterceptors)

+ 1 - 1
rpc/common/common.proto

@@ -81,7 +81,7 @@ message SensitiveResponse {
 }
 
 //
-service Common {
+service commonClient {
 	//获取省份信息(暂不用)
 	rpc AreaInfo(ProjectReq) returns(AreaResp);
 	//获取行业信息(暂不用)

+ 13 - 13
rpc/common/common/common.go → rpc/common/commonclient/commonclient.go

@@ -1,7 +1,7 @@
 // Code generated by goctl. DO NOT EDIT!
 // Source: common.proto
 
-package common
+package commonclient
 
 import (
 	"context"
@@ -28,7 +28,7 @@ type (
 	StateResponse      = common.StateResponse
 	Supply             = common.Supply
 
-	Common interface {
+	CommonClient interface {
 		// 获取省份信息(暂不用)
 		AreaInfo(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*AreaResp, error)
 		// 获取行业信息(暂不用)
@@ -39,37 +39,37 @@ type (
 		SensitiveMethod(ctx context.Context, in *SensitiveRequest, opts ...grpc.CallOption) (*SensitiveResponse, error)
 	}
 
-	defaultCommon struct {
+	defaultCommonClient struct {
 		cli zrpc.Client
 	}
 )
 
-func NewCommon(cli zrpc.Client) Common {
-	return &defaultCommon{
+func NewCommonClient(cli zrpc.Client) CommonClient {
+	return &defaultCommonClient{
 		cli: cli,
 	}
 }
 
 // 获取省份信息(暂不用)
-func (m *defaultCommon) AreaInfo(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*AreaResp, error) {
-	client := common.NewCommonClient(m.cli.Conn())
+func (m *defaultCommonClient) AreaInfo(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*AreaResp, error) {
+	client := common.NewCommonClientClient(m.cli.Conn())
 	return client.AreaInfo(ctx, in, opts...)
 }
 
 // 获取行业信息(暂不用)
-func (m *defaultCommon) IndustryInfo(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*IndustryResp, error) {
-	client := common.NewCommonClient(m.cli.Conn())
+func (m *defaultCommonClient) IndustryInfo(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*IndustryResp, error) {
+	client := common.NewCommonClientClient(m.cli.Conn())
 	return client.IndustryInfo(ctx, in, opts...)
 }
 
 // 修改信息发布状态
-func (m *defaultCommon) StateMethod(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error) {
-	client := common.NewCommonClient(m.cli.Conn())
+func (m *defaultCommonClient) StateMethod(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error) {
+	client := common.NewCommonClientClient(m.cli.Conn())
 	return client.StateMethod(ctx, in, opts...)
 }
 
 //
-func (m *defaultCommon) SensitiveMethod(ctx context.Context, in *SensitiveRequest, opts ...grpc.CallOption) (*SensitiveResponse, error) {
-	client := common.NewCommonClient(m.cli.Conn())
+func (m *defaultCommonClient) SensitiveMethod(ctx context.Context, in *SensitiveRequest, opts ...grpc.CallOption) (*SensitiveResponse, error) {
+	client := common.NewCommonClientClient(m.cli.Conn())
 	return client.SensitiveMethod(ctx, in, opts...)
 }

+ 8 - 8
rpc/common/internal/logic/areainfologic.go

@@ -1,13 +1,13 @@
 package logic
 
 import (
+	"app.yhyue.com/moapp/jyInfo/rpc/model/province"
 	"context"
 	"fmt"
-	"app.yhyue.com/moapp/jyInfo/rpc/model/province"
 	"log"
 	"strings"
 
-	"app.yhyue.com/moapp/jyInfo/rpc/common/common"
+	"app.yhyue.com/moapp/jyInfo/rpc/common/commonclient"
 	"app.yhyue.com/moapp/jyInfo/rpc/common/internal/svc"
 
 	"github.com/zeromicro/go-zero/core/logx"
@@ -28,21 +28,21 @@ func NewAreaInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AreaInfo
 }
 
 // 获取省份信息
-func (l *AreaInfoLogic) AreaInfo(in *common.ProjectReq) (*common.AreaResp, error) {
+func (l *AreaInfoLogic) AreaInfo(in *commonclient.ProjectReq) (*commonclient.AreaResp, error) {
 	//获取地区信息
 	data, err := l.svcCtx.AreaModel.Find()
 	log.Println("data:", data, "--err:", err)
-	return &common.AreaResp{
+	return &commonclient.AreaResp{
 		Data: AreaFormat(data),
 	}, nil
 }
 
 //省份信息结构化
-func AreaFormat(data []model.AreaResp) (ps []*common.Province) {
-	var provinces = map[string][]*common.City{}
+func AreaFormat(data []model.AreaResp) (ps []*commonclient.Province) {
+	var provinces = map[string][]*commonclient.City{}
 	for _, v := range data {
 		pk := fmt.Sprintf("%s-%s", v.Province, fmt.Sprint(v.Pid))
-		provinces[pk] = append(provinces[pk], &common.City{
+		provinces[pk] = append(provinces[pk], &commonclient.City{
 			Name: v.City,
 			Code: fmt.Sprint(v.Cid),
 		})
@@ -51,7 +51,7 @@ func AreaFormat(data []model.AreaResp) (ps []*common.Province) {
 		for pk, pv := range provinces {
 			if strings.Contains(pk, "-") {
 				pkarr := strings.Split(pk, "-")
-				ps = append(ps, &common.Province{
+				ps = append(ps, &commonclient.Province{
 					Name:  pkarr[0],
 					Code:  pkarr[1],
 					Citys: pv,

+ 21 - 21
rpc/common/internal/logic/industryinfologic.go

@@ -1,10 +1,10 @@
 package logic
 
 import (
-	"app.yhyue.com/moapp/jyInfo/rpc/common/common"
+	"app.yhyue.com/moapp/jyInfo/rpc/common/commonclient"
 	"app.yhyue.com/moapp/jyInfo/rpc/common/internal/svc"
 	md "app.yhyue.com/moapp/jyInfo/rpc/model"
-	common2 "app.yhyue.com/moapp/jybase/common"
+	mc "app.yhyue.com/moapp/jybase/common"
 	"context"
 	"github.com/zeromicro/go-zero/core/logx"
 )
@@ -24,38 +24,38 @@ func NewIndustryInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Indu
 }
 
 // 获取行业信息
-func (l *IndustryInfoLogic) IndustryInfo(in *common.ProjectReq) (*common.IndustryResp, error) {
-	var resp common.IndustryResp
+func (l *IndustryInfoLogic) IndustryInfo(in *commonclient.ProjectReq) (*commonclient.IndustryResp, error) {
+	var resp commonclient.IndustryResp
 	data := *md.Mysql.Find("infotype", map[string]interface{}{}, "", "", -1, 0)
-	var rData common.Idata
-	var industrys []*common.Industry
-	var supplys []*common.Supply
-	var infotype []*common.Infotype
+	var rData commonclient.Idata
+	var industrys []*commonclient.Industry
+	var supplys []*commonclient.Supply
+	var infotype []*commonclient.Infotype
 	infotypes := []map[string]interface{}{}
 	for _, v := range data {
-		if common2.Int64All(v["type"]) == 4 {
-			var industry common.Industry
-			industry.Name = common2.InterfaceToStr(v["name"])
+		if mc.Int64All(v["type"]) == 4 {
+			var industry commonclient.Industry
+			industry.Name = mc.InterfaceToStr(v["name"])
 			industrys = append(industrys, &industry)
-		} else if common2.Int64All(v["type"]) == 3 {
-			var supply common.Supply
-			supply.Name = common2.InterfaceToStr(v["name"])
+		} else if mc.Int64All(v["type"]) == 3 {
+			var supply commonclient.Supply
+			supply.Name = mc.InterfaceToStr(v["name"])
 			supplys = append(supplys, &supply)
-		} else if common2.Int64All(v["type"]) == 1 {
-			var info common.Infotype
-			info.Id = common2.Int64All(v["id"])
-			info.Name = common2.InterfaceToStr(v["name"])
+		} else if mc.Int64All(v["type"]) == 1 {
+			var info commonclient.Infotype
+			info.Id = mc.Int64All(v["id"])
+			info.Name = mc.InterfaceToStr(v["name"])
 			infotype = append(infotype, &info)
 		} else {
 			infotypes = append(infotypes, v)
 		}
 	}
 	for _, info := range infotype {
-		var childs []*common.IndustryChildsResp
+		var childs []*commonclient.IndustryChildsResp
 		for _, i := range infotypes {
 			if i["pid"] == info.Id {
-				var child common.IndustryChildsResp
-				child.Name = common2.InterfaceToStr(i["name"])
+				var child commonclient.IndustryChildsResp
+				child.Name = mc.InterfaceToStr(i["name"])
 				childs = append(childs, &child)
 			}
 		}

+ 7 - 7
rpc/common/internal/logic/sensitivemethodlogic.go

@@ -11,9 +11,9 @@ import (
 	"strings"
 	"time"
 
+	"app.yhyue.com/moapp/jyInfo/rpc/common/commonclient"
 	"app.yhyue.com/moapp/jyInfo/rpc/common/internal/svc"
-	"app.yhyue.com/moapp/jyInfo/rpc/common/type/common"
-	cm "app.yhyue.com/moapp/jybase/common"
+	mc "app.yhyue.com/moapp/jybase/common"
 
 	"github.com/zeromicro/go-zero/core/logx"
 )
@@ -32,10 +32,10 @@ func NewSensitiveMethodLogic(ctx context.Context, svcCtx *svc.ServiceContext) *S
 	}
 }
 
-//敏感词过滤后接受结果
-func (l *SensitiveMethodLogic) SensitiveMethod(in *common.SensitiveRequest) (*common.SensitiveResponse, error) {
+//数据组rpc回调,敏感词过滤后结果
+func (l *SensitiveMethodLogic) SensitiveMethod(in *commonclient.SensitiveRequest) (*commonclient.SensitiveResponse, error) {
 	var (
-		resp common.SensitiveResponse
+		resp commonclient.SensitiveResponse
 		//isSensitive 是否有敏感词  isPublishInfo招标信息是否需要自动发布 isPublishSup 供应信息是否需要自动发布
 		isSensitive, isPublishInfo, isPublishSup bool
 	)
@@ -74,7 +74,7 @@ func (l *SensitiveMethodLogic) SensitiveMethod(in *common.SensitiveRequest) (*co
 		data := md.Mysql.FindOne("information", query, "", "")
 		if data != nil && len(*data) > 0 {
 			//是否已被删除
-			isDel = cm.IntAll((*data)["is_del"]) == -1
+			isDel = mc.IntAll((*data)["is_del"]) == -1
 			//未删除 且 不用人工审核 直接入消息队列 进行发布流程
 			if !isDel && isPublishInfo {
 				upData["status"] = 3
@@ -98,7 +98,7 @@ func (l *SensitiveMethodLogic) SensitiveMethod(in *common.SensitiveRequest) (*co
 		data := md.Mysql.FindOne("supply_info", query, "", "")
 		if data != nil && len(*data) > 0 {
 			//是否已被删除
-			isDel = cm.IntAll((*data)["is_del"]) == -1
+			isDel = mc.IntAll((*data)["is_del"]) == -1
 			//信息未被删除 且 不用人工审核 直接进入es 发布信息
 			if !isDel && isPublishSup {
 				upData["status"] = 3

+ 8 - 7
rpc/common/internal/logic/statemethodlogic.go

@@ -1,13 +1,13 @@
 package logic
 
 import (
-	"context"
 	"app.yhyue.com/moapp/jyInfo/rpc/model"
 	"app.yhyue.com/moapp/jyInfo/rpc/util"
+	"context"
 	"time"
 
+	"app.yhyue.com/moapp/jyInfo/rpc/common/commonclient"
 	"app.yhyue.com/moapp/jyInfo/rpc/common/internal/svc"
-	"app.yhyue.com/moapp/jyInfo/rpc/common/type/common"
 
 	mc "app.yhyue.com/moapp/jybase/common"
 	"github.com/zeromicro/go-zero/core/logx"
@@ -27,9 +27,10 @@ func NewStateMethodLogic(ctx context.Context, svcCtx *svc.ServiceContext) *State
 	}
 }
 
-func (l *StateMethodLogic) StateMethod(in *common.StateRequest) (*common.StateResponse, error) {
+//数据组 rpc回调 修改信息发布状态
+func (l *StateMethodLogic) StateMethod(in *commonclient.StateRequest) (*commonclient.StateResponse, error) {
 	var (
-		resp common.StateResponse
+		resp commonclient.StateResponse
 	)
 	query := make(map[string]interface{})
 	query["id"] = in.Id
@@ -39,7 +40,7 @@ func (l *StateMethodLogic) StateMethod(in *common.StateRequest) (*common.StateRe
 	upData["publish_time"] = time.Now().Format("2006-01-02 15:04:05")
 	data := model.Mysql.FindOne("information", query, "", "")
 	if data == nil || len(*data) < 1 {
-		resp.ErrCode = 1
+		resp.ErrCode = -1
 		resp.ErrMsg = "nsq回调发布状态,获取信息失败"
 		return &resp, nil
 	}
@@ -47,13 +48,13 @@ func (l *StateMethodLogic) StateMethod(in *common.StateRequest) (*common.StateRe
 	if mc.IntAll((*data)["is_de"]) == -1 {
 		nsq, err := util.NewNsqInfo(model.NsqConfig.Ip, model.NsqConfig.Topic, mc.InterfaceToStr((*data)["id"]), "3", mc.InterfaceToStr((*data)["type"]), false, upData)
 		if err != nil || nsq.NsqPushInfo() != nil {
-			resp.ErrCode = 1
+			resp.ErrCode = -1
 			resp.ErrMsg = "信息已删除,同步删除信息失败"
 		}
 		return &resp, nil
 	}
 	if !model.Mysql.Update("information", query, upData) {
-		resp.ErrCode = 1
+		resp.ErrCode = -1
 		resp.ErrMsg = "nsq回调发布状态,更新信息状态失败"
 	}
 	return &resp, nil

+ 8 - 8
rpc/common/internal/server/commonserver.go → rpc/common/internal/server/commonclientserver.go

@@ -11,37 +11,37 @@ import (
 	"app.yhyue.com/moapp/jyInfo/rpc/common/type/common"
 )
 
-type CommonServer struct {
+type CommonClientServer struct {
 	svcCtx *svc.ServiceContext
-	common.UnimplementedCommonServer
+	common.UnimplementedCommonClientServer
 }
 
-func NewCommonServer(svcCtx *svc.ServiceContext) *CommonServer {
-	return &CommonServer{
+func NewCommonClientServer(svcCtx *svc.ServiceContext) *CommonClientServer {
+	return &CommonClientServer{
 		svcCtx: svcCtx,
 	}
 }
 
 // 获取省份信息(暂不用)
-func (s *CommonServer) AreaInfo(ctx context.Context, in *common.ProjectReq) (*common.AreaResp, error) {
+func (s *CommonClientServer) AreaInfo(ctx context.Context, in *common.ProjectReq) (*common.AreaResp, error) {
 	l := logic.NewAreaInfoLogic(ctx, s.svcCtx)
 	return l.AreaInfo(in)
 }
 
 // 获取行业信息(暂不用)
-func (s *CommonServer) IndustryInfo(ctx context.Context, in *common.ProjectReq) (*common.IndustryResp, error) {
+func (s *CommonClientServer) IndustryInfo(ctx context.Context, in *common.ProjectReq) (*common.IndustryResp, error) {
 	l := logic.NewIndustryInfoLogic(ctx, s.svcCtx)
 	return l.IndustryInfo(in)
 }
 
 // 修改信息发布状态
-func (s *CommonServer) StateMethod(ctx context.Context, in *common.StateRequest) (*common.StateResponse, error) {
+func (s *CommonClientServer) StateMethod(ctx context.Context, in *common.StateRequest) (*common.StateResponse, error) {
 	l := logic.NewStateMethodLogic(ctx, s.svcCtx)
 	return l.StateMethod(in)
 }
 
 //
-func (s *CommonServer) SensitiveMethod(ctx context.Context, in *common.SensitiveRequest) (*common.SensitiveResponse, error) {
+func (s *CommonClientServer) SensitiveMethod(ctx context.Context, in *common.SensitiveRequest) (*common.SensitiveResponse, error) {
 	l := logic.NewSensitiveMethodLogic(ctx, s.svcCtx)
 	return l.SensitiveMethod(in)
 }

+ 31 - 26
rpc/common/type/common/common.pb.go

@@ -1,12 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.28.0
-// 	protoc        v3.19.4
+// 	protoc-gen-go v1.23.0
+// 	protoc        v3.15.5
 // source: common.proto
 
 package common
 
 import (
+	proto "github.com/golang/protobuf/proto"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
 	reflect "reflect"
@@ -20,6 +21,10 @@ 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 ProjectReq struct {
 	state         protoimpl.MessageState
@@ -919,24 +924,24 @@ var file_common_proto_rawDesc = []byte{
 	0x73, 0x65, 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, 0xf8, 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
-	0x6e, 0x12, 0x30, 0x0a, 0x08, 0x41, 0x72, 0x65, 0x61, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x2e,
-	0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65,
-	0x71, 0x1a, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x41, 0x72, 0x65, 0x61, 0x52,
-	0x65, 0x73, 0x70, 0x12, 0x38, 0x0a, 0x0c, 0x49, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x49,
+	0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x32, 0xfe, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
+	0x6e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x08, 0x41, 0x72, 0x65, 0x61, 0x49,
 	0x6e, 0x66, 0x6f, 0x12, 0x12, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f,
-	0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
-	0x2e, 0x49, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a,
-	0x0b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x14, 0x2e, 0x63,
-	0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
-	0x73, 0x74, 0x1a, 0x15, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74,
-	0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x53, 0x65, 0x6e,
-	0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x18, 0x2e, 0x63,
+	0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+	0x2e, 0x41, 0x72, 0x65, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, 0x0a, 0x0c, 0x49, 0x6e, 0x64,
+	0x75, 0x73, 0x74, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
+	0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e,
+	0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x52,
+	0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x68,
+	0x6f, 0x64, 0x12, 0x14, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74,
+	0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
+	0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+	0x46, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x74, 0x68,
+	0x6f, 0x64, 0x12, 0x18, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6e, 0x73,
+	0x69, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x63,
 	0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x52,
-	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
-	0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
-	0x65, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70,
-	0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x63, 0x6f, 0x6d,
+	0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -976,14 +981,14 @@ var file_common_proto_depIdxs = []int32{
 	6,  // 4: common.Idata.supply:type_name -> common.Supply
 	7,  // 5: common.Idata.industry:type_name -> common.Industry
 	9,  // 6: common.Infotype.childs:type_name -> common.IndustryChildsResp
-	0,  // 7: common.Common.AreaInfo:input_type -> common.ProjectReq
-	0,  // 8: common.Common.IndustryInfo:input_type -> common.ProjectReq
-	10, // 9: common.Common.StateMethod:input_type -> common.StateRequest
-	12, // 10: common.Common.SensitiveMethod:input_type -> common.SensitiveRequest
-	1,  // 11: common.Common.AreaInfo:output_type -> common.AreaResp
-	4,  // 12: common.Common.IndustryInfo:output_type -> common.IndustryResp
-	11, // 13: common.Common.StateMethod:output_type -> common.StateResponse
-	13, // 14: common.Common.SensitiveMethod:output_type -> common.SensitiveResponse
+	0,  // 7: common.commonClient.AreaInfo:input_type -> common.ProjectReq
+	0,  // 8: common.commonClient.IndustryInfo:input_type -> common.ProjectReq
+	10, // 9: common.commonClient.StateMethod:input_type -> common.StateRequest
+	12, // 10: common.commonClient.SensitiveMethod:input_type -> common.SensitiveRequest
+	1,  // 11: common.commonClient.AreaInfo:output_type -> common.AreaResp
+	4,  // 12: common.commonClient.IndustryInfo:output_type -> common.IndustryResp
+	11, // 13: common.commonClient.StateMethod:output_type -> common.StateResponse
+	13, // 14: common.commonClient.SensitiveMethod:output_type -> common.SensitiveResponse
 	11, // [11:15] is the sub-list for method output_type
 	7,  // [7:11] is the sub-list for method input_type
 	7,  // [7:7] is the sub-list for extension type_name

+ 55 - 55
rpc/common/type/common/common_grpc.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
 // - protoc-gen-go-grpc v1.2.0
-// - protoc             v3.19.4
+// - protoc             v3.15.5
 // source: common.proto
 
 package common
@@ -18,10 +18,10 @@ import (
 // Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 
-// CommonClient is the client API for Common service.
+// CommonClientClient is the client API for CommonClient service.
 //
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
-type CommonClient interface {
+type CommonClientClient interface {
 	//获取省份信息(暂不用)
 	AreaInfo(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*AreaResp, error)
 	//获取行业信息(暂不用)
@@ -32,54 +32,54 @@ type CommonClient interface {
 	SensitiveMethod(ctx context.Context, in *SensitiveRequest, opts ...grpc.CallOption) (*SensitiveResponse, error)
 }
 
-type commonClient struct {
+type commonClientClient struct {
 	cc grpc.ClientConnInterface
 }
 
-func NewCommonClient(cc grpc.ClientConnInterface) CommonClient {
-	return &commonClient{cc}
+func NewCommonClientClient(cc grpc.ClientConnInterface) CommonClientClient {
+	return &commonClientClient{cc}
 }
 
-func (c *commonClient) AreaInfo(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*AreaResp, error) {
+func (c *commonClientClient) AreaInfo(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*AreaResp, error) {
 	out := new(AreaResp)
-	err := c.cc.Invoke(ctx, "/common.Common/AreaInfo", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/common.commonClient/AreaInfo", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-func (c *commonClient) IndustryInfo(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*IndustryResp, error) {
+func (c *commonClientClient) IndustryInfo(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*IndustryResp, error) {
 	out := new(IndustryResp)
-	err := c.cc.Invoke(ctx, "/common.Common/IndustryInfo", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/common.commonClient/IndustryInfo", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-func (c *commonClient) StateMethod(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error) {
+func (c *commonClientClient) StateMethod(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error) {
 	out := new(StateResponse)
-	err := c.cc.Invoke(ctx, "/common.Common/StateMethod", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/common.commonClient/StateMethod", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-func (c *commonClient) SensitiveMethod(ctx context.Context, in *SensitiveRequest, opts ...grpc.CallOption) (*SensitiveResponse, error) {
+func (c *commonClientClient) SensitiveMethod(ctx context.Context, in *SensitiveRequest, opts ...grpc.CallOption) (*SensitiveResponse, error) {
 	out := new(SensitiveResponse)
-	err := c.cc.Invoke(ctx, "/common.Common/SensitiveMethod", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/common.commonClient/SensitiveMethod", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-// CommonServer is the server API for Common service.
-// All implementations must embed UnimplementedCommonServer
+// CommonClientServer is the server API for CommonClient service.
+// All implementations must embed UnimplementedCommonClientServer
 // for forward compatibility
-type CommonServer interface {
+type CommonClientServer interface {
 	//获取省份信息(暂不用)
 	AreaInfo(context.Context, *ProjectReq) (*AreaResp, error)
 	//获取行业信息(暂不用)
@@ -88,132 +88,132 @@ type CommonServer interface {
 	StateMethod(context.Context, *StateRequest) (*StateResponse, error)
 	//
 	SensitiveMethod(context.Context, *SensitiveRequest) (*SensitiveResponse, error)
-	mustEmbedUnimplementedCommonServer()
+	mustEmbedUnimplementedCommonClientServer()
 }
 
-// UnimplementedCommonServer must be embedded to have forward compatible implementations.
-type UnimplementedCommonServer struct {
+// UnimplementedCommonClientServer must be embedded to have forward compatible implementations.
+type UnimplementedCommonClientServer struct {
 }
 
-func (UnimplementedCommonServer) AreaInfo(context.Context, *ProjectReq) (*AreaResp, error) {
+func (UnimplementedCommonClientServer) AreaInfo(context.Context, *ProjectReq) (*AreaResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method AreaInfo not implemented")
 }
-func (UnimplementedCommonServer) IndustryInfo(context.Context, *ProjectReq) (*IndustryResp, error) {
+func (UnimplementedCommonClientServer) IndustryInfo(context.Context, *ProjectReq) (*IndustryResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method IndustryInfo not implemented")
 }
-func (UnimplementedCommonServer) StateMethod(context.Context, *StateRequest) (*StateResponse, error) {
+func (UnimplementedCommonClientServer) StateMethod(context.Context, *StateRequest) (*StateResponse, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method StateMethod not implemented")
 }
-func (UnimplementedCommonServer) SensitiveMethod(context.Context, *SensitiveRequest) (*SensitiveResponse, error) {
+func (UnimplementedCommonClientServer) SensitiveMethod(context.Context, *SensitiveRequest) (*SensitiveResponse, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method SensitiveMethod not implemented")
 }
-func (UnimplementedCommonServer) mustEmbedUnimplementedCommonServer() {}
+func (UnimplementedCommonClientServer) mustEmbedUnimplementedCommonClientServer() {}
 
-// UnsafeCommonServer may be embedded to opt out of forward compatibility for this service.
-// Use of this interface is not recommended, as added methods to CommonServer will
+// UnsafeCommonClientServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to CommonClientServer will
 // result in compilation errors.
-type UnsafeCommonServer interface {
-	mustEmbedUnimplementedCommonServer()
+type UnsafeCommonClientServer interface {
+	mustEmbedUnimplementedCommonClientServer()
 }
 
-func RegisterCommonServer(s grpc.ServiceRegistrar, srv CommonServer) {
-	s.RegisterService(&Common_ServiceDesc, srv)
+func RegisterCommonClientServer(s grpc.ServiceRegistrar, srv CommonClientServer) {
+	s.RegisterService(&CommonClient_ServiceDesc, srv)
 }
 
-func _Common_AreaInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _CommonClient_AreaInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(ProjectReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(CommonServer).AreaInfo(ctx, in)
+		return srv.(CommonClientServer).AreaInfo(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/common.Common/AreaInfo",
+		FullMethod: "/common.commonClient/AreaInfo",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(CommonServer).AreaInfo(ctx, req.(*ProjectReq))
+		return srv.(CommonClientServer).AreaInfo(ctx, req.(*ProjectReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Common_IndustryInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _CommonClient_IndustryInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(ProjectReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(CommonServer).IndustryInfo(ctx, in)
+		return srv.(CommonClientServer).IndustryInfo(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/common.Common/IndustryInfo",
+		FullMethod: "/common.commonClient/IndustryInfo",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(CommonServer).IndustryInfo(ctx, req.(*ProjectReq))
+		return srv.(CommonClientServer).IndustryInfo(ctx, req.(*ProjectReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Common_StateMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _CommonClient_StateMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(StateRequest)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(CommonServer).StateMethod(ctx, in)
+		return srv.(CommonClientServer).StateMethod(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/common.Common/StateMethod",
+		FullMethod: "/common.commonClient/StateMethod",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(CommonServer).StateMethod(ctx, req.(*StateRequest))
+		return srv.(CommonClientServer).StateMethod(ctx, req.(*StateRequest))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Common_SensitiveMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _CommonClient_SensitiveMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(SensitiveRequest)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(CommonServer).SensitiveMethod(ctx, in)
+		return srv.(CommonClientServer).SensitiveMethod(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/common.Common/SensitiveMethod",
+		FullMethod: "/common.commonClient/SensitiveMethod",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(CommonServer).SensitiveMethod(ctx, req.(*SensitiveRequest))
+		return srv.(CommonClientServer).SensitiveMethod(ctx, req.(*SensitiveRequest))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-// Common_ServiceDesc is the grpc.ServiceDesc for Common service.
+// CommonClient_ServiceDesc is the grpc.ServiceDesc for CommonClient service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
-var Common_ServiceDesc = grpc.ServiceDesc{
-	ServiceName: "common.Common",
-	HandlerType: (*CommonServer)(nil),
+var CommonClient_ServiceDesc = grpc.ServiceDesc{
+	ServiceName: "common.commonClient",
+	HandlerType: (*CommonClientServer)(nil),
 	Methods: []grpc.MethodDesc{
 		{
 			MethodName: "AreaInfo",
-			Handler:    _Common_AreaInfo_Handler,
+			Handler:    _CommonClient_AreaInfo_Handler,
 		},
 		{
 			MethodName: "IndustryInfo",
-			Handler:    _Common_IndustryInfo_Handler,
+			Handler:    _CommonClient_IndustryInfo_Handler,
 		},
 		{
 			MethodName: "StateMethod",
-			Handler:    _Common_StateMethod_Handler,
+			Handler:    _CommonClient_StateMethod_Handler,
 		},
 		{
 			MethodName: "SensitiveMethod",
-			Handler:    _Common_SensitiveMethod_Handler,
+			Handler:    _CommonClient_SensitiveMethod_Handler,
 		},
 	},
 	Streams:  []grpc.StreamDesc{},

+ 2 - 2
rpc/consumer/consumer.go

@@ -26,10 +26,10 @@ func main() {
 	}()
 
 	ctx := svc.NewServiceContext(IC.C)
-	svr := server.NewConsumerServer(ctx)
+	svr := server.NewConsumerClientServer(ctx)
 
 	s := zrpc.MustNewServer(IC.C.RpcServerConf, func(grpcServer *grpc.Server) {
-		consumer.RegisterConsumerServer(grpcServer, svr)
+		consumer.RegisterConsumerClientServer(grpcServer, svr)
 
 		if IC.C.Mode == service.DevMode || IC.C.Mode == service.TestMode {
 			reflection.Register(grpcServer)

+ 2 - 2
rpc/consumer/consumer.proto

@@ -306,9 +306,9 @@ message  BaseResp{
 	string err_msg = 2;//resp 信息
 }
 //servie
-service consumer {
+service consumerClient {
 	//发布信息
-  	rpc PublishInfo(PublishInfoReq) returns(PublishInfoResp);
+	rpc PublishInfo(PublishInfoReq) returns(PublishInfoResp);
 	//根据用户id获取当月已发布信息数量
 	rpc InfoByUserId(UserIdReq) returns(InfoByUserIdResp);
 	//关联公告

+ 25 - 25
rpc/consumer/consumer/consumer.go → rpc/consumer/consumerclient/consumerclient.go

@@ -1,7 +1,7 @@
 // Code generated by goctl. DO NOT EDIT!
 // Source: consumer.proto
 
-package consumer
+package consumerclient
 
 import (
 	"context"
@@ -51,7 +51,7 @@ type (
 	SupplyList           = consumer.SupplyList
 	UserIdReq            = consumer.UserIdReq
 
-	Consumer interface {
+	ConsumerClient interface {
 		// 发布信息
 		PublishInfo(ctx context.Context, in *PublishInfoReq, opts ...grpc.CallOption) (*PublishInfoResp, error)
 		// 根据用户id获取当月已发布信息数量
@@ -74,73 +74,73 @@ type (
 		InfoFileDel(ctx context.Context, in *InfoFileDelReq, opts ...grpc.CallOption) (*BaseResp, error)
 	}
 
-	defaultConsumer struct {
+	defaultConsumerClient struct {
 		cli zrpc.Client
 	}
 )
 
-func NewConsumer(cli zrpc.Client) Consumer {
-	return &defaultConsumer{
+func NewConsumerClient(cli zrpc.Client) ConsumerClient {
+	return &defaultConsumerClient{
 		cli: cli,
 	}
 }
 
 // 发布信息
-func (m *defaultConsumer) PublishInfo(ctx context.Context, in *PublishInfoReq, opts ...grpc.CallOption) (*PublishInfoResp, error) {
-	client := consumer.NewConsumerClient(m.cli.Conn())
+func (m *defaultConsumerClient) PublishInfo(ctx context.Context, in *PublishInfoReq, opts ...grpc.CallOption) (*PublishInfoResp, error) {
+	client := consumer.NewConsumerClientClient(m.cli.Conn())
 	return client.PublishInfo(ctx, in, opts...)
 }
 
 // 根据用户id获取当月已发布信息数量
-func (m *defaultConsumer) InfoByUserId(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*InfoByUserIdResp, error) {
-	client := consumer.NewConsumerClient(m.cli.Conn())
+func (m *defaultConsumerClient) InfoByUserId(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*InfoByUserIdResp, error) {
+	client := consumer.NewConsumerClientClient(m.cli.Conn())
 	return client.InfoByUserId(ctx, in, opts...)
 }
 
 // 关联公告
-func (m *defaultConsumer) InfoRelated(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*InfoRelatedResp, error) {
-	client := consumer.NewConsumerClient(m.cli.Conn())
+func (m *defaultConsumerClient) InfoRelated(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*InfoRelatedResp, error) {
+	client := consumer.NewConsumerClientClient(m.cli.Conn())
 	return client.InfoRelated(ctx, in, opts...)
 }
 
 // 我的发布列表
-func (m *defaultConsumer) MyPublishList(ctx context.Context, in *MyPublishListReq, opts ...grpc.CallOption) (*MyPublishListResp, error) {
-	client := consumer.NewConsumerClient(m.cli.Conn())
+func (m *defaultConsumerClient) MyPublishList(ctx context.Context, in *MyPublishListReq, opts ...grpc.CallOption) (*MyPublishListResp, error) {
+	client := consumer.NewConsumerClientClient(m.cli.Conn())
 	return client.MyPublishList(ctx, in, opts...)
 }
 
 // 更新发布的信息0:获取详情;1:物理删除()
-func (m *defaultConsumer) InfoChange(ctx context.Context, in *InfoDetailReq, opts ...grpc.CallOption) (*InfoDetailResp, error) {
-	client := consumer.NewConsumerClient(m.cli.Conn())
+func (m *defaultConsumerClient) InfoChange(ctx context.Context, in *InfoDetailReq, opts ...grpc.CallOption) (*InfoDetailResp, error) {
+	client := consumer.NewConsumerClientClient(m.cli.Conn())
 	return client.InfoChange(ctx, in, opts...)
 }
 
 // 信息审核状态查询
-func (m *defaultConsumer) StatusQuery(ctx context.Context, in *StatusReq, opts ...grpc.CallOption) (*StatusResp, error) {
-	client := consumer.NewConsumerClient(m.cli.Conn())
+func (m *defaultConsumerClient) StatusQuery(ctx context.Context, in *StatusReq, opts ...grpc.CallOption) (*StatusResp, error) {
+	client := consumer.NewConsumerClientClient(m.cli.Conn())
 	return client.StatusQuery(ctx, in, opts...)
 }
 
 // 供应信息查询
-func (m *defaultConsumer) SupplyInfoSearch(ctx context.Context, in *SupplyInfoSearchReq, opts ...grpc.CallOption) (*SupplyInfoSearchResp, error) {
-	client := consumer.NewConsumerClient(m.cli.Conn())
+func (m *defaultConsumerClient) SupplyInfoSearch(ctx context.Context, in *SupplyInfoSearchReq, opts ...grpc.CallOption) (*SupplyInfoSearchResp, error) {
+	client := consumer.NewConsumerClientClient(m.cli.Conn())
 	return client.SupplyInfoSearch(ctx, in, opts...)
 }
 
 // 供应信息详情(前端页面查询结果详情请求地址)
-func (m *defaultConsumer) SupplyInfoDetail(ctx context.Context, in *StatusReq, opts ...grpc.CallOption) (*SupplyInfoDetailResp, error) {
-	client := consumer.NewConsumerClient(m.cli.Conn())
+func (m *defaultConsumerClient) SupplyInfoDetail(ctx context.Context, in *StatusReq, opts ...grpc.CallOption) (*SupplyInfoDetailResp, error) {
+	client := consumer.NewConsumerClientClient(m.cli.Conn())
 	return client.SupplyInfoDetail(ctx, in, opts...)
 }
 
 // 上传附件
-func (m *defaultConsumer) InfoFileUpload(ctx context.Context, in *InfoFileUploadReq, opts ...grpc.CallOption) (*InfoFileUploadResp, error) {
-	client := consumer.NewConsumerClient(m.cli.Conn())
+func (m *defaultConsumerClient) InfoFileUpload(ctx context.Context, in *InfoFileUploadReq, opts ...grpc.CallOption) (*InfoFileUploadResp, error) {
+	client := consumer.NewConsumerClientClient(m.cli.Conn())
 	return client.InfoFileUpload(ctx, in, opts...)
 }
 
 // 删除附件
-func (m *defaultConsumer) InfoFileDel(ctx context.Context, in *InfoFileDelReq, opts ...grpc.CallOption) (*BaseResp, error) {
-	client := consumer.NewConsumerClient(m.cli.Conn())
+func (m *defaultConsumerClient) InfoFileDel(ctx context.Context, in *InfoFileDelReq, opts ...grpc.CallOption) (*BaseResp, error) {
+	client := consumer.NewConsumerClientClient(m.cli.Conn())
 	return client.InfoFileDel(ctx, in, opts...)
 }

+ 5 - 5
rpc/consumer/internal/logic/infobyuseridlogic.go

@@ -1,12 +1,12 @@
 package logic
 
 import (
+	"app.yhyue.com/moapp/jyInfo/rpc/model"
 	"context"
 	"fmt"
-	"app.yhyue.com/moapp/jyInfo/rpc/model"
 	"time"
 
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumer"
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumerclient"
 	"app.yhyue.com/moapp/jyInfo/rpc/consumer/internal/svc"
 
 	mc "app.yhyue.com/moapp/jybase/common"
@@ -33,10 +33,10 @@ func GetZeroTime(d time.Time) time.Time {
 }
 
 // 根据用户id获取当月已发布信息数量
-func (l *InfoByUserIdLogic) InfoByUserId(in *consumer.UserIdReq) (*consumer.InfoByUserIdResp, error) {
+func (l *InfoByUserIdLogic) InfoByUserId(in *consumerclient.UserIdReq) (*consumerclient.InfoByUserIdResp, error) {
 	// todo: add your logic here and delete this line
 	//qurey := make(map[string]interface{})
-	var data = consumer.InfoByUserIdResp{}
+	var data = consumerclient.InfoByUserIdResp{}
 	endTime := time.Now().Format("2006-01-02 15:04:05")
 	startTime := time.Date(time.Now().Year(), time.Now().Month(), 1, 0, 0, 0, 0, time.Now().Location())
 	//query := fmt.Sprintf("select count(1) from information where user_id = %s and published = 1 and publish_time>='%s' and publish_time<='%s'", in.UserId, startTime, endTime)
@@ -44,7 +44,7 @@ func (l *InfoByUserIdLogic) InfoByUserId(in *consumer.UserIdReq) (*consumer.Info
 	//number := model.Mysql.CountBySql(query) + model.Mysql.CountBySql(supplyquery)
 	number := model.Mysql.CountBySql(supplyquery)
 
-	var resp consumer.InfoByUserIdData
+	var resp consumerclient.InfoByUserIdData
 	resp.Total = mc.Int64All(model.SupplyTotal)
 	resp.Surplus = mc.Int64All(model.SupplyTotal) - number
 	data.Results = &resp

+ 7 - 7
rpc/consumer/internal/logic/infochangelogic.go

@@ -1,7 +1,7 @@
 package logic
 
 import (
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumer"
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumerclient"
 	"app.yhyue.com/moapp/jyInfo/rpc/consumer/internal/svc"
 	"app.yhyue.com/moapp/jyInfo/rpc/model"
 	esmd "app.yhyue.com/moapp/jyInfo/rpc/model/es"
@@ -30,10 +30,10 @@ func NewInfoChangeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *InfoCh
 }
 
 // 更新发布的信息0:获取详情;1:物理删除
-func (l *InfoChangeLogic) InfoChange(in *consumer.InfoDetailReq) (*consumer.InfoDetailResp, error) {
+func (l *InfoChangeLogic) InfoChange(in *consumerclient.InfoDetailReq) (*consumerclient.InfoDetailResp, error) {
 	// todo: add your logic here and delete this line
 	var (
-		dataRes consumer.InfoDetailResp
+		dataRes consumerclient.InfoDetailResp
 	)
 	query := make(map[string]interface{})
 	upQuery := make(map[string]interface{})
@@ -41,9 +41,9 @@ func (l *InfoChangeLogic) InfoChange(in *consumer.InfoDetailReq) (*consumer.Info
 	switch in.Type {
 	case 0:
 		var (
-			Results           consumer.InfoDetailData    //信息
-			Review            consumer.Review            //审核信息
-			InfoDetailContact consumer.InfoDetailContact //联系人信息
+			Results           consumerclient.InfoDetailData    //信息
+			Review            consumerclient.Review            //审核信息
+			InfoDetailContact consumerclient.InfoDetailContact //联系人信息
 		)
 
 		data := make(map[string]interface{})
@@ -53,7 +53,7 @@ func (l *InfoChangeLogic) InfoChange(in *consumer.InfoDetailReq) (*consumer.Info
 				LEFT JOIN information b on (a.related_id =b.id) where a.id = ? and a.app_id = `+util.StrFormat(in.AppId), mc.IntAll(msgId)); _d != nil && len(*_d) > 0 {
 				data = (*_d)[0]
 				var (
-					Related consumer.Related
+					Related consumerclient.Related
 				)
 				Results.Code = mc.InterfaceToStr(data["project_code"])
 				Results.Industry = strings.Split(mc.InterfaceToStr(data["industry"]), ",")

+ 3 - 3
rpc/consumer/internal/logic/infofiledellogic.go

@@ -7,8 +7,8 @@ import (
 	"fmt"
 	"log"
 
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumerclient"
 	"app.yhyue.com/moapp/jyInfo/rpc/consumer/internal/svc"
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/type/consumer"
 
 	"github.com/zeromicro/go-zero/core/logx"
 )
@@ -28,8 +28,8 @@ func NewInfoFileDelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *InfoF
 }
 
 // 删除附件
-func (l *InfoFileDelLogic) InfoFileDel(in *consumer.InfoFileDelReq) (*consumer.BaseResp, error) {
-	var resp = &consumer.BaseResp{}
+func (l *InfoFileDelLogic) InfoFileDel(in *consumerclient.InfoFileDelReq) (*consumerclient.BaseResp, error) {
+	var resp = &consumerclient.BaseResp{}
 	if in.Fid != "" && IC.C.Oss.OssBucketName != "" {
 		b, err := model.OssDelObject(in.Fid, IC.C.Oss.OssBucketName)
 		if !b || err != nil {

+ 4 - 4
rpc/consumer/internal/logic/infofileuploadlogic.go

@@ -8,7 +8,7 @@ import (
 	"strings"
 	"time"
 
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumer"
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumerclient"
 	"app.yhyue.com/moapp/jyInfo/rpc/consumer/internal/svc"
 
 	mc "app.yhyue.com/moapp/jybase/common"
@@ -30,8 +30,8 @@ func NewInfoFileUploadLogic(ctx context.Context, svcCtx *svc.ServiceContext) *In
 }
 
 // 上传附件
-func (l *InfoFileUploadLogic) InfoFileUpload(in *consumer.InfoFileUploadReq) (*consumer.InfoFileUploadResp, error) {
-	var resp consumer.InfoFileUploadResp
+func (l *InfoFileUploadLogic) InfoFileUpload(in *consumerclient.InfoFileUploadReq) (*consumerclient.InfoFileUploadResp, error) {
+	var resp consumerclient.InfoFileUploadResp
 	//model.InitOss()
 	key := model.GetHashKey(in.File) + model.TypeByExt(in.FileName)
 	t1 := time.Now()
@@ -39,7 +39,7 @@ func (l *InfoFileUploadLogic) InfoFileUpload(in *consumer.InfoFileUploadReq) (*c
 	logx.Info("----------", time.Since(t1))
 	fileSize := mc.InterfaceToStr(in.FileSize/1024) + "KB"
 	if err == nil && b {
-		var data consumer.InfoFileUploadData
+		var data consumerclient.InfoFileUploadData
 		data.Filename = in.FileName
 		data.Size = fileSize
 		data.Fid = key

+ 4 - 4
rpc/consumer/internal/logic/inforelatedlogic.go

@@ -1,7 +1,7 @@
 package logic
 
 import (
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumer"
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumerclient"
 	"app.yhyue.com/moapp/jyInfo/rpc/consumer/internal/svc"
 	"app.yhyue.com/moapp/jyInfo/rpc/model"
 	"app.yhyue.com/moapp/jyInfo/rpc/util"
@@ -27,11 +27,11 @@ func NewInfoRelatedLogic(ctx context.Context, svcCtx *svc.ServiceContext) *InfoR
 }
 
 // 关联公告
-func (l *InfoRelatedLogic) InfoRelated(in *consumer.UserIdReq) (*consumer.InfoRelatedResp, error) {
+func (l *InfoRelatedLogic) InfoRelated(in *consumerclient.UserIdReq) (*consumerclient.InfoRelatedResp, error) {
 	// todo: add your logic here and delete this line
 	var (
 		queryName string
-		resp      consumer.InfoRelatedResp
+		resp      consumerclient.InfoRelatedResp
 	)
 	queryName = ` and type=` + mc.InterfaceToStr(in.MsgType)
 	if in.Match != "" {
@@ -45,7 +45,7 @@ func (l *InfoRelatedLogic) InfoRelated(in *consumer.UserIdReq) (*consumer.InfoRe
 		return &resp, nil
 	}
 	for _, v := range *allData {
-		var data consumer.InfoData
+		var data consumerclient.InfoData
 		data.Id = se.SE.EncodeString(mc.InterfaceToStr(v["id"])) //关联信息加密
 		data.Title = mc.InterfaceToStr(v["title"])
 		resp.Data = append(resp.Data, &data)

+ 5 - 5
rpc/consumer/internal/logic/mypublishlistlogic.go

@@ -1,7 +1,7 @@
 package logic
 
 import (
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumer"
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumerclient"
 	"app.yhyue.com/moapp/jyInfo/rpc/consumer/internal/svc"
 	"app.yhyue.com/moapp/jyInfo/rpc/model"
 	"app.yhyue.com/moapp/jyInfo/rpc/util"
@@ -27,13 +27,13 @@ func NewMyPublishListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MyP
 }
 
 // MyPublishList 我的发布列表
-func (l *MyPublishListLogic) MyPublishList(in *consumer.MyPublishListReq) (*consumer.MyPublishListResp, error) {
+func (l *MyPublishListLogic) MyPublishList(in *consumerclient.MyPublishListReq) (*consumerclient.MyPublishListResp, error) {
 	// todo: add your logic here and delete this line
 	var (
 		queryName                                      string
-		data                                           consumer.MyPublishListResp
+		data                                           consumerclient.MyPublishListResp
 		amount, inReview, approved, auditFailed, total int64
-		ListData                                       consumer.MyPublishListData
+		ListData                                       consumerclient.MyPublishListData
 	)
 	if in.Match != "" {
 		queryName = ` and title LIKE '%` + in.Match + `%' `
@@ -93,7 +93,7 @@ func (l *MyPublishListLogic) MyPublishList(in *consumer.MyPublishListReq) (*cons
 			SELECT id,type,title,create_time,status,published  from supply_info WHERE is_del = 1 and user_id= "`+in.UserId+`" `+queryName+` ) a  order by a.create_time desc limit ?,?`, offset, in.PageSize)
 	if allData != nil && len(*allData) > 0 {
 		for _, v := range *allData {
-			var vs = consumer.ListResp{}
+			var vs = consumerclient.ListResp{}
 			vs.Id = se.SE.EncodeString(mc.InterfaceToStr(v["id"])) //信息id加密
 			vs.ReviewStatus = 1
 			status := mc.IntAll(v["status"])

+ 4 - 5
rpc/consumer/internal/logic/publishinfologic.go

@@ -1,7 +1,7 @@
 package logic
 
 import (
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumer"
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumerclient"
 	"app.yhyue.com/moapp/jyInfo/rpc/consumer/internal/svc"
 	"app.yhyue.com/moapp/jyInfo/rpc/model"
 	"app.yhyue.com/moapp/jyInfo/rpc/util"
@@ -34,9 +34,8 @@ func NewPublishInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Publi
 }
 
 // 发布信息
-func (l *PublishInfoLogic) PublishInfo(in *consumer.PublishInfoReq) (*consumer.PublishInfoResp, error) {
-	// todo: add your logic here and delete this line
-	res := consumer.PublishInfoResp{}
+func (l *PublishInfoLogic) PublishInfo(in *consumerclient.PublishInfoReq) (*consumerclient.PublishInfoResp, error) {
+	res := consumerclient.PublishInfoResp{}
 	var id int64
 	//信息类型1:招标信息 2:采购信息 3:供应信息
 	publishData := make(map[string]interface{})
@@ -85,7 +84,7 @@ func (l *PublishInfoLogic) PublishInfo(in *consumer.PublishInfoReq) (*consumer.P
 		return &res, nil
 	}
 
-	var InfoId consumer.PublishId
+	var InfoId consumerclient.PublishId
 	InfoId.InformationId = se.SE.EncodeString(mc.InterfaceToStr(id)) //信息id加密
 	res.PublishId = &InfoId
 	appendInfo := make(map[string]interface{})

+ 7 - 7
rpc/consumer/internal/logic/statusquerylogic.go

@@ -5,7 +5,7 @@ import (
 	se "app.yhyue.com/moapp/jybase/encrypt"
 	"context"
 
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumer"
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumerclient"
 	"app.yhyue.com/moapp/jyInfo/rpc/consumer/internal/svc"
 
 	mc "app.yhyue.com/moapp/jybase/common"
@@ -27,14 +27,14 @@ func NewStatusQueryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Statu
 }
 
 // 信息审核状态查询
-func (l *StatusQueryLogic) StatusQuery(in *consumer.StatusReq) (*consumer.StatusResp, error) {
+func (l *StatusQueryLogic) StatusQuery(in *consumerclient.StatusReq) (*consumerclient.StatusResp, error) {
 	msgId := se.SE.DecodeString(in.MsgId) //信息id解密
 	if in.Type == 3 {
 		data := model.Mysql.FindOne("supply_info", map[string]interface{}{"id": msgId}, "", "")
 		if len(*data) > 0 {
 			status := mc.IntAll((*data)["status"])
 			published := mc.IntAll((*data)["published"])
-			var statusData consumer.StatusData
+			var statusData consumerclient.StatusData
 			statusData.Status = "1"
 			if published == 2 {
 				statusData.Status = "2"
@@ -43,7 +43,7 @@ func (l *StatusQueryLogic) StatusQuery(in *consumer.StatusReq) (*consumer.Status
 			}
 
 			statusData.Published = mc.InterfaceToStr((*data)["published"])
-			return &consumer.StatusResp{
+			return &consumerclient.StatusResp{
 				ErrCode: 0,
 				ErrMsg:  "",
 				Data:    &statusData,
@@ -54,7 +54,7 @@ func (l *StatusQueryLogic) StatusQuery(in *consumer.StatusReq) (*consumer.Status
 		if len(*data) > 0 {
 			status := mc.IntAll((*data)["status"])
 			published := mc.IntAll((*data)["published"])
-			var statusData consumer.StatusData
+			var statusData consumerclient.StatusData
 			statusData.Status = "1"
 			if published == 2 {
 				statusData.Status = "2"
@@ -62,14 +62,14 @@ func (l *StatusQueryLogic) StatusQuery(in *consumer.StatusReq) (*consumer.Status
 				statusData.Status = "3"
 			}
 			statusData.Published = mc.InterfaceToStr((*data)["published"])
-			return &consumer.StatusResp{
+			return &consumerclient.StatusResp{
 				ErrCode: 0,
 				ErrMsg:  "",
 				Data:    &statusData,
 			}, nil
 		}
 	}
-	return &consumer.StatusResp{
+	return &consumerclient.StatusResp{
 		ErrCode: -1,
 		ErrMsg:  "无数据",
 		Data:    nil,

+ 7 - 7
rpc/consumer/internal/logic/supplyinfodetaillogic.go

@@ -8,7 +8,7 @@ import (
 	"log"
 	"strconv"
 
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumer"
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumerclient"
 	"app.yhyue.com/moapp/jyInfo/rpc/consumer/internal/svc"
 
 	mc "app.yhyue.com/moapp/jybase/common"
@@ -30,20 +30,20 @@ func NewSupplyInfoDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
 }
 
 // 供应信息详情
-func (l *SupplyInfoDetailLogic) SupplyInfoDetail(in *consumer.StatusReq) (*consumer.SupplyInfoDetailResp, error) {
-	var resp consumer.SupplyInfoDetailResp
+func (l *SupplyInfoDetailLogic) SupplyInfoDetail(in *consumerclient.StatusReq) (*consumerclient.SupplyInfoDetailResp, error) {
+	var resp consumerclient.SupplyInfoDetailResp
 	msgId := se.SE.DecodeString(in.MsgId) //信息id解密
 	if in.Type == 0 {
 		data := model.Mysql.FindOne("supply_info", map[string]interface{}{"id": msgId}, "", "")
 		if *data != nil {
-			var info consumer.SupplyInfoDetailData
+			var info consumerclient.SupplyInfoDetailData
 			info.Title = mc.InterfaceToStr((*data)["title"])
 			info.Detail = mc.InterfaceToStr((*data)["detail"])
 			info.PublishTime = mc.InterfaceToStr((*data)["publish_time"])
 			info.ValidityTime = mc.InterfaceToStr((*data)["validity_time"])
 			info.Province = mc.InterfaceToStr((*data)["province"])
 			info.City = mc.InterfaceToStr((*data)["city"])
-			var conctact consumer.InfoDetailContact
+			var conctact consumerclient.InfoDetailContact
 			conctact.Phone = mc.InterfaceToStr((*data)["contact_phone"])
 			conctact.Name = mc.InterfaceToStr((*data)["contact_person"])
 			conctact.Overt = mc.Int64All((*data)["contact_overt"])
@@ -58,7 +58,7 @@ func (l *SupplyInfoDetailLogic) SupplyInfoDetail(in *consumer.StatusReq) (*consu
 					if info.Id == se.SE.EncodeString(mc.InterfaceToStr(v["_id"])) {
 						continue
 					}
-					otherSupplyInfo := consumer.OtherSupplyInfoByEnt{
+					otherSupplyInfo := consumerclient.OtherSupplyInfoByEnt{
 						Title:       mc.InterfaceToStr(v["title"]),
 						Id:          se.SE.EncodeString(mc.InterfaceToStr(v["_id"])),
 						Province:    mc.InterfaceToStr(v["province"]),
@@ -80,5 +80,5 @@ func (l *SupplyInfoDetailLogic) SupplyInfoDetail(in *consumer.StatusReq) (*consu
 		return &resp, nil
 	}
 
-	return &consumer.SupplyInfoDetailResp{}, nil
+	return &consumerclient.SupplyInfoDetailResp{}, nil
 }

+ 18 - 8
rpc/consumer/internal/logic/supplyinfosearchlogic.go

@@ -1,15 +1,17 @@
 package logic
 
 import (
-	"context"
+	IC "app.yhyue.com/moapp/jyInfo/rpc/consumer/init"
 	"app.yhyue.com/moapp/jyInfo/rpc/model/es"
+	"app.yhyue.com/moapp/jyInfo/rpc/util"
+	"context"
 	"log"
 	"strconv"
 	"strings"
 
 	se "app.yhyue.com/moapp/jybase/encrypt"
 
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumer"
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumerclient"
 	"app.yhyue.com/moapp/jyInfo/rpc/consumer/internal/svc"
 
 	"app.yhyue.com/moapp/jybase/common"
@@ -31,7 +33,7 @@ func NewSupplyInfoSearchLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
 }
 
 // 供应信息查询
-func (l *SupplyInfoSearchLogic) SupplyInfoSearch(in *consumer.SupplyInfoSearchReq) (*consumer.SupplyInfoSearchResp, error) {
+func (l *SupplyInfoSearchLogic) SupplyInfoSearch(in *consumerclient.SupplyInfoSearchReq) (*consumerclient.SupplyInfoSearchResp, error) {
 	//默认每页五十条
 	if in.PageSize == 0 {
 		in.PageSize = 50
@@ -45,7 +47,15 @@ func (l *SupplyInfoSearchLogic) SupplyInfoSearch(in *consumer.SupplyInfoSearchRe
 		in.Keywords = strings.ReplaceAll(in.Keywords, " ", "+")
 	}
 	list, total := model.GetSupplyInfoList(in)
-	var infos []*consumer.SupplyList
+	logx.Info(list, "-------", total)
+	if total == 0 && len([]rune(in.Keywords)) > 3 {
+		if secondKWS := util.HttpEsGetWords(in.Keywords, "ik_smart", IC.C.Es.Addr); secondKWS != "" {
+			log.Println("secondKWS:", secondKWS)
+			in.Keywords = secondKWS
+			list, total = model.GetSupplyInfoList(in)
+		}
+	}
+	var infos []*consumerclient.SupplyList
 	if len(*list) > 0 {
 		for _, v := range *list {
 			detail := []string{}
@@ -55,7 +65,7 @@ func (l *SupplyInfoSearchLogic) SupplyInfoSearch(in *consumer.SupplyInfoSearchRe
 					detail = highlight["detail"]
 				}
 			}
-			info := consumer.SupplyList{
+			info := consumerclient.SupplyList{
 				Title:       common.InterfaceToStr(v["title"]),
 				Detail:      common.InterfaceToStr(v["detail"]),
 				Id:          se.SE.EncodeString(common.InterfaceToStr(v["_id"])),
@@ -67,14 +77,14 @@ func (l *SupplyInfoSearchLogic) SupplyInfoSearch(in *consumer.SupplyInfoSearchRe
 			infos = append(infos, &info)
 		}
 		log.Println("infos:", infos)
-		return &consumer.SupplyInfoSearchResp{
-			Data: &consumer.SupplyInfo{
+		return &consumerclient.SupplyInfoSearchResp{
+			Data: &consumerclient.SupplyInfo{
 				Total: total,
 				List:  infos,
 			},
 		}, nil
 	}
-	return &consumer.SupplyInfoSearchResp{
+	return &consumerclient.SupplyInfoSearchResp{
 		ErrCode: -1,
 		ErrMsg:  "暂无数据",
 	}, nil

+ 83 - 0
rpc/consumer/internal/server/consumerclientserver.go

@@ -0,0 +1,83 @@
+// Code generated by goctl. DO NOT EDIT!
+// Source: consumer.proto
+
+package server
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/internal/logic"
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/internal/svc"
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/type/consumer"
+)
+
+type ConsumerClientServer struct {
+	svcCtx *svc.ServiceContext
+	consumer.UnimplementedConsumerClientServer
+}
+
+func NewConsumerClientServer(svcCtx *svc.ServiceContext) *ConsumerClientServer {
+	return &ConsumerClientServer{
+		svcCtx: svcCtx,
+	}
+}
+
+// 发布信息
+func (s *ConsumerClientServer) PublishInfo(ctx context.Context, in *consumer.PublishInfoReq) (*consumer.PublishInfoResp, error) {
+	l := logic.NewPublishInfoLogic(ctx, s.svcCtx)
+	return l.PublishInfo(in)
+}
+
+// 根据用户id获取当月已发布信息数量
+func (s *ConsumerClientServer) InfoByUserId(ctx context.Context, in *consumer.UserIdReq) (*consumer.InfoByUserIdResp, error) {
+	l := logic.NewInfoByUserIdLogic(ctx, s.svcCtx)
+	return l.InfoByUserId(in)
+}
+
+// 关联公告
+func (s *ConsumerClientServer) InfoRelated(ctx context.Context, in *consumer.UserIdReq) (*consumer.InfoRelatedResp, error) {
+	l := logic.NewInfoRelatedLogic(ctx, s.svcCtx)
+	return l.InfoRelated(in)
+}
+
+// 我的发布列表
+func (s *ConsumerClientServer) MyPublishList(ctx context.Context, in *consumer.MyPublishListReq) (*consumer.MyPublishListResp, error) {
+	l := logic.NewMyPublishListLogic(ctx, s.svcCtx)
+	return l.MyPublishList(in)
+}
+
+// 更新发布的信息0:获取详情;1:物理删除()
+func (s *ConsumerClientServer) InfoChange(ctx context.Context, in *consumer.InfoDetailReq) (*consumer.InfoDetailResp, error) {
+	l := logic.NewInfoChangeLogic(ctx, s.svcCtx)
+	return l.InfoChange(in)
+}
+
+// 信息审核状态查询
+func (s *ConsumerClientServer) StatusQuery(ctx context.Context, in *consumer.StatusReq) (*consumer.StatusResp, error) {
+	l := logic.NewStatusQueryLogic(ctx, s.svcCtx)
+	return l.StatusQuery(in)
+}
+
+// 供应信息查询
+func (s *ConsumerClientServer) SupplyInfoSearch(ctx context.Context, in *consumer.SupplyInfoSearchReq) (*consumer.SupplyInfoSearchResp, error) {
+	l := logic.NewSupplyInfoSearchLogic(ctx, s.svcCtx)
+	return l.SupplyInfoSearch(in)
+}
+
+// 供应信息详情(前端页面查询结果详情请求地址)
+func (s *ConsumerClientServer) SupplyInfoDetail(ctx context.Context, in *consumer.StatusReq) (*consumer.SupplyInfoDetailResp, error) {
+	l := logic.NewSupplyInfoDetailLogic(ctx, s.svcCtx)
+	return l.SupplyInfoDetail(in)
+}
+
+// 上传附件
+func (s *ConsumerClientServer) InfoFileUpload(ctx context.Context, in *consumer.InfoFileUploadReq) (*consumer.InfoFileUploadResp, error) {
+	l := logic.NewInfoFileUploadLogic(ctx, s.svcCtx)
+	return l.InfoFileUpload(in)
+}
+
+// 删除附件
+func (s *ConsumerClientServer) InfoFileDel(ctx context.Context, in *consumer.InfoFileDelReq) (*consumer.BaseResp, error) {
+	l := logic.NewInfoFileDelLogic(ctx, s.svcCtx)
+	return l.InfoFileDel(in)
+}

+ 0 - 83
rpc/consumer/internal/server/consumerserver.go

@@ -1,83 +0,0 @@
-// Code generated by goctl. DO NOT EDIT!
-// Source: consumer.proto
-
-package server
-
-import (
-	"context"
-
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/internal/logic"
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/internal/svc"
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/type/consumer"
-)
-
-type ConsumerServer struct {
-	svcCtx *svc.ServiceContext
-	consumer.UnimplementedConsumerServer
-}
-
-func NewConsumerServer(svcCtx *svc.ServiceContext) *ConsumerServer {
-	return &ConsumerServer{
-		svcCtx: svcCtx,
-	}
-}
-
-// 发布信息
-func (s *ConsumerServer) PublishInfo(ctx context.Context, in *consumer.PublishInfoReq) (*consumer.PublishInfoResp, error) {
-	l := logic.NewPublishInfoLogic(ctx, s.svcCtx)
-	return l.PublishInfo(in)
-}
-
-// 根据用户id获取当月已发布信息数量
-func (s *ConsumerServer) InfoByUserId(ctx context.Context, in *consumer.UserIdReq) (*consumer.InfoByUserIdResp, error) {
-	l := logic.NewInfoByUserIdLogic(ctx, s.svcCtx)
-	return l.InfoByUserId(in)
-}
-
-// 关联公告
-func (s *ConsumerServer) InfoRelated(ctx context.Context, in *consumer.UserIdReq) (*consumer.InfoRelatedResp, error) {
-	l := logic.NewInfoRelatedLogic(ctx, s.svcCtx)
-	return l.InfoRelated(in)
-}
-
-// 我的发布列表
-func (s *ConsumerServer) MyPublishList(ctx context.Context, in *consumer.MyPublishListReq) (*consumer.MyPublishListResp, error) {
-	l := logic.NewMyPublishListLogic(ctx, s.svcCtx)
-	return l.MyPublishList(in)
-}
-
-// 更新发布的信息0:获取详情;1:物理删除()
-func (s *ConsumerServer) InfoChange(ctx context.Context, in *consumer.InfoDetailReq) (*consumer.InfoDetailResp, error) {
-	l := logic.NewInfoChangeLogic(ctx, s.svcCtx)
-	return l.InfoChange(in)
-}
-
-// 信息审核状态查询
-func (s *ConsumerServer) StatusQuery(ctx context.Context, in *consumer.StatusReq) (*consumer.StatusResp, error) {
-	l := logic.NewStatusQueryLogic(ctx, s.svcCtx)
-	return l.StatusQuery(in)
-}
-
-// 供应信息查询
-func (s *ConsumerServer) SupplyInfoSearch(ctx context.Context, in *consumer.SupplyInfoSearchReq) (*consumer.SupplyInfoSearchResp, error) {
-	l := logic.NewSupplyInfoSearchLogic(ctx, s.svcCtx)
-	return l.SupplyInfoSearch(in)
-}
-
-// 供应信息详情(前端页面查询结果详情请求地址)
-func (s *ConsumerServer) SupplyInfoDetail(ctx context.Context, in *consumer.StatusReq) (*consumer.SupplyInfoDetailResp, error) {
-	l := logic.NewSupplyInfoDetailLogic(ctx, s.svcCtx)
-	return l.SupplyInfoDetail(in)
-}
-
-// 上传附件
-func (s *ConsumerServer) InfoFileUpload(ctx context.Context, in *consumer.InfoFileUploadReq) (*consumer.InfoFileUploadResp, error) {
-	l := logic.NewInfoFileUploadLogic(ctx, s.svcCtx)
-	return l.InfoFileUpload(in)
-}
-
-// 删除附件
-func (s *ConsumerServer) InfoFileDel(ctx context.Context, in *consumer.InfoFileDelReq) (*consumer.BaseResp, error) {
-	l := logic.NewInfoFileDelLogic(ctx, s.svcCtx)
-	return l.InfoFileDel(in)
-}

+ 65 - 65
rpc/consumer/type/consumer/consumer.pb.go

@@ -3292,52 +3292,52 @@ var file_consumer_proto_rawDesc = []byte{
 	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,
-	0xb9, 0x05, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0b,
-	0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x63, 0x6f,
+	0xbf, 0x05, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x43, 0x6c, 0x69, 0x65,
+	0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x49, 0x6e, 0x66,
+	0x6f, 0x12, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x50, 0x75, 0x62,
+	0x6c, 0x69, 0x73, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x63, 0x6f,
 	0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x49, 0x6e,
-	0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72,
-	0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70,
-	0x12, 0x3f, 0x0a, 0x0c, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
-	0x12, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72,
-	0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72,
-	0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x73,
-	0x70, 0x12, 0x3d, 0x0a, 0x0b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64,
-	0x12, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72,
-	0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72,
-	0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70,
-	0x12, 0x48, 0x0a, 0x0d, 0x4d, 0x79, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x4c, 0x69, 0x73,
-	0x74, 0x12, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x4d, 0x79, 0x50,
-	0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e,
-	0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x4d, 0x79, 0x50, 0x75, 0x62, 0x6c, 0x69,
-	0x73, 0x68, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x0a, 0x49, 0x6e,
-	0x66, 0x6f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75,
-	0x6d, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65,
-	0x71, 0x1a, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66,
-	0x6f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, 0x0a, 0x0b, 0x53,
-	0x74, 0x61, 0x74, 0x75, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x13, 0x2e, 0x63, 0x6f, 0x6e,
-	0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x1a,
-	0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75,
-	0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x10, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x49,
-	0x6e, 0x66, 0x6f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x73,
-	0x75, 0x6d, 0x65, 0x72, 0x2e, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x53,
-	0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75,
-	0x6d, 0x65, 0x72, 0x2e, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x65,
-	0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x47, 0x0a, 0x10, 0x73, 0x75, 0x70, 0x70,
-	0x6c, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x13, 0x2e, 0x63,
-	0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
-	0x71, 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x73, 0x75, 0x70,
-	0x70, 0x6c, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73,
-	0x70, 0x12, 0x4b, 0x0a, 0x0e, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x55, 0x70, 0x6c,
-	0x6f, 0x61, 0x64, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x49,
-	0x6e, 0x66, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71,
-	0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f,
-	0x46, 0x69, 0x6c, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3b,
-	0x0a, 0x0b, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x12, 0x18, 0x2e,
-	0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x69, 0x6c,
-	0x65, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d,
-	0x65, 0x72, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0c, 0x5a, 0x0a, 0x2e,
-	0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
-	0x33,
+	0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x0c, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x79,
+	0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65,
+	0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x63, 0x6f,
+	0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x79, 0x55, 0x73, 0x65,
+	0x72, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a, 0x0b, 0x49, 0x6e, 0x66, 0x6f, 0x52,
+	0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x12, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65,
+	0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x63, 0x6f,
+	0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74,
+	0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x48, 0x0a, 0x0d, 0x4d, 0x79, 0x50, 0x75, 0x62, 0x6c,
+	0x69, 0x73, 0x68, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d,
+	0x65, 0x72, 0x2e, 0x4d, 0x79, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x4c, 0x69, 0x73, 0x74,
+	0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x4d,
+	0x79, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
+	0x12, 0x3f, 0x0a, 0x0a, 0x49, 0x6e, 0x66, 0x6f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x17,
+	0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x44, 0x65,
+	0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d,
+	0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73,
+	0x70, 0x12, 0x38, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79,
+	0x12, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74,
+	0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72,
+	0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x10, 0x53,
+	0x75, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12,
+	0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x53, 0x75, 0x70, 0x70, 0x6c,
+	0x79, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x1e,
+	0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79,
+	0x49, 0x6e, 0x66, 0x6f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x47,
+	0x0a, 0x10, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x44, 0x65, 0x74, 0x61,
+	0x69, 0x6c, 0x12, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x53, 0x74,
+	0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d,
+	0x65, 0x72, 0x2e, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x44, 0x65, 0x74,
+	0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x0e, 0x49, 0x6e, 0x66, 0x6f, 0x46,
+	0x69, 0x6c, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x73,
+	0x75, 0x6d, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x55, 0x70, 0x6c,
+	0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65,
+	0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x3b, 0x0a, 0x0b, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x69, 0x6c, 0x65,
+	0x44, 0x65, 0x6c, 0x12, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x49,
+	0x6e, 0x66, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e,
+	0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73,
+	0x70, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x62,
+	0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -3413,26 +3413,26 @@ var file_consumer_proto_depIdxs = []int32{
 	18, // 17: consumer.SupplyInfoDetailData.infoDetailContact:type_name -> consumer.InfoDetailContact
 	31, // 18: consumer.SupplyInfoDetailData.otherSupplyInfo:type_name -> consumer.OtherSupplyInfoByEnt
 	34, // 19: consumer.InfoFileUploadResp.data:type_name -> consumer.InfoFileUploadData
-	0,  // 20: consumer.consumer.PublishInfo:input_type -> consumer.PublishInfoReq
-	4,  // 21: consumer.consumer.InfoByUserId:input_type -> consumer.UserIdReq
-	4,  // 22: consumer.consumer.InfoRelated:input_type -> consumer.UserIdReq
-	9,  // 23: consumer.consumer.MyPublishList:input_type -> consumer.MyPublishListReq
-	13, // 24: consumer.consumer.InfoChange:input_type -> consumer.InfoDetailReq
-	22, // 25: consumer.consumer.StatusQuery:input_type -> consumer.StatusReq
-	25, // 26: consumer.consumer.SupplyInfoSearch:input_type -> consumer.SupplyInfoSearchReq
-	22, // 27: consumer.consumer.supplyInfoDetail:input_type -> consumer.StatusReq
-	32, // 28: consumer.consumer.InfoFileUpload:input_type -> consumer.InfoFileUploadReq
-	35, // 29: consumer.consumer.InfoFileDel:input_type -> consumer.InfoFileDelReq
-	2,  // 30: consumer.consumer.PublishInfo:output_type -> consumer.PublishInfoResp
-	5,  // 31: consumer.consumer.InfoByUserId:output_type -> consumer.InfoByUserIdResp
-	7,  // 32: consumer.consumer.InfoRelated:output_type -> consumer.InfoRelatedResp
-	10, // 33: consumer.consumer.MyPublishList:output_type -> consumer.MyPublishListResp
-	14, // 34: consumer.consumer.InfoChange:output_type -> consumer.InfoDetailResp
-	23, // 35: consumer.consumer.StatusQuery:output_type -> consumer.StatusResp
-	26, // 36: consumer.consumer.SupplyInfoSearch:output_type -> consumer.SupplyInfoSearchResp
-	29, // 37: consumer.consumer.supplyInfoDetail:output_type -> consumer.supplyInfoDetailResp
-	33, // 38: consumer.consumer.InfoFileUpload:output_type -> consumer.InfoFileUploadResp
-	36, // 39: consumer.consumer.InfoFileDel:output_type -> consumer.BaseResp
+	0,  // 20: consumer.consumerClient.PublishInfo:input_type -> consumer.PublishInfoReq
+	4,  // 21: consumer.consumerClient.InfoByUserId:input_type -> consumer.UserIdReq
+	4,  // 22: consumer.consumerClient.InfoRelated:input_type -> consumer.UserIdReq
+	9,  // 23: consumer.consumerClient.MyPublishList:input_type -> consumer.MyPublishListReq
+	13, // 24: consumer.consumerClient.InfoChange:input_type -> consumer.InfoDetailReq
+	22, // 25: consumer.consumerClient.StatusQuery:input_type -> consumer.StatusReq
+	25, // 26: consumer.consumerClient.SupplyInfoSearch:input_type -> consumer.SupplyInfoSearchReq
+	22, // 27: consumer.consumerClient.supplyInfoDetail:input_type -> consumer.StatusReq
+	32, // 28: consumer.consumerClient.InfoFileUpload:input_type -> consumer.InfoFileUploadReq
+	35, // 29: consumer.consumerClient.InfoFileDel:input_type -> consumer.InfoFileDelReq
+	2,  // 30: consumer.consumerClient.PublishInfo:output_type -> consumer.PublishInfoResp
+	5,  // 31: consumer.consumerClient.InfoByUserId:output_type -> consumer.InfoByUserIdResp
+	7,  // 32: consumer.consumerClient.InfoRelated:output_type -> consumer.InfoRelatedResp
+	10, // 33: consumer.consumerClient.MyPublishList:output_type -> consumer.MyPublishListResp
+	14, // 34: consumer.consumerClient.InfoChange:output_type -> consumer.InfoDetailResp
+	23, // 35: consumer.consumerClient.StatusQuery:output_type -> consumer.StatusResp
+	26, // 36: consumer.consumerClient.SupplyInfoSearch:output_type -> consumer.SupplyInfoSearchResp
+	29, // 37: consumer.consumerClient.supplyInfoDetail:output_type -> consumer.supplyInfoDetailResp
+	33, // 38: consumer.consumerClient.InfoFileUpload:output_type -> consumer.InfoFileUploadResp
+	36, // 39: consumer.consumerClient.InfoFileDel:output_type -> consumer.BaseResp
 	30, // [30:40] is the sub-list for method output_type
 	20, // [20:30] is the sub-list for method input_type
 	20, // [20:20] is the sub-list for extension type_name

+ 102 - 102
rpc/consumer/type/consumer/consumer_grpc.pb.go

@@ -18,10 +18,10 @@ import (
 // Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 
-// ConsumerClient is the client API for Consumer service.
+// ConsumerClientClient is the client API for ConsumerClient service.
 //
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
-type ConsumerClient interface {
+type ConsumerClientClient interface {
 	//发布信息
 	PublishInfo(ctx context.Context, in *PublishInfoReq, opts ...grpc.CallOption) (*PublishInfoResp, error)
 	//根据用户id获取当月已发布信息数量
@@ -44,108 +44,108 @@ type ConsumerClient interface {
 	InfoFileDel(ctx context.Context, in *InfoFileDelReq, opts ...grpc.CallOption) (*BaseResp, error)
 }
 
-type consumerClient struct {
+type consumerClientClient struct {
 	cc grpc.ClientConnInterface
 }
 
-func NewConsumerClient(cc grpc.ClientConnInterface) ConsumerClient {
-	return &consumerClient{cc}
+func NewConsumerClientClient(cc grpc.ClientConnInterface) ConsumerClientClient {
+	return &consumerClientClient{cc}
 }
 
-func (c *consumerClient) PublishInfo(ctx context.Context, in *PublishInfoReq, opts ...grpc.CallOption) (*PublishInfoResp, error) {
+func (c *consumerClientClient) PublishInfo(ctx context.Context, in *PublishInfoReq, opts ...grpc.CallOption) (*PublishInfoResp, error) {
 	out := new(PublishInfoResp)
-	err := c.cc.Invoke(ctx, "/consumer.consumer/PublishInfo", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/consumer.consumerClient/PublishInfo", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-func (c *consumerClient) InfoByUserId(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*InfoByUserIdResp, error) {
+func (c *consumerClientClient) InfoByUserId(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*InfoByUserIdResp, error) {
 	out := new(InfoByUserIdResp)
-	err := c.cc.Invoke(ctx, "/consumer.consumer/InfoByUserId", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/consumer.consumerClient/InfoByUserId", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-func (c *consumerClient) InfoRelated(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*InfoRelatedResp, error) {
+func (c *consumerClientClient) InfoRelated(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*InfoRelatedResp, error) {
 	out := new(InfoRelatedResp)
-	err := c.cc.Invoke(ctx, "/consumer.consumer/InfoRelated", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/consumer.consumerClient/InfoRelated", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-func (c *consumerClient) MyPublishList(ctx context.Context, in *MyPublishListReq, opts ...grpc.CallOption) (*MyPublishListResp, error) {
+func (c *consumerClientClient) MyPublishList(ctx context.Context, in *MyPublishListReq, opts ...grpc.CallOption) (*MyPublishListResp, error) {
 	out := new(MyPublishListResp)
-	err := c.cc.Invoke(ctx, "/consumer.consumer/MyPublishList", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/consumer.consumerClient/MyPublishList", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-func (c *consumerClient) InfoChange(ctx context.Context, in *InfoDetailReq, opts ...grpc.CallOption) (*InfoDetailResp, error) {
+func (c *consumerClientClient) InfoChange(ctx context.Context, in *InfoDetailReq, opts ...grpc.CallOption) (*InfoDetailResp, error) {
 	out := new(InfoDetailResp)
-	err := c.cc.Invoke(ctx, "/consumer.consumer/InfoChange", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/consumer.consumerClient/InfoChange", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-func (c *consumerClient) StatusQuery(ctx context.Context, in *StatusReq, opts ...grpc.CallOption) (*StatusResp, error) {
+func (c *consumerClientClient) StatusQuery(ctx context.Context, in *StatusReq, opts ...grpc.CallOption) (*StatusResp, error) {
 	out := new(StatusResp)
-	err := c.cc.Invoke(ctx, "/consumer.consumer/StatusQuery", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/consumer.consumerClient/StatusQuery", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-func (c *consumerClient) SupplyInfoSearch(ctx context.Context, in *SupplyInfoSearchReq, opts ...grpc.CallOption) (*SupplyInfoSearchResp, error) {
+func (c *consumerClientClient) SupplyInfoSearch(ctx context.Context, in *SupplyInfoSearchReq, opts ...grpc.CallOption) (*SupplyInfoSearchResp, error) {
 	out := new(SupplyInfoSearchResp)
-	err := c.cc.Invoke(ctx, "/consumer.consumer/SupplyInfoSearch", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/consumer.consumerClient/SupplyInfoSearch", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-func (c *consumerClient) SupplyInfoDetail(ctx context.Context, in *StatusReq, opts ...grpc.CallOption) (*SupplyInfoDetailResp, error) {
+func (c *consumerClientClient) SupplyInfoDetail(ctx context.Context, in *StatusReq, opts ...grpc.CallOption) (*SupplyInfoDetailResp, error) {
 	out := new(SupplyInfoDetailResp)
-	err := c.cc.Invoke(ctx, "/consumer.consumer/supplyInfoDetail", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/consumer.consumerClient/supplyInfoDetail", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-func (c *consumerClient) InfoFileUpload(ctx context.Context, in *InfoFileUploadReq, opts ...grpc.CallOption) (*InfoFileUploadResp, error) {
+func (c *consumerClientClient) InfoFileUpload(ctx context.Context, in *InfoFileUploadReq, opts ...grpc.CallOption) (*InfoFileUploadResp, error) {
 	out := new(InfoFileUploadResp)
-	err := c.cc.Invoke(ctx, "/consumer.consumer/InfoFileUpload", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/consumer.consumerClient/InfoFileUpload", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-func (c *consumerClient) InfoFileDel(ctx context.Context, in *InfoFileDelReq, opts ...grpc.CallOption) (*BaseResp, error) {
+func (c *consumerClientClient) InfoFileDel(ctx context.Context, in *InfoFileDelReq, opts ...grpc.CallOption) (*BaseResp, error) {
 	out := new(BaseResp)
-	err := c.cc.Invoke(ctx, "/consumer.consumer/InfoFileDel", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/consumer.consumerClient/InfoFileDel", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-// ConsumerServer is the server API for Consumer service.
-// All implementations must embed UnimplementedConsumerServer
+// ConsumerClientServer is the server API for ConsumerClient service.
+// All implementations must embed UnimplementedConsumerClientServer
 // for forward compatibility
-type ConsumerServer interface {
+type ConsumerClientServer interface {
 	//发布信息
 	PublishInfo(context.Context, *PublishInfoReq) (*PublishInfoResp, error)
 	//根据用户id获取当月已发布信息数量
@@ -166,282 +166,282 @@ type ConsumerServer interface {
 	InfoFileUpload(context.Context, *InfoFileUploadReq) (*InfoFileUploadResp, error)
 	//删除附件
 	InfoFileDel(context.Context, *InfoFileDelReq) (*BaseResp, error)
-	mustEmbedUnimplementedConsumerServer()
+	mustEmbedUnimplementedConsumerClientServer()
 }
 
-// UnimplementedConsumerServer must be embedded to have forward compatible implementations.
-type UnimplementedConsumerServer struct {
+// UnimplementedConsumerClientServer must be embedded to have forward compatible implementations.
+type UnimplementedConsumerClientServer struct {
 }
 
-func (UnimplementedConsumerServer) PublishInfo(context.Context, *PublishInfoReq) (*PublishInfoResp, error) {
+func (UnimplementedConsumerClientServer) PublishInfo(context.Context, *PublishInfoReq) (*PublishInfoResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method PublishInfo not implemented")
 }
-func (UnimplementedConsumerServer) InfoByUserId(context.Context, *UserIdReq) (*InfoByUserIdResp, error) {
+func (UnimplementedConsumerClientServer) InfoByUserId(context.Context, *UserIdReq) (*InfoByUserIdResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method InfoByUserId not implemented")
 }
-func (UnimplementedConsumerServer) InfoRelated(context.Context, *UserIdReq) (*InfoRelatedResp, error) {
+func (UnimplementedConsumerClientServer) InfoRelated(context.Context, *UserIdReq) (*InfoRelatedResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method InfoRelated not implemented")
 }
-func (UnimplementedConsumerServer) MyPublishList(context.Context, *MyPublishListReq) (*MyPublishListResp, error) {
+func (UnimplementedConsumerClientServer) MyPublishList(context.Context, *MyPublishListReq) (*MyPublishListResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method MyPublishList not implemented")
 }
-func (UnimplementedConsumerServer) InfoChange(context.Context, *InfoDetailReq) (*InfoDetailResp, error) {
+func (UnimplementedConsumerClientServer) InfoChange(context.Context, *InfoDetailReq) (*InfoDetailResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method InfoChange not implemented")
 }
-func (UnimplementedConsumerServer) StatusQuery(context.Context, *StatusReq) (*StatusResp, error) {
+func (UnimplementedConsumerClientServer) StatusQuery(context.Context, *StatusReq) (*StatusResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method StatusQuery not implemented")
 }
-func (UnimplementedConsumerServer) SupplyInfoSearch(context.Context, *SupplyInfoSearchReq) (*SupplyInfoSearchResp, error) {
+func (UnimplementedConsumerClientServer) SupplyInfoSearch(context.Context, *SupplyInfoSearchReq) (*SupplyInfoSearchResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method SupplyInfoSearch not implemented")
 }
-func (UnimplementedConsumerServer) SupplyInfoDetail(context.Context, *StatusReq) (*SupplyInfoDetailResp, error) {
+func (UnimplementedConsumerClientServer) SupplyInfoDetail(context.Context, *StatusReq) (*SupplyInfoDetailResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method SupplyInfoDetail not implemented")
 }
-func (UnimplementedConsumerServer) InfoFileUpload(context.Context, *InfoFileUploadReq) (*InfoFileUploadResp, error) {
+func (UnimplementedConsumerClientServer) InfoFileUpload(context.Context, *InfoFileUploadReq) (*InfoFileUploadResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method InfoFileUpload not implemented")
 }
-func (UnimplementedConsumerServer) InfoFileDel(context.Context, *InfoFileDelReq) (*BaseResp, error) {
+func (UnimplementedConsumerClientServer) InfoFileDel(context.Context, *InfoFileDelReq) (*BaseResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method InfoFileDel not implemented")
 }
-func (UnimplementedConsumerServer) mustEmbedUnimplementedConsumerServer() {}
+func (UnimplementedConsumerClientServer) mustEmbedUnimplementedConsumerClientServer() {}
 
-// UnsafeConsumerServer may be embedded to opt out of forward compatibility for this service.
-// Use of this interface is not recommended, as added methods to ConsumerServer will
+// UnsafeConsumerClientServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to ConsumerClientServer will
 // result in compilation errors.
-type UnsafeConsumerServer interface {
-	mustEmbedUnimplementedConsumerServer()
+type UnsafeConsumerClientServer interface {
+	mustEmbedUnimplementedConsumerClientServer()
 }
 
-func RegisterConsumerServer(s grpc.ServiceRegistrar, srv ConsumerServer) {
-	s.RegisterService(&Consumer_ServiceDesc, srv)
+func RegisterConsumerClientServer(s grpc.ServiceRegistrar, srv ConsumerClientServer) {
+	s.RegisterService(&ConsumerClient_ServiceDesc, srv)
 }
 
-func _Consumer_PublishInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _ConsumerClient_PublishInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(PublishInfoReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(ConsumerServer).PublishInfo(ctx, in)
+		return srv.(ConsumerClientServer).PublishInfo(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/consumer.consumer/PublishInfo",
+		FullMethod: "/consumer.consumerClient/PublishInfo",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ConsumerServer).PublishInfo(ctx, req.(*PublishInfoReq))
+		return srv.(ConsumerClientServer).PublishInfo(ctx, req.(*PublishInfoReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Consumer_InfoByUserId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _ConsumerClient_InfoByUserId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(UserIdReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(ConsumerServer).InfoByUserId(ctx, in)
+		return srv.(ConsumerClientServer).InfoByUserId(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/consumer.consumer/InfoByUserId",
+		FullMethod: "/consumer.consumerClient/InfoByUserId",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ConsumerServer).InfoByUserId(ctx, req.(*UserIdReq))
+		return srv.(ConsumerClientServer).InfoByUserId(ctx, req.(*UserIdReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Consumer_InfoRelated_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _ConsumerClient_InfoRelated_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(UserIdReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(ConsumerServer).InfoRelated(ctx, in)
+		return srv.(ConsumerClientServer).InfoRelated(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/consumer.consumer/InfoRelated",
+		FullMethod: "/consumer.consumerClient/InfoRelated",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ConsumerServer).InfoRelated(ctx, req.(*UserIdReq))
+		return srv.(ConsumerClientServer).InfoRelated(ctx, req.(*UserIdReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Consumer_MyPublishList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _ConsumerClient_MyPublishList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(MyPublishListReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(ConsumerServer).MyPublishList(ctx, in)
+		return srv.(ConsumerClientServer).MyPublishList(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/consumer.consumer/MyPublishList",
+		FullMethod: "/consumer.consumerClient/MyPublishList",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ConsumerServer).MyPublishList(ctx, req.(*MyPublishListReq))
+		return srv.(ConsumerClientServer).MyPublishList(ctx, req.(*MyPublishListReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Consumer_InfoChange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _ConsumerClient_InfoChange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(InfoDetailReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(ConsumerServer).InfoChange(ctx, in)
+		return srv.(ConsumerClientServer).InfoChange(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/consumer.consumer/InfoChange",
+		FullMethod: "/consumer.consumerClient/InfoChange",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ConsumerServer).InfoChange(ctx, req.(*InfoDetailReq))
+		return srv.(ConsumerClientServer).InfoChange(ctx, req.(*InfoDetailReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Consumer_StatusQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _ConsumerClient_StatusQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(StatusReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(ConsumerServer).StatusQuery(ctx, in)
+		return srv.(ConsumerClientServer).StatusQuery(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/consumer.consumer/StatusQuery",
+		FullMethod: "/consumer.consumerClient/StatusQuery",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ConsumerServer).StatusQuery(ctx, req.(*StatusReq))
+		return srv.(ConsumerClientServer).StatusQuery(ctx, req.(*StatusReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Consumer_SupplyInfoSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _ConsumerClient_SupplyInfoSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(SupplyInfoSearchReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(ConsumerServer).SupplyInfoSearch(ctx, in)
+		return srv.(ConsumerClientServer).SupplyInfoSearch(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/consumer.consumer/SupplyInfoSearch",
+		FullMethod: "/consumer.consumerClient/SupplyInfoSearch",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ConsumerServer).SupplyInfoSearch(ctx, req.(*SupplyInfoSearchReq))
+		return srv.(ConsumerClientServer).SupplyInfoSearch(ctx, req.(*SupplyInfoSearchReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Consumer_SupplyInfoDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _ConsumerClient_SupplyInfoDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(StatusReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(ConsumerServer).SupplyInfoDetail(ctx, in)
+		return srv.(ConsumerClientServer).SupplyInfoDetail(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/consumer.consumer/supplyInfoDetail",
+		FullMethod: "/consumer.consumerClient/supplyInfoDetail",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ConsumerServer).SupplyInfoDetail(ctx, req.(*StatusReq))
+		return srv.(ConsumerClientServer).SupplyInfoDetail(ctx, req.(*StatusReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Consumer_InfoFileUpload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _ConsumerClient_InfoFileUpload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(InfoFileUploadReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(ConsumerServer).InfoFileUpload(ctx, in)
+		return srv.(ConsumerClientServer).InfoFileUpload(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/consumer.consumer/InfoFileUpload",
+		FullMethod: "/consumer.consumerClient/InfoFileUpload",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ConsumerServer).InfoFileUpload(ctx, req.(*InfoFileUploadReq))
+		return srv.(ConsumerClientServer).InfoFileUpload(ctx, req.(*InfoFileUploadReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Consumer_InfoFileDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _ConsumerClient_InfoFileDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(InfoFileDelReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(ConsumerServer).InfoFileDel(ctx, in)
+		return srv.(ConsumerClientServer).InfoFileDel(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/consumer.consumer/InfoFileDel",
+		FullMethod: "/consumer.consumerClient/InfoFileDel",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ConsumerServer).InfoFileDel(ctx, req.(*InfoFileDelReq))
+		return srv.(ConsumerClientServer).InfoFileDel(ctx, req.(*InfoFileDelReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-// Consumer_ServiceDesc is the grpc.ServiceDesc for Consumer service.
+// ConsumerClient_ServiceDesc is the grpc.ServiceDesc for ConsumerClient service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
-var Consumer_ServiceDesc = grpc.ServiceDesc{
-	ServiceName: "consumer.consumer",
-	HandlerType: (*ConsumerServer)(nil),
+var ConsumerClient_ServiceDesc = grpc.ServiceDesc{
+	ServiceName: "consumer.consumerClient",
+	HandlerType: (*ConsumerClientServer)(nil),
 	Methods: []grpc.MethodDesc{
 		{
 			MethodName: "PublishInfo",
-			Handler:    _Consumer_PublishInfo_Handler,
+			Handler:    _ConsumerClient_PublishInfo_Handler,
 		},
 		{
 			MethodName: "InfoByUserId",
-			Handler:    _Consumer_InfoByUserId_Handler,
+			Handler:    _ConsumerClient_InfoByUserId_Handler,
 		},
 		{
 			MethodName: "InfoRelated",
-			Handler:    _Consumer_InfoRelated_Handler,
+			Handler:    _ConsumerClient_InfoRelated_Handler,
 		},
 		{
 			MethodName: "MyPublishList",
-			Handler:    _Consumer_MyPublishList_Handler,
+			Handler:    _ConsumerClient_MyPublishList_Handler,
 		},
 		{
 			MethodName: "InfoChange",
-			Handler:    _Consumer_InfoChange_Handler,
+			Handler:    _ConsumerClient_InfoChange_Handler,
 		},
 		{
 			MethodName: "StatusQuery",
-			Handler:    _Consumer_StatusQuery_Handler,
+			Handler:    _ConsumerClient_StatusQuery_Handler,
 		},
 		{
 			MethodName: "SupplyInfoSearch",
-			Handler:    _Consumer_SupplyInfoSearch_Handler,
+			Handler:    _ConsumerClient_SupplyInfoSearch_Handler,
 		},
 		{
 			MethodName: "supplyInfoDetail",
-			Handler:    _Consumer_SupplyInfoDetail_Handler,
+			Handler:    _ConsumerClient_SupplyInfoDetail_Handler,
 		},
 		{
 			MethodName: "InfoFileUpload",
-			Handler:    _Consumer_InfoFileUpload_Handler,
+			Handler:    _ConsumerClient_InfoFileUpload_Handler,
 		},
 		{
 			MethodName: "InfoFileDel",
-			Handler:    _Consumer_InfoFileDel_Handler,
+			Handler:    _ConsumerClient_InfoFileDel_Handler,
 		},
 	},
 	Streams:  []grpc.StreamDesc{},

+ 1 - 0
rpc/manager/go_build_manager_go_linux_linux

@@ -0,0 +1 @@
+ELF

+ 31 - 0
rpc/manager/internal/logic/infoonekeyactionlogic.go

@@ -0,0 +1,31 @@
+package logic
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jyInfo/rpc/manager/internal/svc"
+	"app.yhyue.com/moapp/jyInfo/rpc/manager/type/manager"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type InfoOneKeyActionLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewInfoOneKeyActionLogic(ctx context.Context, svcCtx *svc.ServiceContext) *InfoOneKeyActionLogic {
+	return &InfoOneKeyActionLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 管理后台一键操作
+func (l *InfoOneKeyActionLogic) InfoOneKeyAction(in *manager.OneKeyActionReq) (*manager.InfoResp, error) {
+	// todo: add your logic here and delete this line
+
+	return &manager.InfoResp{}, nil
+}

+ 53 - 0
rpc/manager/internal/server/managerclientserver.go

@@ -0,0 +1,53 @@
+// Code generated by goctl. DO NOT EDIT!
+// Source: manager.proto
+
+package server
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jyInfo/rpc/manager/internal/logic"
+	"app.yhyue.com/moapp/jyInfo/rpc/manager/internal/svc"
+	"app.yhyue.com/moapp/jyInfo/rpc/manager/type/manager"
+)
+
+type ManagerClientServer struct {
+	svcCtx *svc.ServiceContext
+	manager.UnimplementedManagerClientServer
+}
+
+func NewManagerClientServer(svcCtx *svc.ServiceContext) *ManagerClientServer {
+	return &ManagerClientServer{
+		svcCtx: svcCtx,
+	}
+}
+
+// 信息列表
+func (s *ManagerClientServer) InfoList(ctx context.Context, in *manager.InfoListReq) (*manager.InfoListResp, error) {
+	l := logic.NewInfoListLogic(ctx, s.svcCtx)
+	return l.InfoList(in)
+}
+
+// 信息详情
+func (s *ManagerClientServer) InfoDetail(ctx context.Context, in *manager.InfoDetailReq) (*manager.InfoDetailResp, error) {
+	l := logic.NewInfoDetailLogic(ctx, s.svcCtx)
+	return l.InfoDetail(in)
+}
+
+// 信息审核
+func (s *ManagerClientServer) InfoExamine(ctx context.Context, in *manager.InfoExamineReq) (*manager.InfoExamineResp, error) {
+	l := logic.NewInfoExamineLogic(ctx, s.svcCtx)
+	return l.InfoExamine(in)
+}
+
+// 管理后台机构冻结
+func (s *ManagerClientServer) InstitutionsFreeze(ctx context.Context, in *manager.InstitutionsFreezeReq) (*manager.InfoResp, error) {
+	l := logic.NewInstitutionsFreezeLogic(ctx, s.svcCtx)
+	return l.InstitutionsFreeze(in)
+}
+
+// 管理后台一键操作
+func (s *ManagerClientServer) InfoOneKeyAction(ctx context.Context, in *manager.OneKeyActionReq) (*manager.InfoResp, error) {
+	l := logic.NewInfoOneKeyActionLogic(ctx, s.svcCtx)
+	return l.InfoOneKeyAction(in)
+}

+ 0 - 47
rpc/manager/internal/server/managerserver.go

@@ -1,47 +0,0 @@
-// Code generated by goctl. DO NOT EDIT!
-// Source: manager.proto
-
-package server
-
-import (
-	"context"
-
-	"app.yhyue.com/moapp/jyInfo/rpc/manager/internal/logic"
-	"app.yhyue.com/moapp/jyInfo/rpc/manager/internal/svc"
-	"app.yhyue.com/moapp/jyInfo/rpc/manager/type/manager"
-)
-
-type ManagerServer struct {
-	svcCtx *svc.ServiceContext
-	manager.UnimplementedManagerServer
-}
-
-func NewManagerServer(svcCtx *svc.ServiceContext) *ManagerServer {
-	return &ManagerServer{
-		svcCtx: svcCtx,
-	}
-}
-
-// 信息列表
-func (s *ManagerServer) InfoList(ctx context.Context, in *manager.InfoListReq) (*manager.InfoListResp, error) {
-	l := logic.NewInfoListLogic(ctx, s.svcCtx)
-	return l.InfoList(in)
-}
-
-// 信息详情
-func (s *ManagerServer) InfoDetail(ctx context.Context, in *manager.InfoDetailReq) (*manager.InfoDetailResp, error) {
-	l := logic.NewInfoDetailLogic(ctx, s.svcCtx)
-	return l.InfoDetail(in)
-}
-
-// 信息审核
-func (s *ManagerServer) InfoExamine(ctx context.Context, in *manager.InfoExamineReq) (*manager.InfoExamineResp, error) {
-	l := logic.NewInfoExamineLogic(ctx, s.svcCtx)
-	return l.InfoExamine(in)
-}
-
-// 管理后台机构冻结
-func (s *ManagerServer) InstitutionsFreeze(ctx context.Context, in *manager.InstitutionsFreezeReq) (*manager.InfoResp, error) {
-	l := logic.NewInstitutionsFreezeLogic(ctx, s.svcCtx)
-	return l.InstitutionsFreeze(in)
-}

BIN
rpc/manager/manager.exe


+ 2 - 2
rpc/manager/manager.go

@@ -30,10 +30,10 @@ func main() {
 	}()
 
 	ctx := svc.NewServiceContext(IC.C)
-	svr := server.NewManagerServer(ctx)
+	svr := server.NewManagerClientServer(ctx)
 
 	s := zrpc.MustNewServer(IC.C.RpcServerConf, func(grpcServer *grpc.Server) {
-		manager.RegisterManagerServer(grpcServer, svr)
+		manager.RegisterManagerClientServer(grpcServer, svr)
 
 		if IC.C.Mode == service.DevMode || IC.C.Mode == service.TestMode {
 			reflection.Register(grpcServer)

+ 15 - 5
rpc/manager/manager.proto

@@ -147,14 +147,24 @@ message InstitutionsFreezeReq {
 	string appId = 1;//
 	int64 entId = 2;//
 }
+//一键操作 1:敏感词过滤;2:发布信息;3:删除等
+message  OneKeyActionReq{
+	string  appId = 1;//jy:10000
+	string  userId = 2;//用户id
+	string  msgType = 3;//信息类型 1:招标信息 2:采购信息 3:供应信息
+	string  msgId = 4;//信息id
+	int64  type = 5;//1:管理后台一键敏感词过滤;2:管理后台一键发布;3管理后台一键删除;
+}
 //
-service manager {
+service managerClient {
 	//信息列表
-  	rpc InfoList(InfoListReq) returns(InfoListResp);
+	rpc InfoList(InfoListReq) returns(InfoListResp);
 	//信息详情
-		rpc InfoDetail(InfoDetailReq) returns(InfoDetailResp);
+	rpc InfoDetail(InfoDetailReq) returns(InfoDetailResp);
 	//信息审核
-		rpc InfoExamine(InfoExamineReq) returns(InfoExamineResp);
+	rpc InfoExamine(InfoExamineReq) returns(InfoExamineResp);
 	//管理后台机构冻结
-		rpc InstitutionsFreeze(InstitutionsFreezeReq) returns(InfoResp);
+	rpc InstitutionsFreeze(InstitutionsFreezeReq) returns(InfoResp);
+	//管理后台一键操作
+	rpc InfoOneKeyAction(OneKeyActionReq) returns(InfoResp);
 }

+ 22 - 13
rpc/manager/manager/manager.go → rpc/manager/managerclient/managerclient.go

@@ -1,7 +1,7 @@
 // Code generated by goctl. DO NOT EDIT!
 // Source: manager.proto
 
-package manager
+package managerclient
 
 import (
 	"context"
@@ -27,11 +27,12 @@ type (
 	InfoListResp          = manager.InfoListResp
 	InfoResp              = manager.InfoResp
 	InstitutionsFreezeReq = manager.InstitutionsFreezeReq
+	OneKeyActionReq       = manager.OneKeyActionReq
 	Related               = manager.Related
 	Review                = manager.Review
 	Sensitive             = manager.Sensitive
 
-	Manager interface {
+	ManagerClient interface {
 		// 信息列表
 		InfoList(ctx context.Context, in *InfoListReq, opts ...grpc.CallOption) (*InfoListResp, error)
 		// 信息详情
@@ -40,39 +41,47 @@ type (
 		InfoExamine(ctx context.Context, in *InfoExamineReq, opts ...grpc.CallOption) (*InfoExamineResp, error)
 		// 管理后台机构冻结
 		InstitutionsFreeze(ctx context.Context, in *InstitutionsFreezeReq, opts ...grpc.CallOption) (*InfoResp, error)
+		// 管理后台一键操作
+		InfoOneKeyAction(ctx context.Context, in *OneKeyActionReq, opts ...grpc.CallOption) (*InfoResp, error)
 	}
 
-	defaultManager struct {
+	defaultManagerClient struct {
 		cli zrpc.Client
 	}
 )
 
-func NewManager(cli zrpc.Client) Manager {
-	return &defaultManager{
+func NewManagerClient(cli zrpc.Client) ManagerClient {
+	return &defaultManagerClient{
 		cli: cli,
 	}
 }
 
 // 信息列表
-func (m *defaultManager) InfoList(ctx context.Context, in *InfoListReq, opts ...grpc.CallOption) (*InfoListResp, error) {
-	client := manager.NewManagerClient(m.cli.Conn())
+func (m *defaultManagerClient) InfoList(ctx context.Context, in *InfoListReq, opts ...grpc.CallOption) (*InfoListResp, error) {
+	client := manager.NewManagerClientClient(m.cli.Conn())
 	return client.InfoList(ctx, in, opts...)
 }
 
 // 信息详情
-func (m *defaultManager) InfoDetail(ctx context.Context, in *InfoDetailReq, opts ...grpc.CallOption) (*InfoDetailResp, error) {
-	client := manager.NewManagerClient(m.cli.Conn())
+func (m *defaultManagerClient) InfoDetail(ctx context.Context, in *InfoDetailReq, opts ...grpc.CallOption) (*InfoDetailResp, error) {
+	client := manager.NewManagerClientClient(m.cli.Conn())
 	return client.InfoDetail(ctx, in, opts...)
 }
 
 // 信息审核
-func (m *defaultManager) InfoExamine(ctx context.Context, in *InfoExamineReq, opts ...grpc.CallOption) (*InfoExamineResp, error) {
-	client := manager.NewManagerClient(m.cli.Conn())
+func (m *defaultManagerClient) InfoExamine(ctx context.Context, in *InfoExamineReq, opts ...grpc.CallOption) (*InfoExamineResp, error) {
+	client := manager.NewManagerClientClient(m.cli.Conn())
 	return client.InfoExamine(ctx, in, opts...)
 }
 
 // 管理后台机构冻结
-func (m *defaultManager) InstitutionsFreeze(ctx context.Context, in *InstitutionsFreezeReq, opts ...grpc.CallOption) (*InfoResp, error) {
-	client := manager.NewManagerClient(m.cli.Conn())
+func (m *defaultManagerClient) InstitutionsFreeze(ctx context.Context, in *InstitutionsFreezeReq, opts ...grpc.CallOption) (*InfoResp, error) {
+	client := manager.NewManagerClientClient(m.cli.Conn())
 	return client.InstitutionsFreeze(ctx, in, opts...)
 }
+
+// 管理后台一键操作
+func (m *defaultManagerClient) InfoOneKeyAction(ctx context.Context, in *OneKeyActionReq, opts ...grpc.CallOption) (*InfoResp, error) {
+	client := manager.NewManagerClientClient(m.cli.Conn())
+	return client.InfoOneKeyAction(ctx, in, opts...)
+}

+ 149 - 36
rpc/manager/type/manager/manager.pb.go

@@ -1,12 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.28.0
-// 	protoc        v3.19.4
+// 	protoc-gen-go v1.23.0
+// 	protoc        v3.15.5
 // source: manager.proto
 
 package manager
 
 import (
+	proto "github.com/golang/protobuf/proto"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
 	reflect "reflect"
@@ -20,6 +21,10 @@ 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
+
 //信息列表Req
 type InfoListReq struct {
 	state         protoimpl.MessageState
@@ -1340,6 +1345,86 @@ func (x *InstitutionsFreezeReq) GetEntId() int64 {
 	return 0
 }
 
+//一键操作 1:敏感词过滤;2:发布信息;3:删除等
+type OneKeyActionReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	AppId   string `protobuf:"bytes,1,opt,name=appId,proto3" json:"appId,omitempty"`     //jy:10000
+	UserId  string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"`   //用户id
+	MsgType string `protobuf:"bytes,3,opt,name=msgType,proto3" json:"msgType,omitempty"` //信息类型 1:招标信息 2:采购信息 3:供应信息
+	MsgId   string `protobuf:"bytes,4,opt,name=msgId,proto3" json:"msgId,omitempty"`     //信息id
+	Type    int64  `protobuf:"varint,5,opt,name=type,proto3" json:"type,omitempty"`      //1:管理后台一键敏感词过滤;2:管理后台一键发布;3管理后台一键删除;
+}
+
+func (x *OneKeyActionReq) Reset() {
+	*x = OneKeyActionReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_manager_proto_msgTypes[16]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *OneKeyActionReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OneKeyActionReq) ProtoMessage() {}
+
+func (x *OneKeyActionReq) ProtoReflect() protoreflect.Message {
+	mi := &file_manager_proto_msgTypes[16]
+	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 OneKeyActionReq.ProtoReflect.Descriptor instead.
+func (*OneKeyActionReq) Descriptor() ([]byte, []int) {
+	return file_manager_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *OneKeyActionReq) GetAppId() string {
+	if x != nil {
+		return x.AppId
+	}
+	return ""
+}
+
+func (x *OneKeyActionReq) GetUserId() string {
+	if x != nil {
+		return x.UserId
+	}
+	return ""
+}
+
+func (x *OneKeyActionReq) GetMsgType() string {
+	if x != nil {
+		return x.MsgType
+	}
+	return ""
+}
+
+func (x *OneKeyActionReq) GetMsgId() string {
+	if x != nil {
+		return x.MsgId
+	}
+	return ""
+}
+
+func (x *OneKeyActionReq) GetType() int64 {
+	if x != nil {
+		return x.Type
+	}
+	return 0
+}
+
 type InfoExamineResp_Data struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -1351,7 +1436,7 @@ type InfoExamineResp_Data struct {
 func (x *InfoExamineResp_Data) Reset() {
 	*x = InfoExamineResp_Data{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_manager_proto_msgTypes[16]
+		mi := &file_manager_proto_msgTypes[17]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -1364,7 +1449,7 @@ func (x *InfoExamineResp_Data) String() string {
 func (*InfoExamineResp_Data) ProtoMessage() {}
 
 func (x *InfoExamineResp_Data) ProtoReflect() protoreflect.Message {
-	mi := &file_manager_proto_msgTypes[16]
+	mi := &file_manager_proto_msgTypes[17]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -1553,25 +1638,38 @@ var file_manager_proto_rawDesc = []byte{
 	0x6f, 0x6e, 0x73, 0x46, 0x72, 0x65, 0x65, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05,
 	0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70,
 	0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x32, 0x8c, 0x02, 0x0a, 0x07, 0x6d, 0x61, 0x6e,
-	0x61, 0x67, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x08, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74,
-	0x12, 0x14, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x4c,
-	0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
-	0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a,
-	0x0a, 0x49, 0x6e, 0x66, 0x6f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x16, 0x2e, 0x6d, 0x61,
-	0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c,
-	0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e,
-	0x66, 0x6f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0b,
-	0x49, 0x6e, 0x66, 0x6f, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x12, 0x17, 0x2e, 0x6d, 0x61,
-	0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e,
-	0x65, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49,
-	0x6e, 0x66, 0x6f, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x47,
-	0x0a, 0x12, 0x49, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x72,
-	0x65, 0x65, 0x7a, 0x65, 0x12, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49,
-	0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x72, 0x65, 0x65, 0x7a,
-	0x65, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49,
-	0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x6d, 0x61, 0x6e,
-	0x61, 0x67, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x0f, 0x4f, 0x6e, 0x65,
+	0x4b, 0x65, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05,
+	0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70,
+	0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73,
+	0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x73, 0x67,
+	0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x18, 0x04, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79,
+	0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x32, 0xd3,
+	0x02, 0x0a, 0x0d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74,
+	0x12, 0x37, 0x0a, 0x08, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x2e, 0x6d,
+	0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52,
+	0x65, 0x71, 0x1a, 0x15, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66,
+	0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a, 0x0a, 0x49, 0x6e, 0x66,
+	0x6f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x16, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
+	0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a,
+	0x17, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x44, 0x65,
+	0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0b, 0x49, 0x6e, 0x66, 0x6f,
+	0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x12, 0x17, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
+	0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71,
+	0x1a, 0x18, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x45,
+	0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x47, 0x0a, 0x12, 0x49, 0x6e,
+	0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x72, 0x65, 0x65, 0x7a, 0x65,
+	0x12, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x69,
+	0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x72, 0x65, 0x65, 0x7a, 0x65, 0x52, 0x65, 0x71,
+	0x1a, 0x11, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52,
+	0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x10, 0x49, 0x6e, 0x66, 0x6f, 0x4f, 0x6e, 0x65, 0x4b, 0x65,
+	0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
+	0x72, 0x2e, 0x4f, 0x6e, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
+	0x71, 0x1a, 0x11, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x66, 0x6f,
+	0x52, 0x65, 0x73, 0x70, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
+	0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -1586,7 +1684,7 @@ func file_manager_proto_rawDescGZIP() []byte {
 	return file_manager_proto_rawDescData
 }
 
-var file_manager_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
+var file_manager_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
 var file_manager_proto_goTypes = []interface{}{
 	(*InfoListReq)(nil),           // 0: manager.InfoListReq
 	(*InfoListResp)(nil),          // 1: manager.InfoListResp
@@ -1604,7 +1702,8 @@ var file_manager_proto_goTypes = []interface{}{
 	(*InfoExamineResp)(nil),       // 13: manager.InfoExamineResp
 	(*InfoResp)(nil),              // 14: manager.InfoResp
 	(*InstitutionsFreezeReq)(nil), // 15: manager.InstitutionsFreezeReq
-	(*InfoExamineResp_Data)(nil),  // 16: manager.InfoExamineResp.Data
+	(*OneKeyActionReq)(nil),       // 16: manager.OneKeyActionReq
+	(*InfoExamineResp_Data)(nil),  // 17: manager.InfoExamineResp.Data
 }
 var file_manager_proto_depIdxs = []int32{
 	2,  // 0: manager.InfoListResp.data:type_name -> manager.Data
@@ -1616,16 +1715,18 @@ var file_manager_proto_depIdxs = []int32{
 	7,  // 6: manager.InfoData.Contact:type_name -> manager.Contact
 	11, // 7: manager.InfoData.sensitive:type_name -> manager.Sensitive
 	8,  // 8: manager.InfoData.Related:type_name -> manager.Related
-	0,  // 9: manager.manager.InfoList:input_type -> manager.InfoListReq
-	4,  // 10: manager.manager.InfoDetail:input_type -> manager.InfoDetailReq
-	12, // 11: manager.manager.InfoExamine:input_type -> manager.InfoExamineReq
-	15, // 12: manager.manager.InstitutionsFreeze:input_type -> manager.InstitutionsFreezeReq
-	1,  // 13: manager.manager.InfoList:output_type -> manager.InfoListResp
-	5,  // 14: manager.manager.InfoDetail:output_type -> manager.InfoDetailResp
-	13, // 15: manager.manager.InfoExamine:output_type -> manager.InfoExamineResp
-	14, // 16: manager.manager.InstitutionsFreeze:output_type -> manager.InfoResp
-	13, // [13:17] is the sub-list for method output_type
-	9,  // [9:13] is the sub-list for method input_type
+	0,  // 9: manager.managerClient.InfoList:input_type -> manager.InfoListReq
+	4,  // 10: manager.managerClient.InfoDetail:input_type -> manager.InfoDetailReq
+	12, // 11: manager.managerClient.InfoExamine:input_type -> manager.InfoExamineReq
+	15, // 12: manager.managerClient.InstitutionsFreeze:input_type -> manager.InstitutionsFreezeReq
+	16, // 13: manager.managerClient.InfoOneKeyAction:input_type -> manager.OneKeyActionReq
+	1,  // 14: manager.managerClient.InfoList:output_type -> manager.InfoListResp
+	5,  // 15: manager.managerClient.InfoDetail:output_type -> manager.InfoDetailResp
+	13, // 16: manager.managerClient.InfoExamine:output_type -> manager.InfoExamineResp
+	14, // 17: manager.managerClient.InstitutionsFreeze:output_type -> manager.InfoResp
+	14, // 18: manager.managerClient.InfoOneKeyAction:output_type -> manager.InfoResp
+	14, // [14:19] is the sub-list for method output_type
+	9,  // [9:14] is the sub-list for method input_type
 	9,  // [9:9] is the sub-list for extension type_name
 	9,  // [9:9] is the sub-list for extension extendee
 	0,  // [0:9] is the sub-list for field type_name
@@ -1830,6 +1931,18 @@ func file_manager_proto_init() {
 			}
 		}
 		file_manager_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*OneKeyActionReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_manager_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*InfoExamineResp_Data); i {
 			case 0:
 				return &v.state
@@ -1848,7 +1961,7 @@ func file_manager_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_manager_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   17,
+			NumMessages:   18,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 93 - 55
rpc/manager/type/manager/manager_grpc.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
 // - protoc-gen-go-grpc v1.2.0
-// - protoc             v3.19.4
+// - protoc             v3.15.5
 // source: manager.proto
 
 package manager
@@ -18,10 +18,10 @@ import (
 // Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 
-// ManagerClient is the client API for Manager service.
+// ManagerClientClient is the client API for ManagerClient service.
 //
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
-type ManagerClient interface {
+type ManagerClientClient interface {
 	//信息列表
 	InfoList(ctx context.Context, in *InfoListReq, opts ...grpc.CallOption) (*InfoListResp, error)
 	//信息详情
@@ -30,56 +30,67 @@ type ManagerClient interface {
 	InfoExamine(ctx context.Context, in *InfoExamineReq, opts ...grpc.CallOption) (*InfoExamineResp, error)
 	//管理后台机构冻结
 	InstitutionsFreeze(ctx context.Context, in *InstitutionsFreezeReq, opts ...grpc.CallOption) (*InfoResp, error)
+	//管理后台一键操作
+	InfoOneKeyAction(ctx context.Context, in *OneKeyActionReq, opts ...grpc.CallOption) (*InfoResp, error)
 }
 
-type managerClient struct {
+type managerClientClient struct {
 	cc grpc.ClientConnInterface
 }
 
-func NewManagerClient(cc grpc.ClientConnInterface) ManagerClient {
-	return &managerClient{cc}
+func NewManagerClientClient(cc grpc.ClientConnInterface) ManagerClientClient {
+	return &managerClientClient{cc}
 }
 
-func (c *managerClient) InfoList(ctx context.Context, in *InfoListReq, opts ...grpc.CallOption) (*InfoListResp, error) {
+func (c *managerClientClient) InfoList(ctx context.Context, in *InfoListReq, opts ...grpc.CallOption) (*InfoListResp, error) {
 	out := new(InfoListResp)
-	err := c.cc.Invoke(ctx, "/manager.manager/InfoList", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/manager.managerClient/InfoList", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-func (c *managerClient) InfoDetail(ctx context.Context, in *InfoDetailReq, opts ...grpc.CallOption) (*InfoDetailResp, error) {
+func (c *managerClientClient) InfoDetail(ctx context.Context, in *InfoDetailReq, opts ...grpc.CallOption) (*InfoDetailResp, error) {
 	out := new(InfoDetailResp)
-	err := c.cc.Invoke(ctx, "/manager.manager/InfoDetail", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/manager.managerClient/InfoDetail", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-func (c *managerClient) InfoExamine(ctx context.Context, in *InfoExamineReq, opts ...grpc.CallOption) (*InfoExamineResp, error) {
+func (c *managerClientClient) InfoExamine(ctx context.Context, in *InfoExamineReq, opts ...grpc.CallOption) (*InfoExamineResp, error) {
 	out := new(InfoExamineResp)
-	err := c.cc.Invoke(ctx, "/manager.manager/InfoExamine", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/manager.managerClient/InfoExamine", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-func (c *managerClient) InstitutionsFreeze(ctx context.Context, in *InstitutionsFreezeReq, opts ...grpc.CallOption) (*InfoResp, error) {
+func (c *managerClientClient) InstitutionsFreeze(ctx context.Context, in *InstitutionsFreezeReq, opts ...grpc.CallOption) (*InfoResp, error) {
 	out := new(InfoResp)
-	err := c.cc.Invoke(ctx, "/manager.manager/InstitutionsFreeze", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/manager.managerClient/InstitutionsFreeze", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-// ManagerServer is the server API for Manager service.
-// All implementations must embed UnimplementedManagerServer
+func (c *managerClientClient) InfoOneKeyAction(ctx context.Context, in *OneKeyActionReq, opts ...grpc.CallOption) (*InfoResp, error) {
+	out := new(InfoResp)
+	err := c.cc.Invoke(ctx, "/manager.managerClient/InfoOneKeyAction", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// ManagerClientServer is the server API for ManagerClient service.
+// All implementations must embed UnimplementedManagerClientServer
 // for forward compatibility
-type ManagerServer interface {
+type ManagerClientServer interface {
 	//信息列表
 	InfoList(context.Context, *InfoListReq) (*InfoListResp, error)
 	//信息详情
@@ -88,132 +99,159 @@ type ManagerServer interface {
 	InfoExamine(context.Context, *InfoExamineReq) (*InfoExamineResp, error)
 	//管理后台机构冻结
 	InstitutionsFreeze(context.Context, *InstitutionsFreezeReq) (*InfoResp, error)
-	mustEmbedUnimplementedManagerServer()
+	//管理后台一键操作
+	InfoOneKeyAction(context.Context, *OneKeyActionReq) (*InfoResp, error)
+	mustEmbedUnimplementedManagerClientServer()
 }
 
-// UnimplementedManagerServer must be embedded to have forward compatible implementations.
-type UnimplementedManagerServer struct {
+// UnimplementedManagerClientServer must be embedded to have forward compatible implementations.
+type UnimplementedManagerClientServer struct {
 }
 
-func (UnimplementedManagerServer) InfoList(context.Context, *InfoListReq) (*InfoListResp, error) {
+func (UnimplementedManagerClientServer) InfoList(context.Context, *InfoListReq) (*InfoListResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method InfoList not implemented")
 }
-func (UnimplementedManagerServer) InfoDetail(context.Context, *InfoDetailReq) (*InfoDetailResp, error) {
+func (UnimplementedManagerClientServer) InfoDetail(context.Context, *InfoDetailReq) (*InfoDetailResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method InfoDetail not implemented")
 }
-func (UnimplementedManagerServer) InfoExamine(context.Context, *InfoExamineReq) (*InfoExamineResp, error) {
+func (UnimplementedManagerClientServer) InfoExamine(context.Context, *InfoExamineReq) (*InfoExamineResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method InfoExamine not implemented")
 }
-func (UnimplementedManagerServer) InstitutionsFreeze(context.Context, *InstitutionsFreezeReq) (*InfoResp, error) {
+func (UnimplementedManagerClientServer) InstitutionsFreeze(context.Context, *InstitutionsFreezeReq) (*InfoResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method InstitutionsFreeze not implemented")
 }
-func (UnimplementedManagerServer) mustEmbedUnimplementedManagerServer() {}
+func (UnimplementedManagerClientServer) InfoOneKeyAction(context.Context, *OneKeyActionReq) (*InfoResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method InfoOneKeyAction not implemented")
+}
+func (UnimplementedManagerClientServer) mustEmbedUnimplementedManagerClientServer() {}
 
-// UnsafeManagerServer may be embedded to opt out of forward compatibility for this service.
-// Use of this interface is not recommended, as added methods to ManagerServer will
+// UnsafeManagerClientServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to ManagerClientServer will
 // result in compilation errors.
-type UnsafeManagerServer interface {
-	mustEmbedUnimplementedManagerServer()
+type UnsafeManagerClientServer interface {
+	mustEmbedUnimplementedManagerClientServer()
 }
 
-func RegisterManagerServer(s grpc.ServiceRegistrar, srv ManagerServer) {
-	s.RegisterService(&Manager_ServiceDesc, srv)
+func RegisterManagerClientServer(s grpc.ServiceRegistrar, srv ManagerClientServer) {
+	s.RegisterService(&ManagerClient_ServiceDesc, srv)
 }
 
-func _Manager_InfoList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _ManagerClient_InfoList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(InfoListReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(ManagerServer).InfoList(ctx, in)
+		return srv.(ManagerClientServer).InfoList(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/manager.manager/InfoList",
+		FullMethod: "/manager.managerClient/InfoList",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ManagerServer).InfoList(ctx, req.(*InfoListReq))
+		return srv.(ManagerClientServer).InfoList(ctx, req.(*InfoListReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Manager_InfoDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _ManagerClient_InfoDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(InfoDetailReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(ManagerServer).InfoDetail(ctx, in)
+		return srv.(ManagerClientServer).InfoDetail(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/manager.manager/InfoDetail",
+		FullMethod: "/manager.managerClient/InfoDetail",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ManagerServer).InfoDetail(ctx, req.(*InfoDetailReq))
+		return srv.(ManagerClientServer).InfoDetail(ctx, req.(*InfoDetailReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Manager_InfoExamine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _ManagerClient_InfoExamine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(InfoExamineReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(ManagerServer).InfoExamine(ctx, in)
+		return srv.(ManagerClientServer).InfoExamine(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/manager.manager/InfoExamine",
+		FullMethod: "/manager.managerClient/InfoExamine",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ManagerServer).InfoExamine(ctx, req.(*InfoExamineReq))
+		return srv.(ManagerClientServer).InfoExamine(ctx, req.(*InfoExamineReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Manager_InstitutionsFreeze_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+func _ManagerClient_InstitutionsFreeze_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(InstitutionsFreezeReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(ManagerServer).InstitutionsFreeze(ctx, in)
+		return srv.(ManagerClientServer).InstitutionsFreeze(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/manager.manager/InstitutionsFreeze",
+		FullMethod: "/manager.managerClient/InstitutionsFreeze",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ManagerServer).InstitutionsFreeze(ctx, req.(*InstitutionsFreezeReq))
+		return srv.(ManagerClientServer).InstitutionsFreeze(ctx, req.(*InstitutionsFreezeReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-// Manager_ServiceDesc is the grpc.ServiceDesc for Manager service.
+func _ManagerClient_InfoOneKeyAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(OneKeyActionReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ManagerClientServer).InfoOneKeyAction(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/manager.managerClient/InfoOneKeyAction",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ManagerClientServer).InfoOneKeyAction(ctx, req.(*OneKeyActionReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+// ManagerClient_ServiceDesc is the grpc.ServiceDesc for ManagerClient service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
-var Manager_ServiceDesc = grpc.ServiceDesc{
-	ServiceName: "manager.manager",
-	HandlerType: (*ManagerServer)(nil),
+var ManagerClient_ServiceDesc = grpc.ServiceDesc{
+	ServiceName: "manager.managerClient",
+	HandlerType: (*ManagerClientServer)(nil),
 	Methods: []grpc.MethodDesc{
 		{
 			MethodName: "InfoList",
-			Handler:    _Manager_InfoList_Handler,
+			Handler:    _ManagerClient_InfoList_Handler,
 		},
 		{
 			MethodName: "InfoDetail",
-			Handler:    _Manager_InfoDetail_Handler,
+			Handler:    _ManagerClient_InfoDetail_Handler,
 		},
 		{
 			MethodName: "InfoExamine",
-			Handler:    _Manager_InfoExamine_Handler,
+			Handler:    _ManagerClient_InfoExamine_Handler,
 		},
 		{
 			MethodName: "InstitutionsFreeze",
-			Handler:    _Manager_InstitutionsFreeze_Handler,
+			Handler:    _ManagerClient_InstitutionsFreeze_Handler,
+		},
+		{
+			MethodName: "InfoOneKeyAction",
+			Handler:    _ManagerClient_InfoOneKeyAction_Handler,
 		},
 	},
 	Streams:  []grpc.StreamDesc{},

+ 6 - 7
rpc/model/es/es.go

@@ -1,9 +1,8 @@
 package model
 
 import (
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumer"
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumerclient"
 	"fmt"
-	"log"
 	"strconv"
 	"strings"
 	"time"
@@ -19,7 +18,7 @@ const (
 )
 
 //获取供应信息
-func GetSupplyInfoList(in *consumer.SupplyInfoSearchReq) (list *[]map[string]interface{}, total int64) {
+func GetSupplyInfoList(in *consumerclient.SupplyInfoSearchReq) (list *[]map[string]interface{}, total int64) {
 	isHight := false
 	if in.SearchType != "" {
 		for _, v := range strings.Split(in.SearchType, ",") {
@@ -32,11 +31,11 @@ func GetSupplyInfoList(in *consumer.SupplyInfoSearchReq) (list *[]map[string]int
 		in.SearchType = `"title"`
 	}
 	qstr := GetSearchQuery(in)
-	start := int((in.PageIndex - 1) * in.PageSize)
-	pagesize := int(in.PageSize)
 	if in.PageIndex == 1 {
 		total = elastic.Count(INDEX, TYPE, qstr)
 	}
+	start := int((in.PageIndex - 1) * in.PageSize)
+	pagesize := int(in.PageSize)
 	if isHight { //全文搜索
 		list = elastic.GetAllByNgram(INDEX, TYPE, qstr, `"detail"`, Search_sort, Search_field, start, pagesize, 100, true)
 	} else { //标题搜索
@@ -46,7 +45,7 @@ func GetSupplyInfoList(in *consumer.SupplyInfoSearchReq) (list *[]map[string]int
 }
 
 //
-func GetSearchQuery(in *consumer.SupplyInfoSearchReq) (qstr string) {
+func GetSearchQuery(in *consumerclient.SupplyInfoSearchReq) (qstr string) {
 	query := `{"query":{"bool":{"must":[%s],"must_not":[%s]}}}`
 	multi_match := `{"multi_match": {"query": "%s","type": "phrase", "fields": [%s]}}`
 	province := `{"terms":{"province":[%s]}}`
@@ -107,7 +106,7 @@ func GetSearchQuery(in *consumer.SupplyInfoSearchReq) (qstr string) {
 	}
 
 	qstr = fmt.Sprintf(query, strings.Join(musts, ","), "")
-	log.Println(qstr)
+	//log.Println(qstr)
 	return
 }
 

+ 74 - 0
rpc/util/elastic.go

@@ -0,0 +1,74 @@
+package util
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"crypto/rand"
+	"encoding/json"
+	"io/ioutil"
+	"log"
+	"math/big"
+	"net/http"
+	"net/url"
+	"strings"
+	"unicode"
+)
+
+func HttpEsGetWords(ques, analyzer, esAddress string) (res string) {
+	var addrs []string
+	surl := ""
+	for _, s := range strings.Split(esAddress, ",") {
+		addrs = append(addrs, s)
+	}
+	i, _ := rand.Int(rand.Reader, big.NewInt(int64(len(addrs)))) //随机
+	surl = addrs[int(i.Int64())] + "/bidding/_analyze"
+	URL, _ := url.Parse(surl)
+	Q := URL.Query()
+	Q.Add("text", ques)
+	Q.Add("analyzer", analyzer)
+	URL.RawQuery = Q.Encode()
+	resp, err := http.Get(URL.String())
+	if err != nil {
+		log.Println("es连接失败 err1:", err)
+		resp, err = getesResp(ques, analyzer, addrs)
+		if err != nil {
+			return
+		}
+	}
+	result, err := ioutil.ReadAll(resp.Body)
+	if err == nil {
+		defer resp.Body.Close()
+		var resmap map[string]interface{}
+		json.Unmarshal(result, &resmap)
+		if resmap != nil && resmap["tokens"] != nil {
+			tokens := common.ObjArrToMapArr(resmap["tokens"].([]interface{}))
+			for _, v := range tokens {
+				token := common.ObjToString(v["token"])
+				if len([]rune(token)) == 1 && unicode.IsLetter([]rune(token)[0]) {
+					continue
+				}
+				if res != "" {
+					res += "+"
+				}
+				res += token
+			}
+		}
+	}
+	return
+}
+
+//
+func getesResp(ques, analyzer string, addrs []string) (resp *http.Response, err error) {
+	for _, v := range addrs {
+		surl := v + "/bidding/_analyze"
+		URL, _ := url.Parse(surl)
+		Q := URL.Query()
+		Q.Add("text", ques)
+		Q.Add("analyzer", analyzer)
+		URL.RawQuery = Q.Encode()
+		resp, err = http.Get(URL.String())
+		if err == nil {
+			break
+		}
+	}
+	return resp, err
+}