li.shaoyi 2 месяцев назад
Родитель
Сommit
7b19a848ee

+ 700 - 0
public/proto/mtp.js

@@ -4070,6 +4070,38 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
       }
     }
   },
+  DigitalAccountChangedNtf: {
+    fields: {
+      Header: {
+        type: "MessageHead",
+        id: 1
+      },
+      NtfHeader: {
+        type: "NotifyHead",
+        id: 2
+      },
+      DigitalAccountID: {
+        type: "uint64",
+        id: 3
+      }
+    }
+  },
+  DigitalAccountFundsChangedNtf: {
+    fields: {
+      Header: {
+        type: "MessageHead",
+        id: 1
+      },
+      NtfHeader: {
+        type: "NotifyHead",
+        id: 2
+      },
+      DigitalAccountID: {
+        type: "uint64",
+        id: 3
+      }
+    }
+  },
   OrderReq: {
     fields: {
       Header: {
@@ -9536,6 +9568,218 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
       }
     }
   },
+  DigitalOrderReq: {
+    fields: {
+      Header: {
+        type: "MessageHead",
+        id: 1
+      },
+      ClientSerialNo: {
+        type: "string",
+        id: 2
+      },
+      ClientOrderTime: {
+        type: "string",
+        id: 3
+      },
+      ClientType: {
+        type: "uint32",
+        id: 4
+      },
+      LoginID: {
+        type: "uint64",
+        id: 5
+      },
+      BaseAccountID: {
+        type: "uint64",
+        id: 6
+      },
+      GoodsID: {
+        type: "uint32",
+        id: 7
+      },
+      MarketID: {
+        type: "uint32",
+        id: 8
+      },
+      ValidType: {
+        type: "int32",
+        id: 9
+      },
+      OperateType: {
+        type: "uint32",
+        id: 10
+      },
+      OrderSrc: {
+        type: "uint32",
+        id: 11
+      },
+      OperatorID: {
+        type: "uint64",
+        id: 12
+      },
+      OrderPrice: {
+        type: "double",
+        id: 13
+      },
+      MarketMaxSub: {
+        type: "double",
+        id: 14
+      },
+      OrderQty: {
+        type: "double",
+        id: 15
+      },
+      BuyOrSell: {
+        type: "uint32",
+        id: 16
+      },
+      BuildType: {
+        type: "uint32",
+        id: 17
+      },
+      CurtQuotePrice: {
+        type: "double",
+        id: 18
+      },
+      SpPrice: {
+        type: "double",
+        id: 19
+      },
+      SlPrice: {
+        type: "double",
+        id: 20
+      },
+      PriceMode: {
+        type: "uint32",
+        id: 21
+      },
+      TimevalidType: {
+        type: "uint32",
+        id: 22
+      },
+      TriggerType: {
+        type: "uint32",
+        id: 23
+      },
+      TriggerPrice: {
+        type: "double",
+        id: 24
+      },
+      ListingSelectType: {
+        type: "uint32",
+        id: 25
+      },
+      DelistingType: {
+        type: "uint32",
+        id: 26
+      },
+      RelatedID: {
+        type: "uint64",
+        id: 27
+      },
+      OptionType: {
+        type: "uint32",
+        id: 28
+      },
+      Premium: {
+        type: "double",
+        id: 29
+      },
+      TriggerOperator: {
+        type: "uint32",
+        id: 30
+      },
+      ServiceTime: {
+        type: "string",
+        id: 31
+      },
+      CouponTypeID: {
+        type: "uint64",
+        id: 32
+      },
+      UsedQty: {
+        type: "double",
+        id: 33
+      },
+      ValidTime: {
+        type: "string",
+        id: 34
+      },
+      ReceiveInfoID: {
+        type: "uint64",
+        id: 35
+      },
+      OrderFlag: {
+        type: "uint32",
+        id: 36
+      },
+      OrderAmount: {
+        type: "double",
+        id: 37
+      },
+      IsAutoAddDeposit: {
+        type: "uint32",
+        id: 38
+      },
+      IsAutoRefundDeposit: {
+        type: "uint32",
+        id: 39
+      },
+      AddrInfo: {
+        type: "string",
+        id: 40
+      },
+      TPFlag: {
+        type: "uint32",
+        id: 41
+      },
+      TPRatio: {
+        type: "double",
+        id: 42
+      },
+      SLFlag: {
+        type: "uint32",
+        id: 43
+      },
+      SLRatio: {
+        type: "double",
+        id: 44
+      },
+      QuoteAccountID: {
+        type: "uint64",
+        id: 45
+      },
+      OrderMode: {
+        type: "uint32",
+        id: 46
+      }
+    }
+  },
+  DigitalOrderRsp: {
+    fields: {
+      Header: {
+        type: "MessageHead",
+        id: 1
+      },
+      RetCode: {
+        type: "int32",
+        id: 2
+      },
+      RetDesc: {
+        type: "string",
+        id: 3
+      },
+      OrderID: {
+        type: "uint64",
+        id: 4
+      },
+      OrderTime: {
+        type: "string",
+        id: 5
+      }
+    }
+  },
   SubCommand: {
     fields: {
       CommandCode: {
@@ -51682,6 +51926,462 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
         id: 5
       }
     }
+  },
+  DigitalAccountTransferApplyReq: {
+    fields: {
+      Header: {
+        type: "MessageHead",
+        id: 1
+      },
+      AccountID: {
+        rule: "required",
+        type: "uint64",
+        id: 2
+      },
+      UserID: {
+        rule: "required",
+        type: "uint32",
+        id: 3
+      },
+      CurrencyID: {
+        rule: "required",
+        type: "uint32",
+        id: 4
+      },
+      DigitalTransferType: {
+        type: "uint32",
+        id: 5
+      },
+      Amount: {
+        rule: "required",
+        type: "double",
+        id: 6
+      },
+      ClientTicket: {
+        rule: "required",
+        type: "string",
+        id: 7
+      },
+      Remark: {
+        type: "string",
+        id: 8
+      }
+    }
+  },
+  DigitalAccountTransferApplyRsp: {
+    fields: {
+      Header: {
+        type: "MessageHead",
+        id: 1
+      },
+      RetCode: {
+        type: "int32",
+        id: 2
+      },
+      RetDesc: {
+        type: "string",
+        id: 3
+      },
+      ApplyID: {
+        type: "uint64",
+        id: 4
+      },
+      DigitalAccountID: {
+        type: "uint64",
+        id: 5
+      },
+      ClientTicket: {
+        rule: "required",
+        type: "string",
+        id: 6
+      }
+    }
+  },
+  DigitalAccountDepositApplyReq: {
+    fields: {
+      Header: {
+        type: "MessageHead",
+        id: 1
+      },
+      UserID: {
+        rule: "required",
+        type: "uint32",
+        id: 2
+      },
+      CurrencyID: {
+        rule: "required",
+        type: "uint32",
+        id: 3
+      },
+      WalletID: {
+        rule: "required",
+        type: "uint32",
+        id: 4
+      },
+      Amount: {
+        rule: "required",
+        type: "double",
+        id: 5
+      },
+      ClientTicket: {
+        rule: "required",
+        type: "string",
+        id: 6
+      },
+      Remark: {
+        type: "string",
+        id: 7
+      },
+      ExtendInfo: {
+        type: "string",
+        id: 8
+      }
+    }
+  },
+  DigitalAccountDepositApplyRsp: {
+    fields: {
+      Header: {
+        type: "MessageHead",
+        id: 1
+      },
+      RetCode: {
+        type: "int32",
+        id: 2
+      },
+      RetDesc: {
+        type: "string",
+        id: 3
+      },
+      ApplyID: {
+        type: "uint64",
+        id: 4
+      },
+      DigitalAccountID: {
+        type: "uint64",
+        id: 5
+      },
+      ClientTicket: {
+        rule: "required",
+        type: "string",
+        id: 6
+      },
+      NetAddr: {
+        type: "string",
+        id: 7
+      },
+      ExtendInfo: {
+        type: "string",
+        id: 8
+      }
+    }
+  },
+  DigitalAccountWithdrawApplyReq: {
+    fields: {
+      Header: {
+        type: "MessageHead",
+        id: 1
+      },
+      UserID: {
+        rule: "required",
+        type: "uint32",
+        id: 2
+      },
+      CurrencyID: {
+        rule: "required",
+        type: "uint32",
+        id: 3
+      },
+      WalletID: {
+        rule: "required",
+        type: "uint32",
+        id: 4
+      },
+      DigitalAccountID: {
+        rule: "required",
+        type: "uint64",
+        id: 5
+      },
+      Amount: {
+        rule: "required",
+        type: "double",
+        id: 6
+      },
+      ClientTicket: {
+        rule: "required",
+        type: "string",
+        id: 7
+      },
+      Remark: {
+        type: "string",
+        id: 8
+      },
+      ExtendInfo: {
+        type: "string",
+        id: 9
+      }
+    }
+  },
+  DigitalAccountWithdrawApplyRsp: {
+    fields: {
+      Header: {
+        type: "MessageHead",
+        id: 1
+      },
+      RetCode: {
+        type: "int32",
+        id: 2
+      },
+      RetDesc: {
+        type: "string",
+        id: 3
+      },
+      ApplyID: {
+        type: "uint64",
+        id: 4
+      },
+      ClientTicket: {
+        rule: "required",
+        type: "string",
+        id: 5
+      },
+      Status: {
+        type: "uint32",
+        id: 6
+      }
+    }
+  },
+  DigitalAccountWithdrawApplyCancelReq: {
+    fields: {
+      Header: {
+        type: "MessageHead",
+        id: 1
+      },
+      ApplyID: {
+        rule: "required",
+        type: "uint64",
+        id: 2
+      },
+      UserID: {
+        rule: "required",
+        type: "uint32",
+        id: 3
+      },
+      ClientTicket: {
+        rule: "required",
+        type: "string",
+        id: 4
+      },
+      Remark: {
+        type: "string",
+        id: 5
+      }
+    }
+  },
+  DigitalAccountWithdrawApplyCancelRsp: {
+    fields: {
+      Header: {
+        type: "MessageHead",
+        id: 1
+      },
+      RetCode: {
+        type: "int32",
+        id: 2
+      },
+      RetDesc: {
+        type: "string",
+        id: 3
+      },
+      ApplyID: {
+        rule: "required",
+        type: "uint64",
+        id: 4
+      },
+      ClientTicket: {
+        rule: "required",
+        type: "string",
+        id: 5
+      }
+    }
+  },
+  DigitalAccountWithdrawApplyAuditReq: {
+    fields: {
+      Header: {
+        type: "MessageHead",
+        id: 1
+      },
+      ApplyID: {
+        rule: "required",
+        type: "uint64",
+        id: 2
+      },
+      Status: {
+        rule: "required",
+        type: "uint32",
+        id: 3
+      },
+      ClientTicket: {
+        rule: "required",
+        type: "string",
+        id: 4
+      },
+      Remark: {
+        type: "string",
+        id: 5
+      }
+    }
+  },
+  DigitalAccountWithdrawApplyAuditRsp: {
+    fields: {
+      Header: {
+        type: "MessageHead",
+        id: 1
+      },
+      RetCode: {
+        type: "int32",
+        id: 2
+      },
+      RetDesc: {
+        type: "string",
+        id: 3
+      },
+      ApplyID: {
+        rule: "required",
+        type: "uint64",
+        id: 4
+      },
+      ClientTicket: {
+        rule: "required",
+        type: "string",
+        id: 5
+      }
+    }
+  },
+  DigitalAccountCommandReq: {
+    fields: {
+      Header: {
+        type: "MessageHead",
+        id: 1
+      },
+      UserID: {
+        rule: "required",
+        type: "uint32",
+        id: 2
+      },
+      DigitalAccountID: {
+        rule: "required",
+        type: "uint64",
+        id: 3
+      },
+      DigitalBusinessCode: {
+        rule: "required",
+        type: "uint32",
+        id: 4
+      },
+      RelatedOrderID: {
+        type: "uint64",
+        id: 5
+      },
+      SubCommands: {
+        rule: "repeated",
+        type: "DigitalSubCommand",
+        id: 6
+      },
+      SerialNumber: {
+        rule: "required",
+        type: "uint64",
+        id: 7
+      }
+    }
+  },
+  DigitalAccountCommandRsp: {
+    fields: {
+      Header: {
+        type: "MessageHead",
+        id: 1
+      },
+      RetCode: {
+        type: "int32",
+        id: 2
+      },
+      RetDesc: {
+        type: "string",
+        id: 3
+      },
+      UserID: {
+        rule: "required",
+        type: "uint32",
+        id: 4
+      },
+      DigitalAccountID: {
+        rule: "required",
+        type: "uint64",
+        id: 5
+      },
+      DigitalBusinessCode: {
+        rule: "required",
+        type: "uint32",
+        id: 6
+      },
+      RelatedOrderID: {
+        type: "uint64",
+        id: 7
+      },
+      SubCommands: {
+        rule: "repeated",
+        type: "DigitalSubCommand",
+        id: 8
+      },
+      SerialNumber: {
+        rule: "required",
+        type: "uint64",
+        id: 9
+      }
+    }
+  },
+  DigitalSubCommand: {
+    fields: {
+      CommandCode: {
+        rule: "required",
+        type: "uint32",
+        id: 1
+      },
+      CommandStrings: {
+        rule: "required",
+        type: "bytes",
+        id: 2
+      }
+    }
+  },
+  DigitalFundOperationCmd: {
+    fields: {
+      DigitalAccountID: {
+        rule: "required",
+        type: "uint64",
+        id: 1
+      },
+      DigitalOperateType: {
+        rule: "required",
+        type: "uint32",
+        id: 2
+      },
+      ChangeAmount: {
+        rule: "required",
+        type: "double",
+        id: 3
+      },
+      RelatedGoodsID: {
+        type: "uint32",
+        id: 4
+      },
+      RelatedMarketID: {
+        type: "uint32",
+        id: 5
+      },
+      SubOrderIndex: {
+        type: "uint64",
+        id: 6
+      }
+    }
   }
 });
 

