Merge branch 'S02-轨迹中台第二部分' into test
This commit is contained in:
commit
df43729da6
@ -32,7 +32,7 @@ public class CAPFilter : SubscribeFilter
|
||||
throw new BusinessException(_ERROR_CODE, $"检测到重复消费,消费参数:{argumentJsonStr}");
|
||||
|
||||
RedisHelper.Client.Set($"CapExcuteFilter:{hash}", 60 * 10,
|
||||
TimeSpan.FromDays(1).Seconds); // 1天内不允许一模一样的参数重复消费
|
||||
TimeSpan.FromHours(1).Seconds); // 1h内不允许一模一样的参数重复消费
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -104,6 +104,7 @@ public class TrackPullService : ApplicationService
|
||||
group.Key.SubSystemId, group.Key.OrderType)));
|
||||
}
|
||||
|
||||
if (config.PullInterval < 60) config.PullInterval = 60;
|
||||
await RedisHelper.Client.SetExAsync(redisKey, config.PullInterval * 60, orders.Count);
|
||||
}
|
||||
|
||||
|
||||
@ -62,6 +62,7 @@ public class OrderRepository : BasicRepository<OrderEntity>, IOrderRepository, I
|
||||
return await Context.Queryable<TrackPushConfigEntity>()
|
||||
.LeftJoin<OrderEntity>((a, b) => a.SubSystemId == b.SubSystemId && a.CustomId == b.CustomId)
|
||||
.Where((a, b) => !b.IsCompleted && b.QuestionType != errorType)
|
||||
.Where("a.CreateTime < DATE_SUB(now(),INTERVAL 12 hour)") // 过滤掉创建时间不足12小时的
|
||||
.Select((a, b) => new OrderEntity
|
||||
{
|
||||
Id = b.Id,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user