Преглед на файлове

支持“铁合金现货预售挂牌”接口

zhou.xiaoning преди 3 години
родител
ревизия
641ff955b3
променени са 7 файла, в които са добавени 450 реда и са изтрити 11 реда
  1. 3 3
      config.yaml
  2. 3 0
      global/funcode.go
  3. 3 0
      global/topic.go
  4. 24 0
      initialize/rabbitmq.go
  5. 18 0
      model/mq/request/mq.go
  6. 368 8
      res/pb/mtp2.pb.go
  7. 31 0
      res/pb/mtp2.proto

+ 3 - 3
config.yaml

@@ -20,7 +20,7 @@ jwt:
 # redis configuration
 redis:
   db: 0
-  addr: '192.168.31.201:5007'
+  addr: '192.168.31.167:5007'
   password: ''
 
 # system configuration
@@ -39,14 +39,14 @@ oracle:
   address: '192.168.31.88'
   name: 'orcl'
   port: '1521'
-  user: 'mtp2_test201'
+  user: 'mtp2_test167'
   pwd: 'muchinfo'
   max-idle-conns: 10
   max-open-conns: 100
 
 # rabbitmq configuration
 rabbitmq:
-  url: 'amqp://guest:guest@192.168.31.201:5020/test'
+  url: 'amqp://guest:guest@192.168.31.167:5020/test'
   exchange: 'entry'
 
 # 跨域配置

+ 3 - 0
global/funcode.go

@@ -53,6 +53,9 @@ var (
 	WRListingCancelOrderRsp             = 1441797 // 挂牌撤单应答
 	ReceiptZSOutApplyReq                = 1376463 // 钻石出库申请接口请求
 	ReceiptZSOutApplyRsp                = 1376464 // 钻石出库申请接口响应
+
+	SpotPresaleListingOrderReq = 1441847 // 铁合金现货预售挂牌接口请求(1441847)
+	SpotPresaleListingOrderRsp = 1441848 // 铁合金现货预售挂牌接口应答(1441848)
 )
 
 // 通过请求功能码获取对应主题的方法

+ 3 - 0
global/topic.go

@@ -21,4 +21,7 @@ var (
 
 	TOPIC_REQ_WAREHOUSE_TRADE_GZ = "warehouse_trade_gz_req" // 广钻仓单贸易请求
 	TOPIC_RSP_WAREHOUSE_TRADE_GZ = "warehouse_trade_gz_rsp" // 广钻仓单贸易响应
+
+	TOPIC_REQ_WAREHOUSE_PRESALE_THJ = "warehouse_presale_thj_req" // 掌上铁合金现货预售请求
+	TOPIC_RSP_WAREHOUSE_PRESALE_THJ = "warehouse_presale_thj_rsp" // 掌上铁合金现货预售响应
 )

+ 24 - 0
initialize/rabbitmq.go

@@ -382,6 +382,19 @@ func (t *MQProc) getRspProtobuf(msg *[]byte) (funcode uint32, sessionId uint32,
 			bytes = &bs
 			serialNumber = p.GetHeader().GetRequestID()
 		}
+	case global.SpotPresaleListingOrderRsp: // 铁合金现货预售挂牌接口应答
+		var p pb.SpotPresaleListingOrderRsp
+		if err = proto.Unmarshal(b, &p); err != nil {
+			global.M2A_LOG.Error("总线回复数据反序列化失败", zap.Error(err))
+			return
+		}
+		if bs, e := protojson.Marshal(&p); e != nil {
+			global.M2A_LOG.Error("总线回复数据反序列化失败", zap.Error(err))
+			return
+		} else {
+			bytes = &bs
+			serialNumber = p.GetHeader().GetRequestID()
+		}
 	}
 
 	return
@@ -419,6 +432,12 @@ func RabbitMQSubscribeTopic() (err error) {
 		return
 	}
 
+	// 铁合金
+	if err = global.SubscribeTopic(global.TOPIC_RSP_WAREHOUSE_PRESALE_THJ); err != nil {
+		global.M2A_LOG.Error("rabbitmq subscribe topic failed, err:", zap.Error(err))
+		return
+	}
+
 	global.M2A_LOG.Info("rabbitmq subscribe topic successed.")
 
 	return
@@ -480,4 +499,9 @@ func InitFuncodeTopic() {
 		global.ZSBuyOrderDestingNegPriceReq,
 		global.ZSBuyOrderDestingNegPriceOperateReq,
 	}
+
+	// 铁合金
+	global.M2A_FuncodeTopic[global.TOPIC_REQ_WAREHOUSE_PRESALE_THJ] = []int{
+		global.SpotPresaleListingOrderReq,
+	}
 }

