短信和账单时间

This commit is contained in:
wanyongkang
2020-10-19 20:08:47 +08:00
parent 25e577ec82
commit 785af6ee95
4 changed files with 19 additions and 16 deletions

View File

@@ -111,9 +111,9 @@ namespace Hncore.Pass.Vpn.Service
}
//主要是用来定时执行的
public async Task<List<ProductAccountEntity>> GetExpireingAccountsTime()
public async Task<List<ProductAccountEntity>> GetExpireingAccountsTime(int day)
{
var sql = $"select * from product_account where DATEDIFF(EndTime,now())=-1 OR DATEDIFF(EndTime,now())=0 OR DATEDIFF(EndTime,now())=1 GROUP BY UserId";
var sql = $"select * from product_account where DATEDIFF(EndTime,now())={day} GROUP BY UserId";
return this.m_DbContext.SqlQuery<ProductAccountEntity>(sql);
}

View File

@@ -105,7 +105,7 @@ FROM product_order where OrderState=20 or OrderState=90 or OrderState=40 or Orde
string where = $" (OrderState=20 or OrderState=90 or OrderState=40 or OrderState=50 or OrderState=30) ";
if (bTime.HasValue && eTime.HasValue)
{
where += $"and CreateTime>'{bTime.Value.ToString("yyyy-MM-dd")}' and CreateTime<'{eTime.Value.ToString("yyyy-MM-dd")}'";
where += $"and UpdateTime>'{bTime.Value.ToString("yyyy-MM-dd")}' and UpdateTime<'{eTime.Value.ToString("yyyy-MM-dd")}'";
}