Kaynağa Gözat

fix:企业id加密

xmy 3 yıl önce
ebeveyn
işleme
42d08812a0

+ 2 - 2
rpc/consumer/consumer.proto

@@ -267,7 +267,7 @@ message SupplyInfoDetailData {
 	string province = 4;//省份
 	string city = 5;//城市
 	string validityTime = 6;//有效期
-	int64 entId = 7;//企业id
+	string entId = 7;//企业id
 	string attach = 8;//附件列表
 	InfoDetailContact  infoDetailContact = 9;//联系人详情
 	string publishTime = 10;//发布时间
@@ -281,7 +281,7 @@ message OtherSupplyInfoByEnt{
 	string city = 4;
 	string publishTime = 5;
 	string createTime = 6;
-	int64 entId = 7;
+	string entId = 7;
 }
 //上传附件
 message InfoFileUploadReq {

+ 1 - 1
rpc/consumer/etc/consumer.yaml

@@ -29,4 +29,4 @@ Oss:
   ossAccessKeyId: LTAI4G5x9aoZx8dDamQ7vfZi
   ossAccessKeySecret: Bk98FsbPYXcJe72n1bG3Ssf73acuNh
   ossBucketName: jytest2022
-  ossUrl: https://jytest2022.oss-cn-beijing.aliyuncs.com/
+  ossUrl: https://jytest2022.oss-cn-beijing.aliyuncs.com

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

@@ -56,7 +56,7 @@ func (l *SupplyInfoDetailLogic) SupplyInfoDetail(in *consumerinfo.StatusReq) (*c
 			conctact.Overt = mc.Int64All((*data)["contact_overt"])
 			info.InfoDetailContact = &conctact
 			info.Attach = astr
-			info.EntId = mc.Int64All((*data)["ent_id"])
+			info.EntId = se.SE.Encode2HexByCheck(mc.InterfaceToStr((*data)["ent_id"]))
 			info.Id = in.MsgId
 			//其他供应信息
 			otherData := es.GetSupplyOtherInfoByEntid(mc.InterfaceToStr(info.EntId), 5)
@@ -72,7 +72,7 @@ func (l *SupplyInfoDetailLogic) SupplyInfoDetail(in *consumerinfo.StatusReq) (*c
 						City:        mc.InterfaceToStr(v["city"]),
 						PublishTime: strconv.FormatInt(mc.Int64All(v["publish_time"]), 10),
 						CreateTime:  strconv.FormatInt(mc.Int64All(v["create_time"]), 10),
-						EntId:       mc.Int64All(v["ent_id"]),
+						EntId:       se.SE.Encode2HexByCheck(mc.InterfaceToStr(v["ent_id"])),
 					}
 					info.OtherSupplyInfo = append(info.OtherSupplyInfo, &otherSupplyInfo)
 				}

+ 10 - 15
rpc/consumer/type/consumer/consumer.pb.go

@@ -1,13 +1,12 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.23.0
-// 	protoc        v3.15.5
+// 	protoc-gen-go v1.28.0
+// 	protoc        v3.19.4
 // source: consumer.proto
 
 package consumer
 
 import (
-	proto "github.com/golang/protobuf/proto"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
 	reflect "reflect"
@@ -21,10 +20,6 @@ const (
 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
 )
 
-// This is a compile-time assertion that a sufficiently up-to-date version
-// of the legacy proto package is being used.
-const _ = proto.ProtoPackageIsVersion4
-
 //信息发布Req
 type PublishInfoReq struct {
 	state         protoimpl.MessageState
@@ -2456,7 +2451,7 @@ type SupplyInfoDetailData struct {
 	Province          string                  `protobuf:"bytes,4,opt,name=province,proto3" json:"province,omitempty"`                   //省份
 	City              string                  `protobuf:"bytes,5,opt,name=city,proto3" json:"city,omitempty"`                           //城市
 	ValidityTime      string                  `protobuf:"bytes,6,opt,name=validityTime,proto3" json:"validityTime,omitempty"`           //有效期
-	EntId             int64                   `protobuf:"varint,7,opt,name=entId,proto3" json:"entId,omitempty"`                        //企业id
+	EntId             string                  `protobuf:"bytes,7,opt,name=entId,proto3" json:"entId,omitempty"`                         //企业id
 	Attach            string                  `protobuf:"bytes,8,opt,name=attach,proto3" json:"attach,omitempty"`                       //附件列表
 	InfoDetailContact *InfoDetailContact      `protobuf:"bytes,9,opt,name=infoDetailContact,proto3" json:"infoDetailContact,omitempty"` //联系人详情
 	PublishTime       string                  `protobuf:"bytes,10,opt,name=publishTime,proto3" json:"publishTime,omitempty"`            //发布时间
@@ -2537,11 +2532,11 @@ func (x *SupplyInfoDetailData) GetValidityTime() string {
 	return ""
 }
 
-func (x *SupplyInfoDetailData) GetEntId() int64 {
+func (x *SupplyInfoDetailData) GetEntId() string {
 	if x != nil {
 		return x.EntId
 	}
-	return 0
+	return ""
 }
 
 func (x *SupplyInfoDetailData) GetAttach() string {
@@ -2584,7 +2579,7 @@ type OtherSupplyInfoByEnt struct {
 	City        string `protobuf:"bytes,4,opt,name=city,proto3" json:"city,omitempty"`
 	PublishTime string `protobuf:"bytes,5,opt,name=publishTime,proto3" json:"publishTime,omitempty"`
 	CreateTime  string `protobuf:"bytes,6,opt,name=createTime,proto3" json:"createTime,omitempty"`
-	EntId       int64  `protobuf:"varint,7,opt,name=entId,proto3" json:"entId,omitempty"`
+	EntId       string `protobuf:"bytes,7,opt,name=entId,proto3" json:"entId,omitempty"`
 }
 
 func (x *OtherSupplyInfoByEnt) Reset() {
@@ -2661,11 +2656,11 @@ func (x *OtherSupplyInfoByEnt) GetCreateTime() string {
 	return ""
 }
 
-func (x *OtherSupplyInfoByEnt) GetEntId() int64 {
+func (x *OtherSupplyInfoByEnt) GetEntId() string {
 	if x != nil {
 		return x.EntId
 	}
-	return 0
+	return ""
 }
 
 //上传附件
@@ -3302,7 +3297,7 @@ var file_consumer_proto_rawDesc = []byte{
 	0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06,
 	0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x54, 0x69,
 	0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x74, 0x74, 0x61,
+	0x09, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x74, 0x74, 0x61,
 	0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68,
 	0x12, 0x49, 0x0a, 0x11, 0x69, 0x6e, 0x66, 0x6f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, 0x6f,
 	0x6e, 0x74, 0x61, 0x63, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f,
@@ -3327,7 +3322,7 @@ var file_consumer_proto_rawDesc = []byte{
 	0x6c, 0x69, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61,
 	0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72,
 	0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49,
-	0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x5f,
+	0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x5f,
 	0x0a, 0x11, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64,
 	0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18,
 	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12,

+ 1 - 1
rpc/consumer/type/consumer/consumer_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.15.5
+// - protoc             v3.19.4
 // source: consumer.proto
 
 package consumer