Commit 6f4519f8 by guanzhenshan

调整余额明细查询

parent fce0c2b1
...@@ -342,16 +342,20 @@ namespace Bailun.DC.Services ...@@ -342,16 +342,20 @@ namespace Bailun.DC.Services
public List<dc_platform_balance> List(DateTime day, string platformcode, int page, int pagesize, string order, string sort, ref int total) public List<dc_platform_balance> List(DateTime day, string platformcode, int page, int pagesize, string order, string sort, ref int total)
{ {
var sql = "select * from dc_platform_balance where delstatus=0 and day='" + day + "'"; var sql = "select * from dc_platform_balance where delstatus=0 and day='" + day + "'";
string countsql = "select count(id) from dc_platform_balance where delstatus=0 and day='" + day + "'";
if (!string.IsNullOrEmpty(platformcode)) if (!string.IsNullOrEmpty(platformcode))
{ {
sql += " and platformcode='" + platformcode + "'"; sql += " and platformcode='" + platformcode + "'";
countsql += " and platformcode='" + platformcode + "'";
} }
if (!string.IsNullOrWhiteSpace(order)) if (!string.IsNullOrWhiteSpace(order))
{ {
sql += " order by " + order; sql += " order by " + order;
if (!string.IsNullOrWhiteSpace(sort)) if (!string.IsNullOrWhiteSpace(sort))
{ {
sql += " " + sort; sql += " " + sort;
...@@ -359,7 +363,6 @@ namespace Bailun.DC.Services ...@@ -359,7 +363,6 @@ namespace Bailun.DC.Services
} }
string countsql = sql;
sql += " limit " + (page - 1) * pagesize + "," + pagesize; sql += " limit " + (page - 1) * pagesize + "," + pagesize;
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString)) using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment