Jianghan 3 年之前
父节点
当前提交
7001fc496f

+ 14 - 43
common_utils/log/logger.go

@@ -2,25 +2,24 @@ package log
 
 import (
 	"fmt"
-	"github.com/natefinch/lumberjack"
 	"go.uber.org/zap"
 	"go.uber.org/zap/zapcore"
 	"os"
 	"time"
 )
 
-var logger *zap.Logger
+var Logger *zap.Logger
 
 func InitLogger(logpath string, loglevel string) {
 	// 日志分割
-	hook := lumberjack.Logger{
-		Filename:   logpath, // 日志文件路径,默认 os.TempDir()
-		MaxSize:    200,     // 每个日志文件保存10M,默认 100M
-		MaxBackups: 20,      // 保留30个备份,默认不限
-		MaxAge:     15,      // 保留7天,默认不限
-		Compress:   false,   // 是否压缩,默认不压缩
-	}
-	write := zapcore.AddSync(&hook)
+	//hook := lumberjack.Logger{
+	//	Filename:   logpath, // 日志文件路径,默认 os.TempDir()
+	//	MaxSize:    200,     // 每个日志文件保存10M,默认 100M
+	//	MaxBackups: 20,      // 保留30个备份,默认不限
+	//	MaxAge:     15,      // 保留7天,默认不限
+	//	Compress:   false,   // 是否压缩,默认不压缩
+	//}
+	//write := zapcore.AddSync(&hook)
 	// 设置日志级别
 	// debug 可以打印出 info debug warn
 	// info  级别可以打印 warn info
@@ -57,8 +56,8 @@ func InitLogger(logpath string, loglevel string) {
 	core := zapcore.NewCore(
 		// zapcore.NewConsoleEncoder(encoderConfig),
 		zapcore.NewJSONEncoder(encoderConfig),
-		//zapcore.NewMultiWriteSyncer(zapcore.AddSync(os.Stdout)),
-		zapcore.NewMultiWriteSyncer(zapcore.AddSync(os.Stdout), zapcore.AddSync(write)), // 打印到控制台和文件
+		zapcore.NewMultiWriteSyncer(zapcore.AddSync(os.Stdout)),
+		//zapcore.NewMultiWriteSyncer(zapcore.AddSync(os.Stdout), zapcore.AddSync(write)), // 打印到控制台和文件
 		//write, //文件
 		level,
 	)
@@ -67,10 +66,10 @@ func InitLogger(logpath string, loglevel string) {
 	// 开启文件及行号
 	development := zap.Development()
 	// 设置初始化字段,如:添加一个服务器名称
-	filed := zap.Fields(zap.String("serviceName", "serviceName"))
+	//filed := zap.Fields(zap.String("serviceName", "serviceName"))
 	// 构造日志
-	logger = zap.New(core, caller, filed, development)
-	logger.Info("DefaultLogger init success")
+	Logger = zap.New(core, caller, development)
+	Logger.Info("DefaultLogger init success")
 }
 
 func formatEncodeTime(t time.Time, enc zapcore.PrimitiveArrayEncoder) {
@@ -80,31 +79,3 @@ func formatEncodeTime(t time.Time, enc zapcore.PrimitiveArrayEncoder) {
 func Field(key string, val interface{}) zap.Field {
 	return zap.Any(key, val)
 }
-
-func Debug(msg string, fields ...zap.Field) {
-	logger.Debug(msg, fields...)
-}
-
-func Info(msg string, fields ...zap.Field) {
-	logger.Info(msg, fields...)
-}
-
-func Warn(msg string, fields ...zap.Field) {
-	logger.Warn(msg, fields...)
-}
-
-func Error(msg string, fields ...zap.Field) {
-	logger.Error(msg, fields...)
-}
-
-func DPanic(msg string, fields ...zap.Field) {
-	logger.DPanic(msg, fields...)
-}
-
-func Panic(msg string, fields ...zap.Field) {
-	logger.Panic(msg, fields...)
-}
-
-func Fatal(msg string, fields ...zap.Field) {
-	logger.Fatal(msg, fields...)
-}

+ 2 - 2
jy_publishing/config.json

@@ -3,7 +3,7 @@
   "mgoPoolSize": 5,
   "bidding": {
     "addr": "192.168.3.207:27092",
-    "dbName": "wjh",
+    "dbName": "qfw",
     "dbColl": "bidding",
     "uname": "",
     "upwd": ""
@@ -27,7 +27,7 @@
   "nsq_jy": {
     "addr": "192.168.3.207:4150",
     "topic": "jyinfo",
-    "channel": "data-dispose",
+    "channel": "data-processing",
     "concurrent": 1
   },
   "nsq_attachment": {

+ 40 - 73
jy_publishing/main.go

@@ -11,7 +11,7 @@ import (
 	"strings"
 	"utils"
 	"utils/elastic"
-	"utils/log"
+	. "utils/log"
 	"utils/mongodb"
 )
 
@@ -32,7 +32,7 @@ var (
 )
 
 func init() {
-	log.InitLogger("./log/All.log", "debug")
+	InitLogger("./log/All.log", "debug")
 	util.ReadConfig(&Sysconfig)
 	bidding := Sysconfig["bidding"].(map[string]interface{})
 	BidColl = bidding["dbColl"].(string)
@@ -74,83 +74,20 @@ func init() {
 		},
 	})
 
-	//initUdp()
-	//initNsq()
-}
-
-func initNsq() {
-	cof := Sysconfig["nsq_jy"].(map[string]interface{})
-	MCJy, _ = nsq.NewConsumer(&nsq.Cconfig{
-		IsJsonEncode: true, //与生产者配置对应,设为true会取第1个字节进行类型判断
-		Addr:         util.ObjToString(cof["addr"]),
-		ConnectType:  0, //默认连接nsqd
-		Topic:        util.ObjToString(cof["topic"]),
-		Channel:      util.ObjToString(cof["channel"]),
-		Concurrent:   util.IntAllDef(cof["concurrent"], 1), //并发数
-	})
-	cofAtts := Sysconfig["nsq_attachment"].(map[string]interface{})
-	MProducer, _ = nsq.NewProducer(util.ObjToString(cofAtts["addr"]), util.ObjToString(cofAtts["topic"]), true)
-	MCAtts, _ = nsq.NewConsumer(&nsq.Cconfig{
-		IsJsonEncode: false, //与生产者配置对应,设为true会取第1个字节进行类型判断
-		Addr:         util.ObjToString(cofAtts["addr"]),
-		ConnectType:  0, //默认连接nsqd
-		Topic:        util.ObjToString(cofAtts["topic-result"]),
-		Channel:      util.ObjToString(cofAtts["channel"]),
-		Concurrent:   util.IntAllDef(cofAtts["concurrent"], 1), //并发数
-	})
+	initUdp()
 }
 
 func initUdp() {
 	updport := Sysconfig["udpPort"].(string)
 	UdpClient = util.UdpClient{Local: updport, BufSize: 1024}
-	log.Info("Udp 监听 port: " + updport)
+	Logger.Info("Udp 监听 port: " + updport)
 	UdpClient.Listen(processUdpMsg)
 }
 
 func main() {
-	//go jyNsqMethod()
+	go jyNsqMethod()
 	go attsNsqMethod()
 
-	attsMap := map[string]interface{}{"1": map[string]interface{}{
-		"fid":      "1e0828202d4269d006f95e10e8f7afea4794a3d066d687f160f7dcafba02f74c.docx",
-		"filename": "附件202110121614016176.docx",
-		"ftype":    "docx",
-	}}
-	other := map[string]interface{}{
-		"id":      "113",
-		"action":  "1",
-		"msgType": "1",
-		"title":   []string{"汉"},
-		"detail":  []string{},
-	}
-	//otherJson, _ := json.Marshal(other)
-	//var attsArr []*pb.Request
-	var attsArr []map[string]interface{}
-	for _, m := range attsMap {
-		m1 := m.(map[string]interface{})
-		//attsArr = append(attsArr, &pb.Request{
-		//	FileUrl:     util.ObjToString(m1["fid"]),
-		//	FileName:    util.ObjToString(m1["filename"]),
-		//	FileType:    util.ObjToString(m1["ftype"]),
-		//	ReturnType:  1,
-		//	ExtractType: 1,
-		//})
-		attsArr = append(attsArr, map[string]interface{}{
-			"fileUrl":     util.ObjToString(m1["fid"]),
-			"fileName":    util.ObjToString(m1["filename"]),
-			"fileType":    util.ObjToString(m1["ftype"]),
-			"returnType":  1,
-			"extractType": 0,
-		})
-	}
-	msginfo := map[string]interface{}{
-		"message": attsArr,
-		"other":   other,
-		"topic":   "attachment-txt",
-	}
-	util.Debug(msginfo)
-	_ = MProducer.Publish(msginfo)
-
 	c := make(chan bool, 1)
 	<-c
 }
@@ -158,10 +95,23 @@ func main() {
 // @Description 剑鱼消息队列 按照类型处理消息
 // @Author J 2022/4/14 11:42 AM
 func jyNsqMethod() {
+	cof := Sysconfig["nsq_jy"].(map[string]interface{})
+	var err error
+	MCJy, err = nsq.NewConsumer(&nsq.Cconfig{
+		IsJsonEncode: true, //与生产者配置对应,设为true会取第1个字节进行类型判断
+		Addr:         util.ObjToString(cof["addr"]),
+		ConnectType:  0, //默认连接nsqd
+		Topic:        util.ObjToString(cof["topic"]),
+		Channel:      util.ObjToString(cof["channel"]),
+		Concurrent:   util.IntAllDef(cof["concurrent"], 1), //并发数
+	})
+	if err != nil {
+		Logger.Error(err.Error())
+	}
 	for {
 		select {
 		case obj := <-MCJy.Ch: //从通道读取即可
-			fmt.Println("---", obj)
+			Logger.Debug("jy nsq: " + fmt.Sprint(obj))
 			taskInfo(obj)
 		}
 	}
@@ -170,12 +120,29 @@ func jyNsqMethod() {
 // @Description 附件处理完成的数据
 // @Author J 2022/4/14 1:18 PM
 func attsNsqMethod() {
+	var err error
+	cofAtts := Sysconfig["nsq_attachment"].(map[string]interface{})
+	MProducer, err = nsq.NewProducer(util.ObjToString(cofAtts["addr"]), util.ObjToString(cofAtts["topic"]), true)
+	if err != nil {
+		Logger.Error(err.Error())
+	}
+	MCAtts, err = nsq.NewConsumer(&nsq.Cconfig{
+		IsJsonEncode: false, //与生产者配置对应,设为true会取第1个字节进行类型判断
+		Addr:         util.ObjToString(cofAtts["addr"]),
+		ConnectType:  0, //默认连接nsqd
+		Topic:        util.ObjToString(cofAtts["topic-result"]),
+		Channel:      util.ObjToString(cofAtts["channel"]),
+		Concurrent:   util.IntAllDef(cofAtts["concurrent"], 1), //并发数
+	})
+	if err != nil {
+		Logger.Error(err.Error())
+	}
 	for {
 		select {
 		case obj := <-MCAtts.Ch:
 			var resp *AttsResponse
 			_ = json.Unmarshal(obj.([]byte), &resp)
-			fmt.Println("---", resp)
+			Logger.Debug("file nsq: " + fmt.Sprint(resp))
 			taskAtts(resp)
 		}
 	}
@@ -186,7 +153,7 @@ func processUdpMsg(act byte, data []byte, ra *net.UDPAddr) {
 	case util.OP_TYPE_DATA: //测试接收
 		var resp map[string]interface{}
 		err := json.Unmarshal(data, &resp)
-		log.Info("udp receive...", log.Field("data", resp))
+		Logger.Info("udp receive...", Field("data", resp))
 		if err != nil {
 			//go Udpclient.WriteUdp([]byte{}, mu.OP_NOOP, ra) //回应上一个节点
 		} else if resp != nil {
@@ -199,12 +166,12 @@ func processUdpMsg(act byte, data []byte, ra *net.UDPAddr) {
 			switch tasktype {
 			case "jyfb_data_over":
 				go func() {
-					DelMethod(resp["infoid"].(string))
+					JyRpcDataFin(resp["infoid"].(string))
 				}()
 			}
 		}
 	case util.OP_NOOP: //下个节点回应
-		log.Info("接收回应:", log.Field("data", string(data)))
+		Logger.Info("接收回应:", Field("data", string(data)))
 	}
 
 }

+ 0 - 2
jy_publishing/nsq/consumer.go

@@ -2,7 +2,6 @@ package gonsq
 
 import (
 	"encoding/json"
-	"log"
 	"strings"
 	"time"
 
@@ -31,7 +30,6 @@ func (c *Consumer) HandleMessage(msg *nsq.Message) error {
 	if c.IsJsonEncode {
 		if len(msg.Body) > 1 {
 			var err error
-			log.Println("1--" + string(msg.Body))
 			switch msg.Body[0] {
 			case 0x00:
 				var obj interface{}

+ 80 - 0
jy_publishing/proto/common.proto

@@ -0,0 +1,80 @@
+syntax = "proto3";
+
+package common;
+
+option go_package = "./common";
+
+message ProjectReq {
+  string appId = 1;//剑鱼标识 默认10000
+}
+
+//地区信息
+message AreaResp {
+  	int64 err_code = 1;
+	string err_msg = 2;
+	repeated Province data = 3;//城市信息
+}
+//
+message Province{
+	string code = 1;//省份编码
+	string name = 2;//省份名称
+	repeated City citys = 3;//城市信息
+}
+//
+message City{
+	string code = 1;//城市编码
+	string name = 2;//城市名称
+}
+
+//行业信息
+message IndustryResp{
+	int64 err_code = 1;
+	string err_msg = 2;
+	repeated Industry data = 3;
+}
+//
+message Industry{
+	string name = 1;
+	repeated IndustryChildsResp childs = 2;
+}
+//二级行业
+message IndustryChildsResp{
+	string name = 1;
+	string code = 2;
+}
+
+message StateRequest {
+	string Id = 1;
+	string publishId = 2;
+	//  repeated Request message = 1;
+}
+
+message StateResponse {
+	int64 err_code = 1;
+	string err_msg = 2;
+}
+
+message SensitiveRequest {
+	string Id = 1;
+	string MsgType = 2;
+	repeated string Title = 3;
+	repeated string Detail = 4;
+	string Attachments = 5;
+	string AttachTxt = 6;
+}
+
+message SensitiveResponse {
+	int64 err_code = 1;
+	string err_msg = 2;
+}
+
+//
+service Common {
+	//获取省份信息
+  	rpc AreaInfo(ProjectReq) returns(AreaResp);
+	//获取行业信息
+	rpc IndustryInfo(ProjectReq) returns(IndustryResp);
+
+	rpc StateMethod(StateRequest) returns (StateResponse);
+	rpc SensitiveMethod(SensitiveRequest) returns (SensitiveResponse);
+}

+ 1166 - 0
jy_publishing/proto/common/common.pb.go

@@ -0,0 +1,1166 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.23.0
+// 	protoc        v3.12.4
+// source: common.proto
+
+package common
+
+import (
+	context "context"
+	proto "github.com/golang/protobuf/proto"
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
+)
+
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = 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
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	AppId string `protobuf:"bytes,1,opt,name=appId,proto3" json:"appId,omitempty"` //剑鱼标识 默认10000
+}
+
+func (x *ProjectReq) Reset() {
+	*x = ProjectReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ProjectReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProjectReq) ProtoMessage() {}
+
+func (x *ProjectReq) ProtoReflect() protoreflect.Message {
+	mi := &file_common_proto_msgTypes[0]
+	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 ProjectReq.ProtoReflect.Descriptor instead.
+func (*ProjectReq) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ProjectReq) GetAppId() string {
+	if x != nil {
+		return x.AppId
+	}
+	return ""
+}
+
+//地区信息
+type AreaResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ErrCode int64       `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code,omitempty"`
+	ErrMsg  string      `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
+	Data    []*Province `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"` //城市信息
+}
+
+func (x *AreaResp) Reset() {
+	*x = AreaResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *AreaResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AreaResp) ProtoMessage() {}
+
+func (x *AreaResp) ProtoReflect() protoreflect.Message {
+	mi := &file_common_proto_msgTypes[1]
+	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 AreaResp.ProtoReflect.Descriptor instead.
+func (*AreaResp) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *AreaResp) GetErrCode() int64 {
+	if x != nil {
+		return x.ErrCode
+	}
+	return 0
+}
+
+func (x *AreaResp) GetErrMsg() string {
+	if x != nil {
+		return x.ErrMsg
+	}
+	return ""
+}
+
+func (x *AreaResp) GetData() []*Province {
+	if x != nil {
+		return x.Data
+	}
+	return nil
+}
+
+//
+type Province struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Code  string  `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`   //省份编码
+	Name  string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`   //省份名称
+	Citys []*City `protobuf:"bytes,3,rep,name=citys,proto3" json:"citys,omitempty"` //城市信息
+}
+
+func (x *Province) Reset() {
+	*x = Province{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Province) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Province) ProtoMessage() {}
+
+func (x *Province) ProtoReflect() protoreflect.Message {
+	mi := &file_common_proto_msgTypes[2]
+	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 Province.ProtoReflect.Descriptor instead.
+func (*Province) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *Province) GetCode() string {
+	if x != nil {
+		return x.Code
+	}
+	return ""
+}
+
+func (x *Province) GetName() string {
+	if x != nil {
+		return x.Name
+	}
+	return ""
+}
+
+func (x *Province) GetCitys() []*City {
+	if x != nil {
+		return x.Citys
+	}
+	return nil
+}
+
+//
+type City struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` //城市编码
+	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` //城市名称
+}
+
+func (x *City) Reset() {
+	*x = City{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[3]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *City) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*City) ProtoMessage() {}
+
+func (x *City) ProtoReflect() protoreflect.Message {
+	mi := &file_common_proto_msgTypes[3]
+	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 City.ProtoReflect.Descriptor instead.
+func (*City) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *City) GetCode() string {
+	if x != nil {
+		return x.Code
+	}
+	return ""
+}
+
+func (x *City) GetName() string {
+	if x != nil {
+		return x.Name
+	}
+	return ""
+}
+
+//行业信息
+type IndustryResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ErrCode int64       `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code,omitempty"`
+	ErrMsg  string      `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
+	Data    []*Industry `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"`
+}
+
+func (x *IndustryResp) Reset() {
+	*x = IndustryResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *IndustryResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IndustryResp) ProtoMessage() {}
+
+func (x *IndustryResp) ProtoReflect() protoreflect.Message {
+	mi := &file_common_proto_msgTypes[4]
+	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 IndustryResp.ProtoReflect.Descriptor instead.
+func (*IndustryResp) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *IndustryResp) GetErrCode() int64 {
+	if x != nil {
+		return x.ErrCode
+	}
+	return 0
+}
+
+func (x *IndustryResp) GetErrMsg() string {
+	if x != nil {
+		return x.ErrMsg
+	}
+	return ""
+}
+
+func (x *IndustryResp) GetData() []*Industry {
+	if x != nil {
+		return x.Data
+	}
+	return nil
+}
+
+//
+type Industry struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Name   string                `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+	Childs []*IndustryChildsResp `protobuf:"bytes,2,rep,name=childs,proto3" json:"childs,omitempty"`
+}
+
+func (x *Industry) Reset() {
+	*x = Industry{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[5]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Industry) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Industry) ProtoMessage() {}
+
+func (x *Industry) ProtoReflect() protoreflect.Message {
+	mi := &file_common_proto_msgTypes[5]
+	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 Industry.ProtoReflect.Descriptor instead.
+func (*Industry) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *Industry) GetName() string {
+	if x != nil {
+		return x.Name
+	}
+	return ""
+}
+
+func (x *Industry) GetChilds() []*IndustryChildsResp {
+	if x != nil {
+		return x.Childs
+	}
+	return nil
+}
+
+//二级行业
+type IndustryChildsResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+	Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
+}
+
+func (x *IndustryChildsResp) Reset() {
+	*x = IndustryChildsResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[6]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *IndustryChildsResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IndustryChildsResp) ProtoMessage() {}
+
+func (x *IndustryChildsResp) ProtoReflect() protoreflect.Message {
+	mi := &file_common_proto_msgTypes[6]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use IndustryChildsResp.ProtoReflect.Descriptor instead.
+func (*IndustryChildsResp) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *IndustryChildsResp) GetName() string {
+	if x != nil {
+		return x.Name
+	}
+	return ""
+}
+
+func (x *IndustryChildsResp) GetCode() string {
+	if x != nil {
+		return x.Code
+	}
+	return ""
+}
+
+type StateRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Id        string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
+	PublishId string `protobuf:"bytes,2,opt,name=publishId,proto3" json:"publishId,omitempty"` //  repeated Request message = 1;
+}
+
+func (x *StateRequest) Reset() {
+	*x = StateRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[7]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *StateRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StateRequest) ProtoMessage() {}
+
+func (x *StateRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_common_proto_msgTypes[7]
+	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 StateRequest.ProtoReflect.Descriptor instead.
+func (*StateRequest) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *StateRequest) GetId() string {
+	if x != nil {
+		return x.Id
+	}
+	return ""
+}
+
+func (x *StateRequest) GetPublishId() string {
+	if x != nil {
+		return x.PublishId
+	}
+	return ""
+}
+
+type StateResponse struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ErrCode int64  `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code,omitempty"`
+	ErrMsg  string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
+}
+
+func (x *StateResponse) Reset() {
+	*x = StateResponse{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[8]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *StateResponse) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StateResponse) ProtoMessage() {}
+
+func (x *StateResponse) ProtoReflect() protoreflect.Message {
+	mi := &file_common_proto_msgTypes[8]
+	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 StateResponse.ProtoReflect.Descriptor instead.
+func (*StateResponse) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *StateResponse) GetErrCode() int64 {
+	if x != nil {
+		return x.ErrCode
+	}
+	return 0
+}
+
+func (x *StateResponse) GetErrMsg() string {
+	if x != nil {
+		return x.ErrMsg
+	}
+	return ""
+}
+
+type SensitiveRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Id          string   `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
+	MsgType     string   `protobuf:"bytes,2,opt,name=MsgType,proto3" json:"MsgType,omitempty"`
+	Title       []string `protobuf:"bytes,3,rep,name=Title,proto3" json:"Title,omitempty"`
+	Detail      []string `protobuf:"bytes,4,rep,name=Detail,proto3" json:"Detail,omitempty"`
+	Attachments string   `protobuf:"bytes,5,opt,name=Attachments,proto3" json:"Attachments,omitempty"`
+	AttachTxt   string   `protobuf:"bytes,6,opt,name=AttachTxt,proto3" json:"AttachTxt,omitempty"`
+}
+
+func (x *SensitiveRequest) Reset() {
+	*x = SensitiveRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[9]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SensitiveRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SensitiveRequest) ProtoMessage() {}
+
+func (x *SensitiveRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_common_proto_msgTypes[9]
+	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 SensitiveRequest.ProtoReflect.Descriptor instead.
+func (*SensitiveRequest) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *SensitiveRequest) GetId() string {
+	if x != nil {
+		return x.Id
+	}
+	return ""
+}
+
+func (x *SensitiveRequest) GetMsgType() string {
+	if x != nil {
+		return x.MsgType
+	}
+	return ""
+}
+
+func (x *SensitiveRequest) GetTitle() []string {
+	if x != nil {
+		return x.Title
+	}
+	return nil
+}
+
+func (x *SensitiveRequest) GetDetail() []string {
+	if x != nil {
+		return x.Detail
+	}
+	return nil
+}
+
+func (x *SensitiveRequest) GetAttachments() string {
+	if x != nil {
+		return x.Attachments
+	}
+	return ""
+}
+
+func (x *SensitiveRequest) GetAttachTxt() string {
+	if x != nil {
+		return x.AttachTxt
+	}
+	return ""
+}
+
+type SensitiveResponse struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ErrCode int64  `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code,omitempty"`
+	ErrMsg  string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
+}
+
+func (x *SensitiveResponse) Reset() {
+	*x = SensitiveResponse{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[10]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SensitiveResponse) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SensitiveResponse) ProtoMessage() {}
+
+func (x *SensitiveResponse) ProtoReflect() protoreflect.Message {
+	mi := &file_common_proto_msgTypes[10]
+	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 SensitiveResponse.ProtoReflect.Descriptor instead.
+func (*SensitiveResponse) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *SensitiveResponse) GetErrCode() int64 {
+	if x != nil {
+		return x.ErrCode
+	}
+	return 0
+}
+
+func (x *SensitiveResponse) GetErrMsg() string {
+	if x != nil {
+		return x.ErrMsg
+	}
+	return ""
+}
+
+var File_common_proto protoreflect.FileDescriptor
+
+var file_common_proto_rawDesc = []byte{
+	0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
+	0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x22, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63,
+	0x74, 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, 0x22, 0x64, 0x0a, 0x08, 0x41, 0x72,
+	0x65, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f,
+	0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64,
+	0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x24, 0x0a, 0x04, 0x64, 0x61,
+	0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
+	0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
+	0x22, 0x56, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04,
+	0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
+	0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+	0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x63, 0x69, 0x74, 0x79, 0x73, 0x18, 0x03, 0x20,
+	0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x69, 0x74,
+	0x79, 0x52, 0x05, 0x63, 0x69, 0x74, 0x79, 0x73, 0x22, 0x2e, 0x0a, 0x04, 0x43, 0x69, 0x74, 0x79,
+	0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+	0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x68, 0x0a, 0x0c, 0x49, 0x6e, 0x64, 0x75,
+	0x73, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f,
+	0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43,
+	0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x24, 0x0a, 0x04,
+	0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d,
+	0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61,
+	0x74, 0x61, 0x22, 0x52, 0x0a, 0x08, 0x49, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x12, 0x12,
+	0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
+	0x6d, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03,
+	0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x64, 0x75,
+	0x73, 0x74, 0x72, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x52, 0x06,
+	0x63, 0x68, 0x69, 0x6c, 0x64, 0x73, 0x22, 0x3c, 0x0a, 0x12, 0x49, 0x6e, 0x64, 0x75, 0x73, 0x74,
+	0x72, 0x79, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04,
+	0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+	0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+	0x63, 0x6f, 0x64, 0x65, 0x22, 0x3c, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
+	0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x02, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x49,
+	0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68,
+	0x49, 0x64, 0x22, 0x43, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
+	0x6e, 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, 0x22, 0xaa, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x73,
+	0x69, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02,
+	0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07,
+	0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4d,
+	0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x18,
+	0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06,
+	0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x44, 0x65,
+	0x74, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65,
+	0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x41, 0x74, 0x74, 0x61, 0x63,
+	0x68, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68,
+	0x54, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x41, 0x74, 0x74, 0x61, 0x63,
+	0x68, 0x54, 0x78, 0x74, 0x22, 0x47, 0x0a, 0x11, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76,
+	0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 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, 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, 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 (
+	file_common_proto_rawDescOnce sync.Once
+	file_common_proto_rawDescData = file_common_proto_rawDesc
+)
+
+func file_common_proto_rawDescGZIP() []byte {
+	file_common_proto_rawDescOnce.Do(func() {
+		file_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_proto_rawDescData)
+	})
+	return file_common_proto_rawDescData
+}
+
+var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
+var file_common_proto_goTypes = []interface{}{
+	(*ProjectReq)(nil),         // 0: common.ProjectReq
+	(*AreaResp)(nil),           // 1: common.AreaResp
+	(*Province)(nil),           // 2: common.Province
+	(*City)(nil),               // 3: common.City
+	(*IndustryResp)(nil),       // 4: common.IndustryResp
+	(*Industry)(nil),           // 5: common.Industry
+	(*IndustryChildsResp)(nil), // 6: common.IndustryChildsResp
+	(*StateRequest)(nil),       // 7: common.StateRequest
+	(*StateResponse)(nil),      // 8: common.StateResponse
+	(*SensitiveRequest)(nil),   // 9: common.SensitiveRequest
+	(*SensitiveResponse)(nil),  // 10: common.SensitiveResponse
+}
+var file_common_proto_depIdxs = []int32{
+	2,  // 0: common.AreaResp.data:type_name -> common.Province
+	3,  // 1: common.Province.citys:type_name -> common.City
+	5,  // 2: common.IndustryResp.data:type_name -> common.Industry
+	6,  // 3: common.Industry.childs:type_name -> common.IndustryChildsResp
+	0,  // 4: common.Common.AreaInfo:input_type -> common.ProjectReq
+	0,  // 5: common.Common.IndustryInfo:input_type -> common.ProjectReq
+	7,  // 6: common.Common.StateMethod:input_type -> common.StateRequest
+	9,  // 7: common.Common.SensitiveMethod:input_type -> common.SensitiveRequest
+	1,  // 8: common.Common.AreaInfo:output_type -> common.AreaResp
+	4,  // 9: common.Common.IndustryInfo:output_type -> common.IndustryResp
+	8,  // 10: common.Common.StateMethod:output_type -> common.StateResponse
+	10, // 11: common.Common.SensitiveMethod:output_type -> common.SensitiveResponse
+	8,  // [8:12] is the sub-list for method output_type
+	4,  // [4:8] is the sub-list for method input_type
+	4,  // [4:4] is the sub-list for extension type_name
+	4,  // [4:4] is the sub-list for extension extendee
+	0,  // [0:4] is the sub-list for field type_name
+}
+
+func init() { file_common_proto_init() }
+func file_common_proto_init() {
+	if File_common_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ProjectReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*AreaResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Province); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*City); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*IndustryResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Industry); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*IndustryChildsResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*StateRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*StateResponse); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_common_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SensitiveRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_common_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SensitiveResponse); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_common_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   11,
+			NumExtensions: 0,
+			NumServices:   1,
+		},
+		GoTypes:           file_common_proto_goTypes,
+		DependencyIndexes: file_common_proto_depIdxs,
+		MessageInfos:      file_common_proto_msgTypes,
+	}.Build()
+	File_common_proto = out.File
+	file_common_proto_rawDesc = nil
+	file_common_proto_goTypes = nil
+	file_common_proto_depIdxs = nil
+}
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ context.Context
+var _ grpc.ClientConnInterface
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+const _ = grpc.SupportPackageIsVersion6
+
+// CommonClient is the client API for Common service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
+type CommonClient interface {
+	//获取省份信息
+	AreaInfo(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*AreaResp, error)
+	//获取行业信息
+	IndustryInfo(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*IndustryResp, error)
+	StateMethod(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error)
+	SensitiveMethod(ctx context.Context, in *SensitiveRequest, opts ...grpc.CallOption) (*SensitiveResponse, error)
+}
+
+type commonClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewCommonClient(cc grpc.ClientConnInterface) CommonClient {
+	return &commonClient{cc}
+}
+
+func (c *commonClient) 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...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *commonClient) 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...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *commonClient) 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...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *commonClient) 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...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// CommonServer is the server API for Common service.
+type CommonServer interface {
+	//获取省份信息
+	AreaInfo(context.Context, *ProjectReq) (*AreaResp, error)
+	//获取行业信息
+	IndustryInfo(context.Context, *ProjectReq) (*IndustryResp, error)
+	StateMethod(context.Context, *StateRequest) (*StateResponse, error)
+	SensitiveMethod(context.Context, *SensitiveRequest) (*SensitiveResponse, error)
+}
+
+// UnimplementedCommonServer can be embedded to have forward compatible implementations.
+type UnimplementedCommonServer struct {
+}
+
+func (*UnimplementedCommonServer) AreaInfo(context.Context, *ProjectReq) (*AreaResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method AreaInfo not implemented")
+}
+func (*UnimplementedCommonServer) IndustryInfo(context.Context, *ProjectReq) (*IndustryResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method IndustryInfo not implemented")
+}
+func (*UnimplementedCommonServer) StateMethod(context.Context, *StateRequest) (*StateResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method StateMethod not implemented")
+}
+func (*UnimplementedCommonServer) SensitiveMethod(context.Context, *SensitiveRequest) (*SensitiveResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method SensitiveMethod not implemented")
+}
+
+func RegisterCommonServer(s *grpc.Server, srv CommonServer) {
+	s.RegisterService(&_Common_serviceDesc, srv)
+}
+
+func _Common_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)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/common.Common/AreaInfo",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(CommonServer).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) {
+	in := new(ProjectReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(CommonServer).IndustryInfo(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/common.Common/IndustryInfo",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(CommonServer).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) {
+	in := new(StateRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(CommonServer).StateMethod(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/common.Common/StateMethod",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(CommonServer).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) {
+	in := new(SensitiveRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(CommonServer).SensitiveMethod(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/common.Common/SensitiveMethod",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(CommonServer).SensitiveMethod(ctx, req.(*SensitiveRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+var _Common_serviceDesc = grpc.ServiceDesc{
+	ServiceName: "common.Common",
+	HandlerType: (*CommonServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "AreaInfo",
+			Handler:    _Common_AreaInfo_Handler,
+		},
+		{
+			MethodName: "IndustryInfo",
+			Handler:    _Common_IndustryInfo_Handler,
+		},
+		{
+			MethodName: "StateMethod",
+			Handler:    _Common_StateMethod_Handler,
+		},
+		{
+			MethodName: "SensitiveMethod",
+			Handler:    _Common_SensitiveMethod_Handler,
+		},
+	},
+	Streams:  []grpc.StreamDesc{},
+	Metadata: "common.proto",
+}

+ 2 - 0
jy_publishing/proto/fileText.proto

@@ -2,6 +2,8 @@ syntax = "proto3";
 //附件传输
 package proto;
 
+option go_package = "./proto";
+
 message FileRequest {
   repeated Request message = 1; //文件名称
   string other = 2;     //信息id

+ 0 - 546
jy_publishing/proto/jyInterface.pb.go

@@ -1,546 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// 	protoc-gen-go v1.23.0
-// 	protoc        v3.12.4
-// source: jyInterface.proto
-
-//附件传输
-
-package proto
-
-import (
-	context "context"
-	proto "github.com/golang/protobuf/proto"
-	grpc "google.golang.org/grpc"
-	codes "google.golang.org/grpc/codes"
-	status "google.golang.org/grpc/status"
-	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
-	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	reflect "reflect"
-	sync "sync"
-)
-
-const (
-	// Verify that this generated code is sufficiently up-to-date.
-	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
-	// Verify that runtime/protoimpl is sufficiently up-to-date.
-	_ = 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 StateRequest struct {
-	state         protoimpl.MessageState
-	sizeCache     protoimpl.SizeCache
-	unknownFields protoimpl.UnknownFields
-
-	Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"` //  repeated Request message = 1;
-}
-
-func (x *StateRequest) Reset() {
-	*x = StateRequest{}
-	if protoimpl.UnsafeEnabled {
-		mi := &file_jyInterface_proto_msgTypes[0]
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		ms.StoreMessageInfo(mi)
-	}
-}
-
-func (x *StateRequest) String() string {
-	return protoimpl.X.MessageStringOf(x)
-}
-
-func (*StateRequest) ProtoMessage() {}
-
-func (x *StateRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_jyInterface_proto_msgTypes[0]
-	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 StateRequest.ProtoReflect.Descriptor instead.
-func (*StateRequest) Descriptor() ([]byte, []int) {
-	return file_jyInterface_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *StateRequest) GetId() string {
-	if x != nil {
-		return x.Id
-	}
-	return ""
-}
-
-type StateResponse struct {
-	state         protoimpl.MessageState
-	sizeCache     protoimpl.SizeCache
-	unknownFields protoimpl.UnknownFields
-
-	ErrCode int32  `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code,omitempty"`
-	ErrMsg  string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
-}
-
-func (x *StateResponse) Reset() {
-	*x = StateResponse{}
-	if protoimpl.UnsafeEnabled {
-		mi := &file_jyInterface_proto_msgTypes[1]
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		ms.StoreMessageInfo(mi)
-	}
-}
-
-func (x *StateResponse) String() string {
-	return protoimpl.X.MessageStringOf(x)
-}
-
-func (*StateResponse) ProtoMessage() {}
-
-func (x *StateResponse) ProtoReflect() protoreflect.Message {
-	mi := &file_jyInterface_proto_msgTypes[1]
-	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 StateResponse.ProtoReflect.Descriptor instead.
-func (*StateResponse) Descriptor() ([]byte, []int) {
-	return file_jyInterface_proto_rawDescGZIP(), []int{1}
-}
-
-func (x *StateResponse) GetErrCode() int32 {
-	if x != nil {
-		return x.ErrCode
-	}
-	return 0
-}
-
-func (x *StateResponse) GetErrMsg() string {
-	if x != nil {
-		return x.ErrMsg
-	}
-	return ""
-}
-
-type SensitiveRequest struct {
-	state         protoimpl.MessageState
-	sizeCache     protoimpl.SizeCache
-	unknownFields protoimpl.UnknownFields
-
-	Id          string   `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
-	MsgType     string   `protobuf:"bytes,2,opt,name=MsgType,proto3" json:"MsgType,omitempty"`
-	Action      string   `protobuf:"bytes,3,opt,name=Action,proto3" json:"Action,omitempty"`
-	Title       []string `protobuf:"bytes,4,rep,name=Title,proto3" json:"Title,omitempty"`
-	Detail      []string `protobuf:"bytes,5,rep,name=Detail,proto3" json:"Detail,omitempty"`
-	Attachments string   `protobuf:"bytes,6,opt,name=Attachments,proto3" json:"Attachments,omitempty"`
-	AttachTxt   string   `protobuf:"bytes,7,opt,name=AttachTxt,proto3" json:"AttachTxt,omitempty"`
-}
-
-func (x *SensitiveRequest) Reset() {
-	*x = SensitiveRequest{}
-	if protoimpl.UnsafeEnabled {
-		mi := &file_jyInterface_proto_msgTypes[2]
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		ms.StoreMessageInfo(mi)
-	}
-}
-
-func (x *SensitiveRequest) String() string {
-	return protoimpl.X.MessageStringOf(x)
-}
-
-func (*SensitiveRequest) ProtoMessage() {}
-
-func (x *SensitiveRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_jyInterface_proto_msgTypes[2]
-	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 SensitiveRequest.ProtoReflect.Descriptor instead.
-func (*SensitiveRequest) Descriptor() ([]byte, []int) {
-	return file_jyInterface_proto_rawDescGZIP(), []int{2}
-}
-
-func (x *SensitiveRequest) GetId() string {
-	if x != nil {
-		return x.Id
-	}
-	return ""
-}
-
-func (x *SensitiveRequest) GetMsgType() string {
-	if x != nil {
-		return x.MsgType
-	}
-	return ""
-}
-
-func (x *SensitiveRequest) GetAction() string {
-	if x != nil {
-		return x.Action
-	}
-	return ""
-}
-
-func (x *SensitiveRequest) GetTitle() []string {
-	if x != nil {
-		return x.Title
-	}
-	return nil
-}
-
-func (x *SensitiveRequest) GetDetail() []string {
-	if x != nil {
-		return x.Detail
-	}
-	return nil
-}
-
-func (x *SensitiveRequest) GetAttachments() string {
-	if x != nil {
-		return x.Attachments
-	}
-	return ""
-}
-
-func (x *SensitiveRequest) GetAttachTxt() string {
-	if x != nil {
-		return x.AttachTxt
-	}
-	return ""
-}
-
-type SensitiveResponse struct {
-	state         protoimpl.MessageState
-	sizeCache     protoimpl.SizeCache
-	unknownFields protoimpl.UnknownFields
-
-	ErrCode int32  `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code,omitempty"`
-	ErrMsg  string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
-}
-
-func (x *SensitiveResponse) Reset() {
-	*x = SensitiveResponse{}
-	if protoimpl.UnsafeEnabled {
-		mi := &file_jyInterface_proto_msgTypes[3]
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		ms.StoreMessageInfo(mi)
-	}
-}
-
-func (x *SensitiveResponse) String() string {
-	return protoimpl.X.MessageStringOf(x)
-}
-
-func (*SensitiveResponse) ProtoMessage() {}
-
-func (x *SensitiveResponse) ProtoReflect() protoreflect.Message {
-	mi := &file_jyInterface_proto_msgTypes[3]
-	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 SensitiveResponse.ProtoReflect.Descriptor instead.
-func (*SensitiveResponse) Descriptor() ([]byte, []int) {
-	return file_jyInterface_proto_rawDescGZIP(), []int{3}
-}
-
-func (x *SensitiveResponse) GetErrCode() int32 {
-	if x != nil {
-		return x.ErrCode
-	}
-	return 0
-}
-
-func (x *SensitiveResponse) GetErrMsg() string {
-	if x != nil {
-		return x.ErrMsg
-	}
-	return ""
-}
-
-var File_jyInterface_proto protoreflect.FileDescriptor
-
-var file_jyInterface_proto_rawDesc = []byte{
-	0x0a, 0x11, 0x6a, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72,
-	0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1e, 0x0a, 0x0c, 0x53, 0x74,
-	0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64,
-	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x0d, 0x53, 0x74,
-	0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65,
-	0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65,
-	0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73,
-	0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22,
-	0xc2, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71,
-	0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x02, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18,
-	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16,
-	0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
-	0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x18,
-	0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06,
-	0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x44, 0x65,
-	0x74, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65,
-	0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x41, 0x74, 0x74, 0x61, 0x63,
-	0x68, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68,
-	0x54, 0x78, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x41, 0x74, 0x74, 0x61, 0x63,
-	0x68, 0x54, 0x78, 0x74, 0x22, 0x47, 0x0a, 0x11, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76,
-	0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72,
-	0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x8d, 0x01,
-	0x0a, 0x0b, 0x4a, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x38, 0x0a,
-	0x0b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x13, 0x2e, 0x70,
-	0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
-	0x74, 0x1a, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52,
-	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x73, 0x69,
-	0x74, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f,
-	0x74, 0x6f, 0x2e, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75,
-	0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x6e, 0x73,
-	0x69, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70,
-	0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
-
-var (
-	file_jyInterface_proto_rawDescOnce sync.Once
-	file_jyInterface_proto_rawDescData = file_jyInterface_proto_rawDesc
-)
-
-func file_jyInterface_proto_rawDescGZIP() []byte {
-	file_jyInterface_proto_rawDescOnce.Do(func() {
-		file_jyInterface_proto_rawDescData = protoimpl.X.CompressGZIP(file_jyInterface_proto_rawDescData)
-	})
-	return file_jyInterface_proto_rawDescData
-}
-
-var file_jyInterface_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
-var file_jyInterface_proto_goTypes = []interface{}{
-	(*StateRequest)(nil),      // 0: proto.StateRequest
-	(*StateResponse)(nil),     // 1: proto.StateResponse
-	(*SensitiveRequest)(nil),  // 2: proto.SensitiveRequest
-	(*SensitiveResponse)(nil), // 3: proto.SensitiveResponse
-}
-var file_jyInterface_proto_depIdxs = []int32{
-	0, // 0: proto.JyInterface.StateMethod:input_type -> proto.StateRequest
-	2, // 1: proto.JyInterface.SensitiveMethod:input_type -> proto.SensitiveRequest
-	1, // 2: proto.JyInterface.StateMethod:output_type -> proto.StateResponse
-	3, // 3: proto.JyInterface.SensitiveMethod:output_type -> proto.SensitiveResponse
-	2, // [2:4] is the sub-list for method output_type
-	0, // [0:2] is the sub-list for method input_type
-	0, // [0:0] is the sub-list for extension type_name
-	0, // [0:0] is the sub-list for extension extendee
-	0, // [0:0] is the sub-list for field type_name
-}
-
-func init() { file_jyInterface_proto_init() }
-func file_jyInterface_proto_init() {
-	if File_jyInterface_proto != nil {
-		return
-	}
-	if !protoimpl.UnsafeEnabled {
-		file_jyInterface_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*StateRequest); i {
-			case 0:
-				return &v.state
-			case 1:
-				return &v.sizeCache
-			case 2:
-				return &v.unknownFields
-			default:
-				return nil
-			}
-		}
-		file_jyInterface_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*StateResponse); i {
-			case 0:
-				return &v.state
-			case 1:
-				return &v.sizeCache
-			case 2:
-				return &v.unknownFields
-			default:
-				return nil
-			}
-		}
-		file_jyInterface_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*SensitiveRequest); i {
-			case 0:
-				return &v.state
-			case 1:
-				return &v.sizeCache
-			case 2:
-				return &v.unknownFields
-			default:
-				return nil
-			}
-		}
-		file_jyInterface_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*SensitiveResponse); i {
-			case 0:
-				return &v.state
-			case 1:
-				return &v.sizeCache
-			case 2:
-				return &v.unknownFields
-			default:
-				return nil
-			}
-		}
-	}
-	type x struct{}
-	out := protoimpl.TypeBuilder{
-		File: protoimpl.DescBuilder{
-			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
-			RawDescriptor: file_jyInterface_proto_rawDesc,
-			NumEnums:      0,
-			NumMessages:   4,
-			NumExtensions: 0,
-			NumServices:   1,
-		},
-		GoTypes:           file_jyInterface_proto_goTypes,
-		DependencyIndexes: file_jyInterface_proto_depIdxs,
-		MessageInfos:      file_jyInterface_proto_msgTypes,
-	}.Build()
-	File_jyInterface_proto = out.File
-	file_jyInterface_proto_rawDesc = nil
-	file_jyInterface_proto_goTypes = nil
-	file_jyInterface_proto_depIdxs = nil
-}
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ context.Context
-var _ grpc.ClientConnInterface
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion6
-
-// JyInterfaceClient is the client API for JyInterface service.
-//
-// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
-type JyInterfaceClient interface {
-	StateMethod(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error)
-	SensitiveMethod(ctx context.Context, in *SensitiveRequest, opts ...grpc.CallOption) (*SensitiveResponse, error)
-}
-
-type jyInterfaceClient struct {
-	cc grpc.ClientConnInterface
-}
-
-func NewJyInterfaceClient(cc grpc.ClientConnInterface) JyInterfaceClient {
-	return &jyInterfaceClient{cc}
-}
-
-func (c *jyInterfaceClient) StateMethod(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error) {
-	out := new(StateResponse)
-	err := c.cc.Invoke(ctx, "/proto.JyInterface/StateMethod", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *jyInterfaceClient) SensitiveMethod(ctx context.Context, in *SensitiveRequest, opts ...grpc.CallOption) (*SensitiveResponse, error) {
-	out := new(SensitiveResponse)
-	err := c.cc.Invoke(ctx, "/proto.JyInterface/SensitiveMethod", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-// JyInterfaceServer is the server API for JyInterface service.
-type JyInterfaceServer interface {
-	StateMethod(context.Context, *StateRequest) (*StateResponse, error)
-	SensitiveMethod(context.Context, *SensitiveRequest) (*SensitiveResponse, error)
-}
-
-// UnimplementedJyInterfaceServer can be embedded to have forward compatible implementations.
-type UnimplementedJyInterfaceServer struct {
-}
-
-func (*UnimplementedJyInterfaceServer) StateMethod(context.Context, *StateRequest) (*StateResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method StateMethod not implemented")
-}
-func (*UnimplementedJyInterfaceServer) SensitiveMethod(context.Context, *SensitiveRequest) (*SensitiveResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method SensitiveMethod not implemented")
-}
-
-func RegisterJyInterfaceServer(s *grpc.Server, srv JyInterfaceServer) {
-	s.RegisterService(&_JyInterface_serviceDesc, srv)
-}
-
-func _JyInterface_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.(JyInterfaceServer).StateMethod(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/proto.JyInterface/StateMethod",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(JyInterfaceServer).StateMethod(ctx, req.(*StateRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _JyInterface_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.(JyInterfaceServer).SensitiveMethod(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/proto.JyInterface/SensitiveMethod",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(JyInterfaceServer).SensitiveMethod(ctx, req.(*SensitiveRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-var _JyInterface_serviceDesc = grpc.ServiceDesc{
-	ServiceName: "proto.JyInterface",
-	HandlerType: (*JyInterfaceServer)(nil),
-	Methods: []grpc.MethodDesc{
-		{
-			MethodName: "StateMethod",
-			Handler:    _JyInterface_StateMethod_Handler,
-		},
-		{
-			MethodName: "SensitiveMethod",
-			Handler:    _JyInterface_SensitiveMethod_Handler,
-		},
-	},
-	Streams:  []grpc.StreamDesc{},
-	Metadata: "jyInterface.proto",
-}

+ 0 - 33
jy_publishing/proto/jyInterface.proto

@@ -1,33 +0,0 @@
-syntax = "proto3";
-//附件传输
-package proto;
-
-message StateRequest {
-  string Id = 1;
-//  repeated Request message = 1;
-}
-
-message StateResponse {
-  int32 err_code = 1;
-  string err_msg = 2;
-}
-
-message SensitiveRequest {
-  string Id = 1;
-  string MsgType = 2;
-  string Action = 3;
-  repeated string Title = 4;
-  repeated string Detail = 5;
-  string Attachments = 6;
-  string AttachTxt = 7;
-}
-
-message SensitiveResponse {
-  int32 err_code = 1;
-  string err_msg = 2;
-}
-
-service JyInterface {
-  rpc StateMethod(StateRequest) returns (StateResponse);
-  rpc SensitiveMethod(SensitiveRequest) returns (SensitiveResponse);
-}

+ 2 - 2
jy_publishing/proto/fileText.pb.go → jy_publishing/proto/proto/fileText.pb.go

@@ -356,8 +356,8 @@ var file_fileText_proto_rawDesc = []byte{
 	0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x74,
 	0x72, 0x61, 0x63, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x46, 0x69, 0x6c,
 	0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
-	0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70,
-	0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0x5a,
+	0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 1 - 1
jy_publishing/rules.txt

@@ -77,7 +77,7 @@ da选
 昝爱宗
 抿主
 敏主
-人
+人
 人木又
 人quan
 renquan

+ 5 - 23
jy_publishing/service.go

@@ -1,10 +1,8 @@
 package main
 
 import (
-	"context"
 	"fmt"
-	pb "jy_publishing/proto"
-	"utils/log"
+	. "utils/log"
 )
 
 type DataService struct {
@@ -20,10 +18,11 @@ type Response struct {
 
 // @Description 数据处理流程接口 es调用接口
 // @Author J 2022/4/13 9:25 AM
+// Deprecated
 func (d *DataService) EsInterfaceMethod(req Request, resp *Response) error {
-	log.Info("EsInterfaceMethod----id---", log.Field("id", req.Id))
+	Logger.Info("EsInterfaceMethod----id---", Field("id", req.Id))
 	var err error
-	resp.Rep = JyRpcDataFin(req.Id)
+	//JyRpcDataFin()
 	return err
 }
 
@@ -31,7 +30,7 @@ func (d *DataService) EsInterfaceMethod(req Request, resp *Response) error {
 // @Author J 2022/4/13 9:23 AM
 // Deprecated
 func (d *DataService) DeleteData(req Request, res *Response) error {
-	log.Info("DeleteData----infoId---", log.Field("id", req.Id))
+	Logger.Info("DeleteData----infoId---", Field("id", req.Id))
 	if req.Id == "" {
 		return fmt.Errorf(" Id error...")
 	}
@@ -39,20 +38,3 @@ func (d *DataService) DeleteData(req Request, res *Response) error {
 	DelMethod(req.Id)
 	return err
 }
-
-// @Description 数据处理完成调用jy接口
-// @Author J 2022/4/9 11:41 AM
-func JyRpcDataFin(id string) bool {
-	conn := JyRpcClient.Conn()
-	defer conn.Close()
-	req := &pb.StateRequest{
-		Id: id,
-	}
-	jyIntf := pb.NewJyInterfaceClient(conn)
-	resp, err := jyIntf.StateMethod(context.Background(), req)
-	if err != nil {
-		log.Error(err.Error())
-	}
-	log.Info(resp.String())
-	return true
-}

+ 64 - 38
jy_publishing/task.go

@@ -7,14 +7,14 @@ import (
 	"fmt"
 	"google.golang.org/grpc"
 	"gopkg.in/mgo.v2/bson"
-	pb "jy_publishing/proto"
+	jypb "jy_publishing/proto/common"
+	pb "jy_publishing/proto/proto"
 	"net"
-	"reflect"
 	"strconv"
 	"strings"
 	"time"
 	"utils"
-	"utils/log"
+	. "utils/log"
 	"utils/mongodb"
 )
 
@@ -50,20 +50,19 @@ func taskInfo(obj interface{}) {
 	if util.ObjToString(info["action"]) == "1" {
 		// 敏感词处理
 		Sensitive(info)
-
 	} else if util.ObjToString(info["action"]) == "2" {
 		// 数据处理
 		InfoPub(info)
 	} else if util.ObjToString(info["action"]) == "3" {
-		id := util.ObjToString(info["id"])
-		DelMethod(id)
+		//id := util.ObjToString(info["id"])
+		tmp := info["appendInfo"].(map[string]interface{})
+		DelMethod(util.ObjToString(tmp["publish_id"]))
 	}
 }
 
 // @Description 敏感词处理(title, content, attachment)
 // @Author J 2022/4/11 9:36 AM
 func Sensitive(info map[string]interface{}) {
-	util.Debug(reflect.TypeOf(info["appendInfo"]))
 	tmp := info["appendInfo"].(map[string]interface{})
 	tArr := WordsIdentify(util.ObjToString(tmp["title"]))
 	dArr := WordsIdentify(util.ObjToString(tmp["detail"]))
@@ -92,17 +91,20 @@ func Sensitive(info map[string]interface{}) {
 			Message: attsArr,
 			Other:   string(otherJson),
 		}
+		Logger.Debug("file extract: " + fmt.Sprint(msginfo))
 		_ = MProducer.Publish(msginfo)
 	} else {
 		// 没有附件
-		req := &pb.SensitiveRequest{
+		Logger.Debug("title sensitive array: " + fmt.Sprint(tArr))
+		Logger.Debug("title sensitive array: " + fmt.Sprint(dArr))
+		req := &jypb.SensitiveRequest{
 			Id:      util.ObjToString(info["id"]),
-			MsgType: util.ObjToString(info["msgtype"]),
+			MsgType: util.ObjToString(info["msgType"]),
 			Title:   tArr,
 			Detail:  dArr,
 		}
-		fmt.Println(req)
-		//JyRpcSensitive(req)
+		Logger.Debug("JyRpcSensitive request: " + fmt.Sprint(req))
+		JyRpcSensitive(req)
 	}
 
 	//atts := tmp["attachment"].(map[string]interface{})
@@ -136,7 +138,7 @@ func WordsIdentify(str string) []string {
 	if len(ret) > 0 {
 		var words []string
 		for _, r := range ret {
-			words = append(words, r.MatchRule)
+			words = append(words, r.Line)
 		}
 		return words
 	}
@@ -214,29 +216,28 @@ func InfoPub(info map[string]interface{}) {
 			}
 		} else if f == "attach" {
 			s := util.ObjToString(tmp[f])
-			atts := map[string]interface{}{}
-			if err := json.Unmarshal([]byte(s), &atts); err != nil {
-				log.Error("data Unmarshal Failed:", log.Field("error", err))
+			if s != "" {
+				atts := map[string]interface{}{}
+				if err := json.Unmarshal([]byte(s), &atts); err != nil {
+					Logger.Error("data Unmarshal Failed:", Field("error", err))
+				}
+				saveMap[SaveFields[f]] = atts
 			}
-			saveMap[SaveFields[f]] = atts
-			//for _, a := range atts {
-			//	a1 := a.(map[string]interface{})
-			//	a1["filename"] = util.ObjToString(a1["fileName"])
-			//	delete(a1, "fileName")
-			//	a1[""] = a[""]
-			//}
 		} else if f == "discern_attach" {
 			if s := util.ObjToString(tmp[f]); s != "" {
 				atts := map[string]interface{}{}
 				if err := json.Unmarshal([]byte(s), &atts); err != nil {
-					log.Error("data Unmarshal Failed:", log.Field("error", err))
+					Logger.Error("data Unmarshal Failed:", Field("error", err))
 				}
 				saveMap[SaveFields[f]] = atts
 			}
-
 		} else {
 			if s := util.ObjToString(tmp[f]); s != "" {
+				if SaveFields[f] == "" {
+					Logger.Info("field ---: " + f)
+				}
 				saveMap[SaveFields[f]] = s
+
 				if SaveFields[f] == "buyer" || SaveFields[f] == "buyerperson" || SaveFields[f] == "buyertel" ||
 					SaveFields[f] == "area" || SaveFields[f] == "city" {
 					jyMap[SaveFields[f]] = s
@@ -261,8 +262,9 @@ func InfoPub(info map[string]interface{}) {
 	saveMap["href"] = fmt.Sprintf(JyUrl, util.CommonEncodeArticle("content", mongodb.BsonIdToSId(_id)))
 	saveMap["competehref"] = "#"
 	saveMap["jyfb_data"] = jyMap
-	saveMap["jyfbid"] = tmp["_id"]
+	saveMap["jyfb_id"] = util.ObjToString(info["id"])
 
+	Logger.Debug("InfoPub mgo save: " + fmt.Sprint(saveMap))
 	MgoBid.SaveByOriID(BidColl, saveMap)
 
 }
@@ -310,30 +312,31 @@ func taskAtts(obj *AttsResponse) {
 	attsJson, _ := json.Marshal(atts)
 	attsTextJson, _ := json.Marshal(atts_text)
 	// 直接调用剑鱼接口
-	req := &pb.SensitiveRequest{
-		Id:          util.ObjToString(obj.Other.Id),
-		MsgType:     util.ObjToString(obj.Other.MsgType),
-		Action:      util.ObjToString(obj.Other.Action),
+	req := &jypb.SensitiveRequest{
+		Id:      util.ObjToString(obj.Other.Id),
+		MsgType: util.ObjToString(obj.Other.MsgType),
+		//Action:      util.ObjToString(obj.Other.Action),
 		Title:       obj.Other.Title,
 		Detail:      obj.Other.Detail,
 		Attachments: string(attsJson),
 		AttachTxt:   string(attsTextJson),
 	}
-	util.Debug(req)
-	//JyRpcSensitive(req)
+	Logger.Debug("JyRpcSensitive request: " + fmt.Sprint(req))
+	JyRpcSensitive(req)
 }
 
 // @Description 敏感词识别完成调用剑鱼接口
 // @Author J 2022/4/13 11:16 AM
-func JyRpcSensitive(req *pb.SensitiveRequest) {
+func JyRpcSensitive(req *jypb.SensitiveRequest) {
 	conn := JyRpcClient.Conn()
 	defer conn.Close()
-	jyIntf := pb.NewJyInterfaceClient(conn)
+	jyIntf := jypb.NewCommonClient(conn)
 	resp, err := jyIntf.SensitiveMethod(context.Background(), req)
 	if err != nil {
-		log.Error(err.Error())
+		Logger.Error(err.Error())
+		return
 	}
-	log.Info(resp.String())
+	Logger.Info("JyRpcSensitive response: " + resp.String())
 }
 
 // @Description 信息删除(es、bidding、extract、project)
@@ -342,11 +345,11 @@ func DelMethod(res string) {
 	q := map[string]interface{}{"_id": mongodb.StringTOBsonId(res)}
 	b := MgoBid.Del(BidColl, q)
 	if !b {
-		log.Error(" bidding del fail...")
+		Logger.Error(" bidding del fail...")
 	}
 	b = MgoExt.Del(ExtColl, q)
 	if !b {
-		log.Error(" extract del fail...")
+		Logger.Error(" extract del fail...")
 	}
 	Es.DelById(Index, Itype, res)
 	Es.DelById(IndexAll, Itype, res)
@@ -359,6 +362,29 @@ func DelMethod(res string) {
 		IP:   net.ParseIP(project["addr"].(string)),
 		Port: util.IntAll(project["port"]),
 	}
-	log.Debug(string(by))
+	Logger.Debug(string(by))
 	_ = UdpClient.WriteUdp(by, util.OP_TYPE_DATA, addr)
 }
+
+// @Description 数据处理完成调用jy接口
+// @Author J 2022/4/9 11:41 AM
+func JyRpcDataFin(_id string) {
+	info, _ := MgoBid.FindById(BidColl, _id, `{"jyfb_id": 1}`)
+	if len(*info) == 0 {
+		Logger.Error("JyRpcDataFin mgo not find, id: " + _id)
+		return
+	}
+	conn := JyRpcClient.Conn()
+	defer conn.Close()
+	req := &jypb.StateRequest{
+		Id:        util.ObjToString((*info)["jyfb_id"]),
+		PublishId: _id,
+	}
+	jyIntf := jypb.NewCommonClient(conn)
+	Logger.Info("JyRpcDataFin request: " + req.String())
+	resp, err := jyIntf.StateMethod(context.Background(), req)
+	if err != nil {
+		Logger.Error(err.Error())
+	}
+	Logger.Info("JyRpcDataFin response: " + resp.String())
+}