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(); }
五分钟内数据有过更新,自动执行时查询出来的还是未更新的数据,请问怎么解决
- 4 回答
- 0 关注
- 570 浏览
添加回答
举报
0/150
提交
取消