public void PagingQueryQH_CapitalAccountFreezeTableByAccountTest() { TraderFindService target = new TraderFindService(); // TODO: 初始化为适当的值 string account = "010000000406"; // TODO: 初始化为适当的值 DateTime startTime = DateTime.Parse("2009-06-12 16:09:42.860"); // TODO: 初始化为适当的值 DateTime endTime = DateTime.Parse("2009-06-13 16:09:42.860"); // TODO: 初始化为适当的值 QueryType.QueryCurrencyType type = QueryType.QueryCurrencyType.ALL; // TODO: 初始化为适当的值 PagingInfo pageInfo = new PagingInfo(); // TODO: 初始化为适当的值 pageInfo.CurrentPage = 1; pageInfo.IsCount = true; pageInfo.PageLength = 12; pageInfo.Sort = 0; int total = 0; // TODO: 初始化为适当的值 int totalExpected = 0; // TODO: 初始化为适当的值 string errorMsg = string.Empty; // TODO: 初始化为适当的值 string errorMsgExpected = string.Empty; // TODO: 初始化为适当的值 QueryType.QueryFreezeType freezeType = QueryType.QueryFreezeType.ALL; List <QH_CapitalAccountFreezeTableInfo> expected = null; // TODO: 初始化为适当的值 List <QH_CapitalAccountFreezeTableInfo> actual; //actual = target.PagingQueryQH_CapitalAccountFreezeTableByAccount(account, startTime, endTime, type, freezeType, pageInfo, out total, out errorMsg); //Assert.AreEqual(totalExpected, total); //Assert.AreEqual(errorMsgExpected, errorMsg); //Assert.AreEqual(expected, actual); Assert.Inconclusive("验证此测试方法的正确性。"); }
/// <summary> /// Title:根据查询的货币类型和查询的条件类型构建查询的SQLScript /// Desc:默认返回根据主键查询 /// </summary> /// <param name="type">要查询的货币类型</param> /// <param name="byType">查询条件类型</param> /// <returns>返回查询的条件脚本语句</returns> string BuildQueryWhere(QueryType.QueryCurrencyType type, QueryType.QueryWhereType byType) { string strByWhere = ""; switch (byType) { case QueryType.QueryWhereType.ByUserID: strByWhere = " UserAccountDistributeLogo in( select useraccountdistributelogo from UA_UserAccountAllocationTable where accounttypelogo in (select accounttypelogo from BD_AccountType where atcid='" + (int)GTA.VTS.Common.CommonObject.Types.AccountAttributionType.SpotCapital + "') and userid='{0}' )"; break; case QueryType.QueryWhereType.ByUserAndPwd: strByWhere = " UserAccountDistributeLogo in( select useraccountdistributelogo from dbo.UA_UserAccountAllocationTable where accounttypelogo in (select accounttypelogo from BD_AccountType where atcid='" + (int)GTA.VTS.Common.CommonObject.Types.AccountAttributionType.SpotCapital + "') and userid in (select userid from dbo.UA_UserBasicInformationTable where userid='{1}' And Password ='******' ))"; break; case QueryType.QueryWhereType.ByAccount: strByWhere = " UserAccountDistributeLogo='{0}' "; break; default: strByWhere = " CapitalAccountLogoId ='{0}'"; break; } if (QueryType.QueryCurrencyType.ALL != type) { strByWhere += " And TradeCurrencyType='" + (int)type + "'"; } return(strByWhere); }
public void PagingQueryQH_CapitalAccountFreezeTableByUserIDTest() { TraderFindService target = new TraderFindService(); // TODO: 初始化为适当的值 string userID = "4"; // TODO: 初始化为适当的值 Nullable <DateTime> startTime = new Nullable <DateTime>(); // TODO: 初始化为适当的值 Nullable <DateTime> endTime = new Nullable <DateTime>(); // TODO: 初始化为适当的值 QueryType.QueryCurrencyType type = QueryType.QueryCurrencyType.ALL; // TODO: 初始化为适当的值 PagingInfo pageInfo = new PagingInfo(); // TODO: 初始化为适当的值 pageInfo.CurrentPage = 1; pageInfo.IsCount = false; pageInfo.PageLength = 12; pageInfo.Sort = 0; int total = 0; // TODO: 初始化为适当的值 int totalExpected = 0; // TODO: 初始化为适当的值 string errorMsg = string.Empty; // TODO: 初始化为适当的值 string errorMsgExpected = string.Empty; // TODO: 初始化为适当的值 List <QH_CapitalAccountFreezeTableInfo> expected = null; // TODO: 初始化为适当的值 List <QH_CapitalAccountFreezeTableInfo> actual; //actual = target.PagingQueryQH_CapitalAccountFreezeTableByUserID(userID, startTime, endTime, type, QueryType.QueryFreezeType.ALL, pageInfo, out total, out errorMsg); //Assert.AreEqual(totalExpected, total); //Assert.AreEqual(errorMsgExpected, errorMsg); //Assert.AreEqual(expected, actual); Assert.Inconclusive("验证此测试方法的正确性。"); }
/// <summary> /// 根据现货资金账号查询现货资金账号明细 /// </summary> ///<param name="account">现货资金账号</param> /// <param name="type">币种</param> /// <returns></returns> public List <XH_CapitalAccountTableInfo> GetListByAccount(string account, QueryType.QueryCurrencyType type) { return(GetListArray(string.Format(BuildQueryWhere(type, QueryType.QueryWhereType.ByAccount), account))); }
/// <summary> /// 根据用户ID查询用户所拥有的现货资金账号明细 /// </summary> /// <param name="userID">用户(交易员)ID</param> /// <param name="type">要查询的货币类型</param> /// <returns></returns> public List <XH_CapitalAccountTableInfo> GetListByUserID(string userID, QueryType.QueryCurrencyType type) { return(GetListArray(string.Format(BuildQueryWhere(type, QueryType.QueryWhereType.ByUserID), userID))); }
/// <summary> /// 根据用户ID和密码查询用户所拥有的期货持仓账号明细 /// </summary> /// <param name="userID">用户(交易员)ID</param> /// <param name="pwd">密码</param> /// <param name="type">要查询的货币类型</param> /// <returns></returns> public List <QH_HoldAccountTableInfo> GetListByUserIDAndPwd(string userID, string pwd, QueryType.QueryCurrencyType type) { return(GetListArray(string.Format(BuildQueryWhere(type, QueryType.QueryWhereType.ByUserAndPwd), userID, pwd))); }
/// <summary> /// 根据港股持仓账号查询港股持仓账号明细 /// </summary> /// <param name="account">港股持仓账号</param> /// <param name="type">币种</param> /// <returns></returns> public List <HK_AccountHoldInfo> GetListByAccount(string account, QueryType.QueryCurrencyType type) { return(GetListArray(string.Format(BuildQueryWhere(type, QueryType.QueryWhereType.ByAccount), account))); }