From bdbb731694034ffb3ff479e60e7dceb69b7afc5e Mon Sep 17 00:00:00 2001
From: shanj <18996038927@163.com>
Date: Mon, 25 Apr 2022 01:28:49 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B4=A6=E6=88=B7=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/UserController.cs | 2 +-
.../Binance.TradeRobot.Model.xml | 5 +++
.../Db/Exchange/ExchangeAPIKey.cs | 41 ++++++++++++-------
.../Db/Exchange/ExchangeAccount.cs | 1 +
.../Db/User/UserAccountFundChangeRecord.cs | 4 ++
.../Exchange/AddExchangeAccountRequest.cs | 3 ++
.../Exchange/ExchangeAPIKeyResponse.cs | 6 +++
7 files changed, 46 insertions(+), 16 deletions(-)
diff --git a/Binance.TradeRobot.API/Controllers/UserController.cs b/Binance.TradeRobot.API/Controllers/UserController.cs
index 64ae43a..b00e5d2 100644
--- a/Binance.TradeRobot.API/Controllers/UserController.cs
+++ b/Binance.TradeRobot.API/Controllers/UserController.cs
@@ -40,7 +40,7 @@ namespace Binance.TradeRobot.API.Controllers
///
/// 获取用户资金变更记录
///
- [HttpGet]
+ [HttpPost]
public UserAccountChangeRecordListResponse GetUserAccountFundChangeRecordList([FromBody] QueryUserAccountRequest queryUserAccountRequest)
{
return userBusiness.GetUserAccountFundChangeRecordList(queryUserAccountRequest);
diff --git a/Binance.TradeRobot.Model/Binance.TradeRobot.Model.xml b/Binance.TradeRobot.Model/Binance.TradeRobot.Model.xml
index 826cb87..2e4f86b 100644
--- a/Binance.TradeRobot.Model/Binance.TradeRobot.Model.xml
+++ b/Binance.TradeRobot.Model/Binance.TradeRobot.Model.xml
@@ -394,6 +394,11 @@
用户投资收益
+
+
+ 交易所UID
+
+
交易策略
diff --git a/Binance.TradeRobot.Model/Db/Exchange/ExchangeAPIKey.cs b/Binance.TradeRobot.Model/Db/Exchange/ExchangeAPIKey.cs
index 1191c49..fdda21e 100644
--- a/Binance.TradeRobot.Model/Db/Exchange/ExchangeAPIKey.cs
+++ b/Binance.TradeRobot.Model/Db/Exchange/ExchangeAPIKey.cs
@@ -4,27 +4,38 @@ using System;
namespace Binance.TradeRobot.Model.Db
{
[Table(Name = "exchangeapikey", DisableSyncStructure = true)]
- public partial class ExchangeAPIKey
- {
+ public partial class ExchangeAPIKey
+ {
- [Column(DbType = "bigint", IsPrimary = true)]
- public long Id { get; set; }
+ public ExchangeAPIKey()
+ {
+ CreateTime = DateTime.Now;
+ }
- [Column(DbType = "bigint")]
- public long AccountId { get; set; }
+ [Column(DbType = "bigint", IsPrimary = true)]
+ public long Id { get; set; }
- [Column(StringLength = 100, IsNullable = false)]
- public string APIKey { get; set; }
+ ///
+ /// ˺UID
+ ///
+ [Column(DbType = "bigint")]
+ public long AccountId { get; set; }
- [Column(DbType = "datetime")]
- public DateTime CreateTime { get; set; }
+ [Column(StringLength = 100, IsNullable = false)]
+ public string APIKey { get; set; }
- [Column(DbType = "bigint")]
- public long? RobotId { get; set; }
+ [Column(DbType = "datetime")]
+ public DateTime CreateTime { get; set; }
- [Column(StringLength = 100, IsNullable = false)]
- public string SecretKey { get; set; }
+ ///
+ /// Id
+ ///
+ [Column(DbType = "bigint")]
+ public long? RobotId { get; set; }
- }
+ [Column(StringLength = 100, IsNullable = false)]
+ public string SecretKey { get; set; }
+
+ }
}
diff --git a/Binance.TradeRobot.Model/Db/Exchange/ExchangeAccount.cs b/Binance.TradeRobot.Model/Db/Exchange/ExchangeAccount.cs
index dd85109..0675838 100644
--- a/Binance.TradeRobot.Model/Db/Exchange/ExchangeAccount.cs
+++ b/Binance.TradeRobot.Model/Db/Exchange/ExchangeAccount.cs
@@ -8,6 +8,7 @@ namespace Binance.TradeRobot.Model.Db
[Table(Name = "exchangeaccount", DisableSyncStructure = true)]
public partial class ExchangeAccount
{
+ public ExchangeAccount() { CreateTime = DateTime.Now; }
[Column(DbType = "bigint", IsPrimary = true)]
public long Id { get; set; }
diff --git a/Binance.TradeRobot.Model/Db/User/UserAccountFundChangeRecord.cs b/Binance.TradeRobot.Model/Db/User/UserAccountFundChangeRecord.cs
index 3a11fca..aae1016 100644
--- a/Binance.TradeRobot.Model/Db/User/UserAccountFundChangeRecord.cs
+++ b/Binance.TradeRobot.Model/Db/User/UserAccountFundChangeRecord.cs
@@ -8,6 +8,10 @@ namespace Binance.TradeRobot.Model.Db
[Table(Name = "useraccountfundchangerecord", DisableSyncStructure = true)]
public partial class UserAccountFundChangeRecord
{
+ public UserAccountFundChangeRecord()
+ {
+ CreateTime = DateTime.Now;
+ }
[Column(DbType = "bigint", IsPrimary = true)]
public long Id { get; set; }
diff --git a/Binance.TradeRobot.Model/Dto/Request/Exchange/AddExchangeAccountRequest.cs b/Binance.TradeRobot.Model/Dto/Request/Exchange/AddExchangeAccountRequest.cs
index 0dce341..76d0d3d 100644
--- a/Binance.TradeRobot.Model/Dto/Request/Exchange/AddExchangeAccountRequest.cs
+++ b/Binance.TradeRobot.Model/Dto/Request/Exchange/AddExchangeAccountRequest.cs
@@ -4,6 +4,9 @@ namespace Binance.TradeRobot.Model.Dto
{
public class AddExchangeAccountRequest
{
+ ///
+ /// 交易所UID
+ ///
public long Id { get; set; }
public string LoginName { get; set; }
diff --git a/Binance.TradeRobot.Model/Dto/Response/Exchange/ExchangeAPIKeyResponse.cs b/Binance.TradeRobot.Model/Dto/Response/Exchange/ExchangeAPIKeyResponse.cs
index 6fe24be..2681990 100644
--- a/Binance.TradeRobot.Model/Dto/Response/Exchange/ExchangeAPIKeyResponse.cs
+++ b/Binance.TradeRobot.Model/Dto/Response/Exchange/ExchangeAPIKeyResponse.cs
@@ -2,8 +2,14 @@
{
public class ExchangeAPIKeyResponse : Db.ExchangeAPIKey
{
+ ///
+ /// 逐仓杠杆USDT
+ ///
public decimal SpotMarginUSDT { get; set; }
+ ///
+ /// 机器人交易对
+ ///
public string RobotSymbol { get; set; }
}
}