+ 18 - 0
model/mq/request/mq.go

@@ -496,6 +496,24 @@ func (r *MQBodyReq) GetProtoBytes(serialNumber *uint32) (bytes *[]byte, err erro
 		} else {
 			bytes = &b
 		}
+	case global.SpotPresaleListingOrderReq:
+		m := pb.SpotPresaleListingOrderReq{}
+		if err = r.reflect(data, &m); err != nil {
+			return
+		}
+		if m.Header != nil {
+			m.Header.RequestID = serialNumber
+		} else {
+			err = errors.New("请求信息序列化失败")
+			return
+		}
+		if b, e := proto.Marshal(&m); e != nil {
+			global.M2A_LOG.Error(e.Error(), zap.Error(e))
+			err = errors.New("请求信息序列化失败")
+			return
+		} else {
+			bytes = &b
+		}
 	}
 
 	return

+ 368 - 8
res/pb/mtp2.pb.go

@@ -6273,6 +6273,278 @@ func (x *ReceiptZSOutApplyRsp) GetClientTicket() string {
 	return ""
 }
 
+// 铁合金保证金配置信息
+type DepositConfigInfo struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	DepositRate    *float64 `protobuf:"fixed64,1,opt,name=DepositRate" json:"DepositRate,omitempty"`       // 定金比例
+	DiscountAmount *float64 `protobuf:"fixed64,2,opt,name=DiscountAmount" json:"DiscountAmount,omitempty"` // 优惠金额
+}
+
+func (x *DepositConfigInfo) Reset() {
+	*x = DepositConfigInfo{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_mtp2_proto_msgTypes[54]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *DepositConfigInfo) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DepositConfigInfo) ProtoMessage() {}
+
+func (x *DepositConfigInfo) ProtoReflect() protoreflect.Message {
+	mi := &file_mtp2_proto_msgTypes[54]
+	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 DepositConfigInfo.ProtoReflect.Descriptor instead.
+func (*DepositConfigInfo) Descriptor() ([]byte, []int) {
+	return file_mtp2_proto_rawDescGZIP(), []int{54}
+}
+
+func (x *DepositConfigInfo) GetDepositRate() float64 {
+	if x != nil && x.DepositRate != nil {
+		return *x.DepositRate
+	}
+	return 0
+}
+
+func (x *DepositConfigInfo) GetDiscountAmount() float64 {
+	if x != nil && x.DiscountAmount != nil {
+		return *x.DiscountAmount
+	}
+	return 0
+}
+
+// 铁合金现货预售挂牌接口请求
+type SpotPresaleListingOrderReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Header         *MessageHead         `protobuf:"bytes,1,opt,name=Header" json:"Header,omitempty"`
+	UserID         *uint32              `protobuf:"varint,2,opt,name=UserID" json:"UserID,omitempty"`                 // 用户ID,必填
+	AccountID      *uint64              `protobuf:"varint,3,opt,name=AccountID" json:"AccountID,omitempty"`           // 资金账号,必填
+	WRStandardID   *uint32              `protobuf:"varint,4,opt,name=WRStandardID" json:"WRStandardID,omitempty"`     // 现货商品ID,必填
+	WarehouseID    *uint32              `protobuf:"varint,5,opt,name=WarehouseID" json:"WarehouseID,omitempty"`       // 仓库ID,必填
+	Qty            *uint64              `protobuf:"varint,6,opt,name=Qty" json:"Qty,omitempty"`                       // 预售数量,必填
+	EndDate        *string              `protobuf:"bytes,7,opt,name=EndDate" json:"EndDate,omitempty"`                // 到期时间,必填
+	DepositConfigs []*DepositConfigInfo `protobuf:"bytes,8,rep,name=DepositConfigs" json:"DepositConfigs,omitempty"`  // 保证金配置信息,至少一组
+	ClientType     *uint32              `protobuf:"varint,9,opt,name=ClientType" json:"ClientType,omitempty"`         // 终端类型
+	ClientSerialNo *string              `protobuf:"bytes,10,opt,name=ClientSerialNo" json:"ClientSerialNo,omitempty"` // 客户端流水号
+	UnitPrice      *float64             `protobuf:"fixed64,11,opt,name=UnitPrice" json:"UnitPrice,omitempty"`         // 参考价,小数,前10,后2,必填
+}
+
+func (x *SpotPresaleListingOrderReq) Reset() {
+	*x = SpotPresaleListingOrderReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_mtp2_proto_msgTypes[55]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SpotPresaleListingOrderReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SpotPresaleListingOrderReq) ProtoMessage() {}
+
+func (x *SpotPresaleListingOrderReq) ProtoReflect() protoreflect.Message {
+	mi := &file_mtp2_proto_msgTypes[55]
+	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 SpotPresaleListingOrderReq.ProtoReflect.Descriptor instead.
+func (*SpotPresaleListingOrderReq) Descriptor() ([]byte, []int) {
+	return file_mtp2_proto_rawDescGZIP(), []int{55}
+}
+
+func (x *SpotPresaleListingOrderReq) GetHeader() *MessageHead {
+	if x != nil {
+		return x.Header
+	}
+	return nil
+}
+
+func (x *SpotPresaleListingOrderReq) GetUserID() uint32 {
+	if x != nil && x.UserID != nil {
+		return *x.UserID
+	}
+	return 0
+}
+
+func (x *SpotPresaleListingOrderReq) GetAccountID() uint64 {
+	if x != nil && x.AccountID != nil {
+		return *x.AccountID
+	}
+	return 0
+}
+
+func (x *SpotPresaleListingOrderReq) GetWRStandardID() uint32 {
+	if x != nil && x.WRStandardID != nil {
+		return *x.WRStandardID
+	}
+	return 0
+}
+
+func (x *SpotPresaleListingOrderReq) GetWarehouseID() uint32 {
+	if x != nil && x.WarehouseID != nil {
+		return *x.WarehouseID
+	}
+	return 0
+}
+
+func (x *SpotPresaleListingOrderReq) GetQty() uint64 {
+	if x != nil && x.Qty != nil {
+		return *x.Qty
+	}
+	return 0
+}
+
+func (x *SpotPresaleListingOrderReq) GetEndDate() string {
+	if x != nil && x.EndDate != nil {
+		return *x.EndDate
+	}
+	return ""
+}
+
+func (x *SpotPresaleListingOrderReq) GetDepositConfigs() []*DepositConfigInfo {
+	if x != nil {
+		return x.DepositConfigs
+	}
+	return nil
+}
+
+func (x *SpotPresaleListingOrderReq) GetClientType() uint32 {
+	if x != nil && x.ClientType != nil {
+		return *x.ClientType
+	}
+	return 0
+}
+
+func (x *SpotPresaleListingOrderReq) GetClientSerialNo() string {
+	if x != nil && x.ClientSerialNo != nil {
+		return *x.ClientSerialNo
+	}
+	return ""
+}
+
+func (x *SpotPresaleListingOrderReq) GetUnitPrice() float64 {
+	if x != nil && x.UnitPrice != nil {
+		return *x.UnitPrice
+	}
+	return 0
+}
+
+// 铁合金现货预售挂牌接口应答
+type SpotPresaleListingOrderRsp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Header         *MessageHead `protobuf:"bytes,1,opt,name=Header" json:"Header,omitempty"`                  // 消息头
+	RetCode        *int32       `protobuf:"varint,2,opt,name=RetCode" json:"RetCode,omitempty"`               // 返回码
+	RetDesc        *string      `protobuf:"bytes,3,opt,name=RetDesc" json:"RetDesc,omitempty"`                // 描述信息
+	PresaleApplyID *uint64      `protobuf:"varint,4,opt,name=PresaleApplyID" json:"PresaleApplyID,omitempty"` // 预售申请ID
+	WRTradeOrderID *uint64      `protobuf:"varint,5,opt,name=WRTradeOrderID" json:"WRTradeOrderID,omitempty"` // 委托单ID
+	ClientSerialNo *string      `protobuf:"bytes,6,opt,name=ClientSerialNo" json:"ClientSerialNo,omitempty"`  // 客户端流水号
+}
+
+func (x *SpotPresaleListingOrderRsp) Reset() {
+	*x = SpotPresaleListingOrderRsp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_mtp2_proto_msgTypes[56]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SpotPresaleListingOrderRsp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SpotPresaleListingOrderRsp) ProtoMessage() {}
+
+func (x *SpotPresaleListingOrderRsp) ProtoReflect() protoreflect.Message {
+	mi := &file_mtp2_proto_msgTypes[56]
+	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 SpotPresaleListingOrderRsp.ProtoReflect.Descriptor instead.
+func (*SpotPresaleListingOrderRsp) Descriptor() ([]byte, []int) {
+	return file_mtp2_proto_rawDescGZIP(), []int{56}
+}
+
+func (x *SpotPresaleListingOrderRsp) GetHeader() *MessageHead {
+	if x != nil {
+		return x.Header
+	}
+	return nil
+}
+
+func (x *SpotPresaleListingOrderRsp) GetRetCode() int32 {
+	if x != nil && x.RetCode != nil {
+		return *x.RetCode
+	}
+	return 0
+}
+
+func (x *SpotPresaleListingOrderRsp) GetRetDesc() string {
+	if x != nil && x.RetDesc != nil {
+		return *x.RetDesc
+	}
+	return ""
+}
+
+func (x *SpotPresaleListingOrderRsp) GetPresaleApplyID() uint64 {
+	if x != nil && x.PresaleApplyID != nil {
+		return *x.PresaleApplyID
+	}
+	return 0
+}
+
+func (x *SpotPresaleListingOrderRsp) GetWRTradeOrderID() uint64 {
+	if x != nil && x.WRTradeOrderID != nil {
+		return *x.WRTradeOrderID
+	}
+	return 0
+}
+
+func (x *SpotPresaleListingOrderRsp) GetClientSerialNo() string {
+	if x != nil && x.ClientSerialNo != nil {
+		return *x.ClientSerialNo
+	}
+	return ""
+}
+
 var File_mtp2_proto protoreflect.FileDescriptor
 
 var file_mtp2_proto_rawDesc = []byte{
@@ -7432,7 +7704,53 @@ var file_mtp2_proto_rawDesc = []byte{
 	0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x44, 0x12, 0x22, 0x0a,
 	0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x06, 0x20,
 	0x01, 0x28, 0x09, 0x52, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65,
-	0x74,
+	0x74, 0x22, 0x5d, 0x0a, 0x11, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66,
+	0x69, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69,
+	0x74, 0x52, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x44, 0x65, 0x70,
+	0x6f, 0x73, 0x69, 0x74, 0x52, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x63,
+	0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01,
+	0x52, 0x0e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74,
+	0x22, 0x92, 0x03, 0x0a, 0x1a, 0x53, 0x70, 0x6f, 0x74, 0x50, 0x72, 0x65, 0x73, 0x61, 0x6c, 0x65,
+	0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12,
+	0x27, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+	0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, 0x61, 0x64,
+	0x52, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72,
+	0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44,
+	0x12, 0x1c, 0x0a, 0x09, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x04, 0x52, 0x09, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x22,
+	0x0a, 0x0c, 0x57, 0x52, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x49, 0x44, 0x18, 0x04,
+	0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x57, 0x52, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64,
+	0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49,
+	0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75,
+	0x73, 0x65, 0x49, 0x44, 0x12, 0x10, 0x0a, 0x03, 0x51, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28,
+	0x04, 0x52, 0x03, 0x51, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x45, 0x6e, 0x64, 0x44, 0x61, 0x74,
+	0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x45, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65,
+	0x12, 0x3d, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+	0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65,
+	0x70, 0x6f, 0x73, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52,
+	0x0e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12,
+	0x1e, 0x0a, 0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20,
+	0x01, 0x28, 0x0d, 0x52, 0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12,
+	0x26, 0x0a, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e,
+	0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53,
+	0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x55, 0x6e, 0x69, 0x74, 0x50,
+	0x72, 0x69, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x55, 0x6e, 0x69, 0x74,
+	0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0xf1, 0x01, 0x0a, 0x1a, 0x53, 0x70, 0x6f, 0x74, 0x50, 0x72,
+	0x65, 0x73, 0x61, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x64, 0x65,
+	0x72, 0x52, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
+	0x65, 0x48, 0x65, 0x61, 0x64, 0x52, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a,
+	0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
+	0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x44, 0x65,
+	0x73, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x52, 0x65, 0x74, 0x44, 0x65, 0x73,
+	0x63, 0x12, 0x26, 0x0a, 0x0e, 0x50, 0x72, 0x65, 0x73, 0x61, 0x6c, 0x65, 0x41, 0x70, 0x70, 0x6c,
+	0x79, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x50, 0x72, 0x65, 0x73, 0x61,
+	0x6c, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x57, 0x52, 0x54,
+	0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28,
+	0x04, 0x52, 0x0e, 0x57, 0x52, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49,
+	0x44, 0x12, 0x26, 0x0a, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61,
+	0x6c, 0x4e, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e,
+	0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x6f,
 }
 
 var (
@@ -7447,7 +7765,7 @@ func file_mtp2_proto_rawDescGZIP() []byte {
 	return file_mtp2_proto_rawDescData
 }
 
-var file_mtp2_proto_msgTypes = make([]protoimpl.MessageInfo, 54)
+var file_mtp2_proto_msgTypes = make([]protoimpl.MessageInfo, 57)
 var file_mtp2_proto_goTypes = []interface{}{
 	(*MessageHead)(nil),                         // 0: pb.MessageHead
 	(*ModifyPwdReq)(nil),                        // 1: pb.ModifyPwdReq
@@ -7503,6 +7821,9 @@ var file_mtp2_proto_goTypes = []interface{}{
 	(*WRListingCancelOrderRsp)(nil),             // 51: pb.WRListingCancelOrderRsp
 	(*ReceiptZSOutApplyReq)(nil),                // 52: pb.ReceiptZSOutApplyReq
 	(*ReceiptZSOutApplyRsp)(nil),                // 53: pb.ReceiptZSOutApplyRsp
+	(*DepositConfigInfo)(nil),                   // 54: pb.DepositConfigInfo
+	(*SpotPresaleListingOrderReq)(nil),          // 55: pb.SpotPresaleListingOrderReq
+	(*SpotPresaleListingOrderRsp)(nil),          // 56: pb.SpotPresaleListingOrderRsp
 }
 var file_mtp2_proto_depIdxs = []int32{
 	0,  // 0: pb.ModifyPwdReq.Header:type_name -> pb.MessageHead
@@ -7559,11 +7880,14 @@ var file_mtp2_proto_depIdxs = []int32{
 	21, // 51: pb.ReceiptZSOutApplyReq.Common:type_name -> pb.WRCommon
 	0,  // 52: pb.ReceiptZSOutApplyRsp.Header:type_name -> pb.MessageHead
 	21, // 53: pb.ReceiptZSOutApplyRsp.Common:type_name -> pb.WRCommon
-	54, // [54:54] is the sub-list for method output_type
-	54, // [54:54] is the sub-list for method input_type
-	54, // [54:54] is the sub-list for extension type_name
-	54, // [54:54] is the sub-list for extension extendee
-	0,  // [0:54] is the sub-list for field type_name
+	0,  // 54: pb.SpotPresaleListingOrderReq.Header:type_name -> pb.MessageHead
+	54, // 55: pb.SpotPresaleListingOrderReq.DepositConfigs:type_name -> pb.DepositConfigInfo
+	0,  // 56: pb.SpotPresaleListingOrderRsp.Header:type_name -> pb.MessageHead
+	57, // [57:57] is the sub-list for method output_type
+	57, // [57:57] is the sub-list for method input_type
+	57, // [57:57] is the sub-list for extension type_name
+	57, // [57:57] is the sub-list for extension extendee
+	0,  // [0:57] is the sub-list for field type_name
 }
 
 func init() { file_mtp2_proto_init() }
@@ -8220,6 +8544,42 @@ func file_mtp2_proto_init() {
 				return nil
 			}
 		}
+		file_mtp2_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DepositConfigInfo); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_mtp2_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SpotPresaleListingOrderReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_mtp2_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SpotPresaleListingOrderRsp); 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{
@@ -8227,7 +8587,7 @@ func file_mtp2_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_mtp2_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   54,
+			NumMessages:   57,
 			NumExtensions: 0,
 			NumServices:   0,
 		},

+ 31 - 0
res/pb/mtp2.proto

@@ -726,4 +726,35 @@ message ReceiptZSOutApplyRsp {
 		optional WRCommon Common = 4; // 
 		optional uint64 ApplyID = 5; // 申请ID
 		optional string ClientTicket = 6; // 客户端流水号
+}
+
+// 铁合金保证金配置信息
+message DepositConfigInfo {
+		optional double DepositRate = 1; // 定金比例
+		optional double DiscountAmount = 2; // 优惠金额
+}
+
+// 铁合金现货预售挂牌接口请求
+message SpotPresaleListingOrderReq {
+	optional MessageHead Header = 1;
+		optional uint32 UserID = 2; // 用户ID,必填
+		optional uint64 AccountID = 3; // 资金账号,必填
+		optional uint32 WRStandardID = 4; // 现货商品ID,必填
+		optional uint32 WarehouseID = 5; // 仓库ID,必填
+		optional uint64 Qty = 6; // 预售数量,必填
+		optional string EndDate = 7; // 到期时间,必填
+		repeated DepositConfigInfo DepositConfigs = 8; // 保证金配置信息,至少一组
+		optional uint32 ClientType = 9; // 终端类型
+		optional string ClientSerialNo = 10; // 客户端流水号
+		optional double UnitPrice = 11; // 参考价,小数,前10,后2,必填
+}
+
+// 铁合金现货预售挂牌接口应答
+message SpotPresaleListingOrderRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		optional uint64 PresaleApplyID = 4; // 预售申请ID
+		optional uint64 WRTradeOrderID = 5; // 委托单ID
+		optional string ClientSerialNo = 6; // 客户端流水号
 }