You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

53 lines
1.5 KiB

using Znyc.CloudCar.IServices.CaChe;
using Znyc.CloudCar.IServices.Equipment;
namespace Znyc.CloudCar.Task.TaskJobs
{
/// <summary>
/// 设备信息定时任务
/// </summary>
public class AutoEquipmentJob
{
private readonly IEquipmentService _equipmentService;
private readonly ICacheService _cacheService;
public AutoEquipmentJob(IEquipmentService equipmentService,
ICacheService cacheService
)
{
_equipmentService = equipmentService;
_cacheService = cacheService;
}
/// <summary>
/// 重置用户修改次数
/// </summary>
/// <returns></returns>
public async System.Threading.Tasks.Task ResetUserUpdateExecute()
{
Console.WriteLine($"{DateTime.Now}定时重置用户修改次数");
await _cacheService.RemoveUserUpdateCountAsync();
}
/// <summary>
/// 同步设备浏览量
/// </summary>
/// <returns></returns>
public async System.Threading.Tasks.Task PageViewAsyncExecute()
{
await _equipmentService.PageViewAsync();
}
/// <summary>
/// 取消置顶设备信息
/// </summary>
/// <returns></returns>
public async System.Threading.Tasks.Task CancelTopAsyncExecute()
{
Console.WriteLine($"{DateTime.Now}取消置顶设备信息");
await _equipmentService.CancelTopAsync();
}
}
}