System.Timers.Timer t = new System.Timers.Timer(300000);
t.Elapsed += new System.Timers.ElapsedEventHandler((s, e) => Arbitration(s, e, orderId));
t.AutoReset = false;
t.Enabled = true;
public void Arbitration(object source,ElapsedEventArgs e,long orderId)
{
var model = context.OrderCancelInfo.FirstOrDefault(c => c.BizOrdersId == orderId);
if (model.Status == 0)
{
model.Status = 3;
model.Remarks = "暂无回应";
}
context.SaveChanges();
}
五分钟内数据有过更新,自动执行时查询出来的还是未更新的数据,请问怎么解决
慕容森
天涯尽头无女友
哆啦的时光机
相关分类