+ 200 - 0
public/proto/mtp.proto

@@ -1210,6 +1210,18 @@ message UserAuditConfigChangeNtf {
 		optional int64 DailyMaxBuyDeliveryQty = 10; // int64 日最大买交收数量(52,-1为不限)
 		optional int64 DailyMaxSellDeliveryQty = 11; // int64 日最大卖交收数量(52,-1为不限)
 }
+// 数字账户变化通知
+message DigitalAccountChangedNtf {
+	optional MessageHead Header = 1; // 消息头
+		optional NotifyHead NtfHeader = 2; // NotifyHead 公共消息头
+		optional uint64 DigitalAccountID = 3; // uint64 数字账户ID
+}
+// 数字账户资金变化通知
+message DigitalAccountFundsChangedNtf {
+	optional MessageHead Header = 1; // 消息头
+		optional NotifyHead NtfHeader = 2; // NotifyHead 公共消息头
+		optional uint64 DigitalAccountID = 3; // uint64 数字账户ID
+}
 // 交易委托请求
 message OrderReq {
 	optional MessageHead Header = 1;
@@ -2894,6 +2906,63 @@ message GoodsInventoryApplyAuditRsp {
 	optional string RetDesc = 3; // 描述信息
 		optional uint64 ApplyID = 4; // 申请单Id
 }
+// 数字交易委托请求
+message DigitalOrderReq {
+	optional MessageHead Header = 1;
+		optional string ClientSerialNo = 2; // 客户端流水号
+		optional string ClientOrderTime = 3; // 客户端委托时间
+		optional uint32 ClientType = 4; // 终端类型
+		optional uint64 LoginID = 5; // 登陆账号
+		optional uint64 BaseAccountID = 6; // 基础货币账号
+		optional uint32 GoodsID = 7; // 商品ID
+		optional uint32 MarketID = 8; // 市场ID
+		optional int32 ValidType = 9; // 校验类型
+		optional uint32 OperateType = 10; // 操作类型:
+		optional uint32 OrderSrc = 11; // 单据来源
+		optional uint64 OperatorID = 12; // 操作员账号ID
+		optional double OrderPrice = 13; // 委托价格
+		optional double MarketMaxSub = 14; // 市价允许最大偏差(做市)
+		optional double OrderQty = 15; // 委托数量
+		optional uint32 BuyOrSell = 16; // 买卖方向
+		optional uint32 BuildType = 17; // 下单类型
+		optional double CurtQuotePrice = 18; // 保留,计算冻结金额使用
+		optional double SpPrice = 19; // 止盈价格
+		optional double SlPrice = 20; // 止损价格
+		optional uint32 PriceMode = 21; // 取价方式
+		optional uint32 TimevalidType = 22; // 时间有效类型
+		optional uint32 TriggerType = 23; // 预埋单触发类型
+		optional double TriggerPrice = 24; // 预埋单触发价格
+		optional uint32 ListingSelectType = 25; // 挂牌点选类型
+		optional uint32 DelistingType = 26; // 摘牌类型
+		optional uint64 RelatedID = 27; // 关联单号
+		optional uint32 OptionType = 28; // 期权类型(1:认购(看涨)2:认沽(看跌))
+		optional double Premium = 29; // 权利金
+		optional uint32 TriggerOperator = 30; // 触发条件(1:大于等于2:小于等于)
+		optional string ServiceTime = 31; // 服务端时间
+		optional uint64 CouponTypeID = 32; // 优惠券类型ID(买方)
+		optional double UsedQty = 33; // 使用数量
+		optional string ValidTime = 34; // 指定有效日期
+		optional uint64 ReceiveInfoID = 35; // 收货地址ID
+		optional uint32 OrderFlag = 36; // 委托标识-1:按量
+		optional double OrderAmount = 37; // 委托金额OrderFlag=2必填
+		optional uint32 IsAutoAddDeposit = 38; // 是否允许自动补定金
+		optional uint32 IsAutoRefundDeposit = 39; // 是否允许自动退定金
+		optional string AddrInfo = 40; // 地址信息
+		optional uint32 TPFlag = 41; // 止盈标识:0-未设置1-设置
+		optional double TPRatio = 42; // 止盈比例
+		optional uint32 SLFlag = 43; // 止损标识:0-未设置1-设置
+		optional double SLRatio = 44; // 止损比例
+		optional uint64 QuoteAccountID = 45; // 计价数字账户
+		optional uint32 OrderMode = 46; // 委托方式-1:按数量
+}
+// 数字交易委托应答
+message DigitalOrderRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		optional uint64 OrderID = 4; // 一级生成的订单号
+		optional string OrderTime = 5; // 接收委托交易的时间
+}
 // 账户操作子指令
 message SubCommand {
 		optional uint32 CommandCode = 1; // 子指令操作码
@@ -15589,3 +15658,134 @@ message CoupScanAndDealImportRecordRsp {
 			optional uint64 reqid = 4; // 请求ID
 			optional uint64 srcReqFunCode = 5; // 原始请求功能码
 }
+// 数字账户转入转出申请请求
+message DigitalAccountTransferApplyReq {
+	optional MessageHead Header = 1;
+		required uint64 AccountID = 2; // 交易账号
+			required uint32 UserID = 3; // 用户ID
+		required uint32 CurrencyID = 4; // 币种ID
+		optional uint32 DigitalTransferType = 5; // 划转类型-枚举"digitaltransfertype"(3:转入
+		required double Amount = 6; // 转入转出金额
+		required string ClientTicket = 7; // 客户端流水号
+		optional string Remark = 8; // 备注
+}
+// 数字账户转入转出申请应答
+message DigitalAccountTransferApplyRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		optional uint64 ApplyID = 4; // 申请ID
+		optional uint64 DigitalAccountID = 5; // 数字账户ID
+		required string ClientTicket = 6; // 客户端流水号
+}
+// 数字账户充值申请请求
+message DigitalAccountDepositApplyReq {
+	optional MessageHead Header = 1;
+			required uint32 UserID = 2; // 用户ID
+		required uint32 CurrencyID = 3; // 币种ID
+		required uint32 WalletID = 4; // 钱包ID
+		required double Amount = 5; // 金额
+		required string ClientTicket = 6; // 客户端流水号
+		optional string Remark = 7; // 备注
+		optional string ExtendInfo = 8; // 扩展信息(JSON串,按钱包类型区分)
+}
+// 数字账户充值申请应答
+message DigitalAccountDepositApplyRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		optional uint64 ApplyID = 4; // 申请ID
+		optional uint64 DigitalAccountID = 5; // 数字账户ID
+		required string ClientTicket = 6; // 客户端流水号
+		optional string NetAddr = 7; // 网络地址(当这里有网址时,应自动跳转网页)
+		optional string ExtendInfo = 8; // 应答扩展信息(JSON串,按钱包类型区分)
+}
+// 数字账户提现申请请求
+message DigitalAccountWithdrawApplyReq {
+	optional MessageHead Header = 1;
+			required uint32 UserID = 2; // 用户ID
+		required uint32 CurrencyID = 3; // 币种ID
+		required uint32 WalletID = 4; // 钱包ID
+		required uint64 DigitalAccountID = 5; // 数字账户ID
+		required double Amount = 6; // 金额
+		required string ClientTicket = 7; // 客户端流水号
+		optional string Remark = 8; // 备注
+		optional string ExtendInfo = 9; // 扩展信息(JSON串,按钱包类型区分)
+}
+// 数字账户提现申请应答
+message DigitalAccountWithdrawApplyRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		optional uint64 ApplyID = 4; // 申请ID
+		required string ClientTicket = 5; // 客户端流水号
+		optional uint32 Status = 6; // 申请状态(1:待审核2:审核中3:审核通过
+}
+// 数字账户提现申请撤销请求
+message DigitalAccountWithdrawApplyCancelReq {
+	optional MessageHead Header = 1;
+		required uint64 ApplyID = 2; // 申请ID
+			required uint32 UserID = 3; // 用户ID
+		required string ClientTicket = 4; // 客户端流水号
+		optional string Remark = 5; // 备注
+}
+// 数字账户提现申请撤销应答
+message DigitalAccountWithdrawApplyCancelRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		required uint64 ApplyID = 4; // 申请ID
+		required string ClientTicket = 5; // 客户端流水号
+}
+// 数字账户提现申请审核请求
+message DigitalAccountWithdrawApplyAuditReq {
+	optional MessageHead Header = 1;
+		required uint64 ApplyID = 2; // 申请ID
+		required uint32 Status = 3; // 申请状态(3:审核通过4:审核拒绝)
+		required string ClientTicket = 4; // 客户端流水号
+		optional string Remark = 5; // 备注
+}
+// 数字账户提现申请审核应答
+message DigitalAccountWithdrawApplyAuditRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		required uint64 ApplyID = 4; // 申请ID
+		required string ClientTicket = 5; // 客户端流水号
+}
+// 数字账户操作指令请求
+message DigitalAccountCommandReq {
+	optional MessageHead Header = 1;
+			required uint32 UserID = 2; // 用户ID
+		required uint64 DigitalAccountID = 3; // 数字账户ID
+		required uint32 DigitalBusinessCode = 4; // 业务编号(枚举"digitalbusinesscode")
+		optional uint64 RelatedOrderID = 5; // 关联单号
+		repeated DigitalSubCommand SubCommands = 6; // 子指令集合
+		required uint64 SerialNumber = 7; // 流水号
+}
+// 数字账户操作指令应答
+message DigitalAccountCommandRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+			required uint32 UserID = 4; // 用户ID
+		required uint64 DigitalAccountID = 5; // 数字账户ID
+		required uint32 DigitalBusinessCode = 6; // 业务编号(枚举"digitalbusinesscode")
+		optional uint64 RelatedOrderID = 7; // 关联单号
+		repeated DigitalSubCommand SubCommands = 8; // 子指令集合
+		required uint64 SerialNumber = 9; // 流水号
+}
+// 数字账户操作子指令
+message DigitalSubCommand {
+			required uint32 CommandCode = 1; // 子指令操作码
+		required bytes CommandStrings = 2; // 子指令流
+}
+// 数字账户资金操作指令
+message DigitalFundOperationCmd {
+		required uint64 DigitalAccountID = 1; // 数字账户ID
+		required uint32 DigitalOperateType = 2; // 变更类型(枚举"digitaloperatetype")
+		required double ChangeAmount = 3; // 变更金额
+		optional uint32 RelatedGoodsID = 4; // 关联商品ID
+		optional uint32 RelatedMarketID = 5; // 关联市场
+		optional uint64 SubOrderIndex = 6; // 子指令序号
+}

