定时发送短信

This commit is contained in:
wanyongkang
2020-10-17 17:46:36 +08:00
parent 0c08105fb3
commit 598f4d38b4
2 changed files with 20 additions and 10 deletions

View File

@@ -110,6 +110,13 @@ namespace Hncore.Pass.Vpn.Service
return this.m_DbContext.SqlQuery<ProductAccountEntity>(sql);
}
//主要是用来定时执行的
public async Task<List<ProductAccountEntity>> GetExpireingAccountsTime()
{
var sql = $"select * from product_account where DATEDIFF(EndTime,now())=-1 OR DATEDIFF(EndTime,now())=0 OR DATEDIFF(EndTime,now())=1 GROUP BY UserId";
return this.m_DbContext.SqlQuery<ProductAccountEntity>(sql);
}
public async Task<ApiResult> UpdateAccountPwd(UpdateAccountPwdRequest request)
{
var entity = await this.GetById(request.Id);