+ 3 - 0
src/constants/funcode.ts

@@ -159,4 +159,7 @@ export enum FunCode {
 
     GoodsInventoryApplyReq = 196767, // 用户出入库申请请求
     GoodsInventoryApplyRsp = 196768, // 用户出入库申请应答
+
+    DigitalAccountTransferApplyReq = 3014657, // 数字账户转入转出申请请求
+    DigitalAccountTransferApplyRsp = 3014657, // 数字账户转入转出申请应答
 } 

+ 8 - 0
src/constants/order.ts

@@ -623,6 +623,14 @@ export function getGoodsCurrencyName(value: number) {
 }
 
 /**
+ * 获取数字币种列表
+ * @returns 
+ */
+export function getDigitalCurrencyList() {
+    return getEnumTypeList('digitalcurrency')
+}
+
+/**
  * 获取申请状列表
  * @returns 
  */

+ 8 - 1
src/packages/digital/App.vue

@@ -7,4 +7,11 @@
 <script lang="ts" setup>
 import { ConfigProvider } from 'vant'
 import AppView from '@mobile/App.vue'
-</script>
+</script>
+
+<style lang="less">
+.van-config-provider {
+  display: contents;
+  all: unset;
+}
+</style>

+ 1 - 1
src/packages/digital/assets/themes/default/default.less

@@ -22,7 +22,7 @@
     /* 导航栏 */
     --navbar-height: 44px;
     --navbar-color: #fff;
-    --navbar-background: #C30D23;
+    --navbar-background: var(--van-nav-bar-background);
     --navbar-backbutton-color: #fff;
 
     /* 标签栏 */

+ 9 - 0
src/packages/digital/assets/themes/global/global.less

@@ -0,0 +1,9 @@
+.g-layout {
+    &.flex {
+        display: flex;
+    }
+
+    &-block {
+        //padding: 20px;
+    }
+}

+ 11 - 0
src/packages/digital/router/index.ts

@@ -92,6 +92,17 @@ const routes: Array<RouteRecordRaw> = [
     ]
   },
   {
+    path: '/wallet',
+    component: Page,
+    children: [
+      {
+        path: 'transfer',
+        name: 'wallet-transfer',
+        component: () => import('../views/wallet/transfer/index.vue'),
+      },
+    ]
+  },
+  {
     path: '/user',
     component: Page,
     children: [

+ 25 - 0
src/packages/digital/views/contract/components/account/index.less

@@ -0,0 +1,25 @@
+.contract-account {
+    .account-table {
+        width: 100%;
+        border-bottom: 1px solid #171f2d;
+        padding: 10px;
+
+        td {
+            line-height: 1.5;
+            padding: 8px;
+
+            &:last-child {
+                text-align: right;
+            }
+
+            span {
+                display: block;
+            }
+
+            .text-small {
+                font-size: 12px;
+                color: #666;
+            }
+        }
+    }
+}

+ 20 - 7
src/packages/digital/views/contract/components/account/index.vue

@@ -1,28 +1,36 @@
 <template>
     <div class="contract-account">
-        <table class="card" cellspacing="0" cellpadding="0" border="1">
+        <table class="account-table" cellspacing="0" cellpadding="0">
             <tbody>
                 <tr>
                     <td colspan="2">
-                        <span>账户权益(USDT)</span>
+                        <span>资金(250000000011)</span>
+                    </td>
+                    <td>
+                        <Icon name="arrow" />
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan="2">
+                        <span class="text-small">账户权益(USDT)</span>
                         <span>1000.00</span>
                     </td>
                     <td>
-                        <span>浮动盈亏</span>
+                        <span class="text-small">浮动盈亏</span>
                         <span>+2.87</span>
                     </td>
                 </tr>
                 <tr>
                     <td>
-                        <span>可用(USDT)</span>
+                        <span class="text-small">可用(USDT)</span>
                         <span>100</span>
                     </td>
                     <td>
-                        <span>占用(USDT)</span>
+                        <span class="text-small">占用(USDT)</span>
                         <span>34,808.80</span>
                     </td>
                     <td>
-                        <span>冻结(USDT)</span>
+                        <span class="text-small">冻结(USDT)</span>
                         <span>97.21</span>
                     </td>
                 </tr>
@@ -32,4 +40,9 @@
 </template>
 
 <script lang="ts" setup>
-</script>
+import { Icon } from 'vant'
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

+ 41 - 41
src/packages/digital/views/contract/goods/detail/index.vue

@@ -1,5 +1,5 @@
 <template>
-    <app-view class="contract-detail g-form">
+    <app-view class="contract-detail">
         <template #header>
             <app-navbar>
                 <template #left>
@@ -13,47 +13,47 @@
                     <span @click="routerToChart">图表</span>
                 </template>
             </app-navbar>
-            <Button type="danger">开多</Button>
-            <Button type="primary">开空</Button>
-            <Form ref="formRef" class="g-form__container">
-                <CellGroup inset>
-                    <Field label="限单价">
-                        <template #input>
-                            <app-select :options="[]" />
-                        </template>
-                    </Field>
-                    <Field label="价格">
-                        <template #input>
-                            <app-stepper theme="round" />
-                        </template>
-                    </Field>
-                    <Field label="数量">
-                        <template #input>
-                            <app-stepper theme="round" />
-                        </template>
-                    </Field>
-                    <Field label="开仓价值">
-                    </Field>
-                </CellGroup>
-                <CellGroup inset style="margin-top: 20px;">
-                    <Cell title="可用余额" value="0" />
-                    <Cell title="可开数量" value="0" />
-                    <Cell title="预估手续费" value="0" />
-                </CellGroup>
-            </Form>
-            <Button type="danger">开多</Button>
-            <Tabs v-model:active="tabIndex">
-                <Tab title="持仓">
-                    <contract-position v-bind="{ goodsId }" />
-                </Tab>
-                <Tab title="委托">
-                    <contract-order v-bind="{ goodsId }" />
-                </Tab>
-                <Tab title="资金">
-                    <contract-account />
-                </Tab>
-            </Tabs>
         </template>
+        <Button type="danger">开多</Button>
+        <Button type="primary">开空</Button>
+        <Form ref="formRef">
+            <CellGroup inset>
+                <Field label="限单价">
+                    <template #input>
+                        <app-select :options="[]" />
+                    </template>
+                </Field>
+                <Field label="价格">
+                    <template #input>
+                        <app-stepper theme="round" />
+                    </template>
+                </Field>
+                <Field label="数量">
+                    <template #input>
+                        <app-stepper theme="round" />
+                    </template>
+                </Field>
+                <Field label="开仓价值">
+                </Field>
+            </CellGroup>
+            <CellGroup inset style="margin-top: 20px;">
+                <Cell title="可用余额" value="0" />
+                <Cell title="可开数量" value="0" />
+                <Cell title="预估手续费" value="0" />
+            </CellGroup>
+        </Form>
+        <Button type="danger">开多</Button>
+        <Tabs v-model:active="tabIndex">
+            <Tab title="持仓">
+                <contract-position v-bind="{ goodsId }" />
+            </Tab>
+            <Tab title="委托">
+                <contract-order v-bind="{ goodsId }" />
+            </Tab>
+            <Tab title="资金">
+                <contract-account />
+            </Tab>
+        </Tabs>
     </app-view>
 </template>
 

+ 1 - 1
src/packages/digital/views/contract/goods/list/index.vue

@@ -1,6 +1,6 @@
 <template>
     <app-view class="contract">
-        <Search />
+        <Search shape="round" placeholder="搜索" />
         <Tabs v-model:active="currentGroupId">
             <template v-for="(item, index) in goodsGroups" :key="index">
                 <Tab :title="item.goodsgroupname" :name="item.goodsgroupid">

+ 0 - 3
src/packages/digital/views/home/main/index.vue

@@ -1,8 +1,5 @@
 <template>
   <app-view class="home-main">
-    <template #header>
-      <app-navbar :title="globalStore.getSystemInfo('appName')" :show-back-button="false" />
-    </template>
     <Banner :data-list="topBanners" />
     <PullRefresh class="home-main__container" v-model="refreshing" @refresh="onRefresh">
       <app-block>

+ 33 - 1
src/packages/digital/views/wallet/index.less

@@ -1,5 +1,37 @@
 .wallet {
-    &-fun{
+    .card {
         display: flex;
+        justify-content: space-between;
+        border-bottom: 1px solid #171f2d;
+        padding: 10px 20px;
+
+        &-section {
+            display: flex;
+            align-items: center;
+
+            &__info,
+            &__balance {
+                display: flex;
+                flex-direction: column;
+                line-height: 1.5;
+            }
+
+            &__balance {
+                text-align: right;
+            }
+
+            &__image {
+                margin-right: 10px;
+            }
+
+            &__icon {
+                margin-left: 10px;
+            }
+
+            .text-small {
+                font-size: 12px;
+                color: #666;
+            }
+        }
     }
 }

+ 40 - 43
src/packages/digital/views/wallet/index.vue

@@ -1,55 +1,52 @@
+<!-- 钱包 -->
 <template>
-    <app-view class="wallet">
-        <div class="wallet-fun">
-            <ul>
-                <li>
-                    <span>充值</span>
-                </li>
-                <li>
-                    <span>提现</span>
-                </li>
-                <li>
-                    <span>划转</span>
-                </li>
-                <li>
-                    <span>设置</span>
-                </li>
-            </ul>
+    <app-view class="wallet g-layout">
+        <div class="g-layout-block">
+            <Grid :border="false">
+                <GridItem icon="pending-payment" text="充值" />
+                <GridItem icon="paid" text="提现" />
+                <GridItem icon="peer-pay" text="划转" :to="{ name: 'wallet-transfer' }" />
+                <GridItem icon="setting-o" text="设置" />
+            </Grid>
         </div>
         <Tabs v-model:active="currentTabIndex">
             <Tab title="现货">
-                <Search />
-                <div class="card">
-                    <div class="card-section">
-                        <div class="card-section__image">
-                            <Image fit="contain" src="" width="28" height="28" round />
+                <div class="g-layout-block">
+                    <Search shape="round" placeholder="搜索" />
+                    <div class="card">
+                        <div class="card-section">
+                            <div class="card-section__image">
+                                <Image fit="contain" src="" width="32" height="32" round />
+                            </div>
+                            <div class="card-section__info">
+                                <span>
+                                    <b>BTC</b>
+                                </span>
+                                <span class="text-small">
+                                    比特币
+                                </span>
+                            </div>
                         </div>
-                        <div class="card-section__info">
-                            <span>
-                                <b>BTC</b>
-                            </span>
-                            <span>
-                                比特币
-                            </span>
-                        </div>
-                    </div>
-                    <div class="card-section">
-                        <div class="card-section__balance">
-                            <span>
-                                余额(USDT)
-                            </span>
-                            <span>
-                                12.65432100
-                            </span>
-                        </div>
-                        <div class="card-section__icon">
-                            <Icon name="arrow" />
+                        <div class="card-section">
+                            <div class="card-section__balance">
+                                <span>
+                                    余额(USDT)
+                                </span>
+                                <span class="text-small">
+                                    12.65432100
+                                </span>
+                            </div>
+                            <div class="card-section__icon">
+                                <Icon name="arrow" />
+                            </div>
                         </div>
                     </div>
                 </div>
             </Tab>
             <Tab title="合约">
-                <contract-account />
+                <div class="g-layout-block">
+                    <contract-account />
+                </div>
             </Tab>
         </Tabs>
     </app-view>
@@ -57,7 +54,7 @@
 
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
-import { Search, Tab, Tabs, Image, Icon } from 'vant'
+import { Search, Tab, Tabs, Image, Icon, Grid, GridItem } from 'vant'
 import ContractAccount from '../../views/contract/components/account/index.vue'
 
 const currentTabIndex = shallowRef(0)

+ 22 - 0
src/packages/digital/views/wallet/transfer/index.less

@@ -0,0 +1,22 @@
+.wallet-transfer {
+    .switch-group {
+        display: flex;
+        gap: 20px;
+        padding: 20px;
+
+        span {
+            border: 2px solid #2d2d2d;
+            padding: 30px 20px;
+            border-radius: 8px;
+            flex: 1;
+            text-align: center;
+            background-color: #1a1a1a;
+
+            &.active {
+                border-color: #7b5417;
+                background-color: #1e1606;
+                color: #db9933;
+            }
+        }
+    }
+}

+ 112 - 0
src/packages/digital/views/wallet/transfer/index.vue

@@ -0,0 +1,112 @@
+<!-- 钱包-划转 -->
+<template>
+    <app-view class="wallet-transfer g-layout">
+        <template #header>
+            <app-navbar title="划转" />
+        </template>
+        <Form ref="formRef" @submit="onSubmit">
+            <div class="switch-group">
+                <span :class="{ active: formData.DigitalTransferType === 3 }" @click="formData.DigitalTransferType = 3">
+                    从 合约 到 现货
+                </span>
+                <span :class="{ active: formData.DigitalTransferType === 4 }" @click="formData.DigitalTransferType = 4">
+                    从 现货 到 合约
+                </span>
+            </div>
+            <CellGroup inset>
+                <Field name="CurrencyID" label="币种" :rules="formRules.CurrencyID" is-link>
+                    <template #input>
+                        <app-select v-model="formData.CurrencyID" :options="currencyOptions"
+                            :optionProps="{ label: 'enumdicname', value: 'enumitemname' }" />
+                    </template>
+                </Field>
+                <Field name="Amount" label="数量" :rules="formRules.Amount">
+                    <template #input>
+                        <app-stepper theme="round" v-model="formData.Amount" />
+                    </template>
+                </Field>
+                <Cell title="可用" value="0" />
+            </CellGroup>
+            <Button type="danger">取消</Button>
+            <Button type="primary" @click="formRef?.submit">划转</Button>
+        </Form>
+    </app-view>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, reactive } from 'vue'
+import { v4 } from 'uuid'
+import { FormInstance, Form, Button, CellGroup, Field, Cell, FieldRule } from 'vant'
+import { fullloading } from '@/utils/vant'
+import { getCurrencyList, getDigitalCurrencyList } from '@/constants/order'
+import { DigitalAccountTransferApply } from '@/services/api/bank'
+import { useAccountStore, useUserStore } from '@/stores'
+import AppSelect from '@mobile/components/base/select/index.vue'
+import AppStepper from '@mobile/components/base/stepper/index.vue'
+
+const accountStore = useAccountStore()
+const userStore = useUserStore()
+
+const currencyList = getCurrencyList()
+const digitalCurrentyList = getDigitalCurrencyList()
+
+const formRef = shallowRef<FormInstance>()
+
+// 币种交集
+const currencyOptions = (() => {
+    const map = new Map()
+    const result = []
+
+    // 先遍历第一个列表,记录所有键
+    for (const item of currencyList) {
+        map.set(item.enumitemname, true)
+    }
+
+    // 遍历第二个列表,检查是否存在
+    for (const item of digitalCurrentyList) {
+        if (map.has(item.enumitemname)) {
+            result.push(item)
+            map.delete(item.enumitemname) // 避免重复添加
+        }
+    }
+
+    return result
+})()
+
+const formData = reactive<Partial<Proto.DigitalAccountTransferApplyReq>>({
+    AccountID: accountStore.currentAccountId,
+    UserID: userStore.userInfo.userid,
+    DigitalTransferType: 3,
+    Amount: 1,
+})
+
+// 表单验证规则
+const formRules: { [key: string]: FieldRule[] } = {
+    CurrencyID: [{
+        message: '请选择币种',
+        validator: () => !!formData.CurrencyID
+    }],
+    Amount: [{
+        message: '请输入数量',
+        validator: () => !!formData.Amount
+    }],
+}
+
+const onSubmit = () => {
+    fullloading((hideLoading) => {
+        formData.ClientTicket = v4()
+
+        DigitalAccountTransferApply({
+            data: formData
+        }).then(() => {
+            hideLoading('提交成功', 'success')
+        }).catch((err) => {
+            hideLoading(err, 'fail')
+        })
+    })
+}
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

+ 11 - 0
src/services/api/bank/index.ts

@@ -116,6 +116,17 @@ export function YJF_GetWithholdSignInSMSVCode(config: RequestConfig<Partial<Prot
 }
 
 /**
+ * 数字账户转入转出申请
+ */
+export function DigitalAccountTransferApply(config: RequestConfig<Partial<Proto.DigitalAccountTransferApplyReq>>) {
+    return http.mqRequest<Proto.DigitalAccountTransferApplyRsp>({
+        data: config.data,
+        requestCode: 'DigitalAccountTransferApplyReq',
+        responseCode: 'DigitalAccountTransferApplyRsp',
+    })
+}
+
+/**
  * 查询托管银行
  */
 export function queryCusBankSignBank(config: RequestConfig = {}) {

+ 1 - 1
src/stores/modules/enum.ts

@@ -14,7 +14,7 @@ export interface EnumType {
     bankmappedvalue?: string
 }
 
-const enumKeys = ['confirmStatus', 'countrycode', 'ValidType', 'inoutapplystatus', 'inouttype', 'executetype', 'currency', 'deliveryOrderStatus', 'operatetypesearch', 'deliveryPayMode', 'applystatus', 'deliveryStatus', 'operateType', 'WRPresaleStatus', 'clientType', 'stepStatus', 'scoreConfigType', 'GZBSCPayStatus', 'gt_kksjdw', 'performanceStatus', 'handlestatus', 'performanceType', 'accountBusinessCode', 'certificatetype', 'signstatus', 'thjOrderStatus', 'THJDeliveryMode', 'goodsunit', 'WROutInApplyStatus2', 'THJTransferStatus', 'WRTradeOrderStatus', 'THJMarket', 'THJProfitRoleType', 'appointmentModelOut', 'orderstatus', 'Pricemode2', 'buildtype', 'listingselecttype', 'certypeperson', 'runstatus', 'traderstatus', 'transferapplystatus', 'ePayFlag', 'goodscurrency', 'paymodel'] as const
+const enumKeys = ['confirmStatus', 'countrycode', 'ValidType', 'inoutapplystatus', 'inouttype', 'executetype', 'currency', 'deliveryOrderStatus', 'operatetypesearch', 'deliveryPayMode', 'applystatus', 'deliveryStatus', 'operateType', 'WRPresaleStatus', 'clientType', 'stepStatus', 'scoreConfigType', 'GZBSCPayStatus', 'gt_kksjdw', 'performanceStatus', 'handlestatus', 'performanceType', 'accountBusinessCode', 'certificatetype', 'signstatus', 'thjOrderStatus', 'THJDeliveryMode', 'goodsunit', 'WROutInApplyStatus2', 'THJTransferStatus', 'WRTradeOrderStatus', 'THJMarket', 'THJProfitRoleType', 'appointmentModelOut', 'orderstatus', 'Pricemode2', 'buildtype', 'listingselecttype', 'certypeperson', 'runstatus', 'traderstatus', 'transferapplystatus', 'ePayFlag', 'goodscurrency', 'paymodel', 'digitalcurrency'] as const
 
 const enumMap = new Map<typeof enumKeys[number], ShallowRef<Model.EnumRsp[]>>()
 

+ 23 - 1
src/types/proto/bank.d.ts

@@ -242,7 +242,7 @@ declare global {
             Remark?: string; // 备注
             ClientSerialNo: string; // 客户端流水号-全局唯一码
         }
-        
+
         // 云缴费获取代扣签约短信验证码响应
         interface YJF_GetWithholdSignInSMSVCodeRsp {
             Header: IMessageHead; // 消息头
@@ -315,5 +315,27 @@ declare global {
             LoginID: number; // 登录账号ID
             ClientSerialNo: string; // 客户端流水号-请求的流水号
         }
+
+        // 数字账户转入转出申请请求
+        interface DigitalAccountTransferApplyReq {
+            Header?: IMessageHead;  // 消息头
+            AccountID: number; // 交易账号
+            UserID: number; // 用户ID
+            CurrencyID: number; // 币种ID
+            DigitalTransferType: number; // 划转类型-枚举"digitaltransfertype"(3:转入
+            Amount: number; // 转入转出金额
+            ClientTicket: string; // 客户端流水号
+            Remark: string; // 备注
+        }
+        
+        // 数字账户转入转出申请应答
+        interface DigitalAccountTransferApplyRsp {
+            Header?: IMessageHead;  // 消息头
+            RetCode: number; // 返回码
+            RetDesc: string; // 描述信息
+            ApplyID: number; // 申请ID
+            DigitalAccountID: number; // 数字账户ID
+            ClientTicket: string; // 客户端流水号
+        }
     }
 }