feat: select 限定查询字段
This commit is contained in:
parent
f4313461a0
commit
c23542248e
@ -91,20 +91,19 @@ AND `a`.`IsDeleted` = 0 AND `b`.`IsDeleted` = 0 limit @pageSize", new { pageSize
|
||||
&& b.CreateTime < createTime
|
||||
&& !a.IsDeleted
|
||||
&& !b.IsDeleted)
|
||||
.Select((b, a) => new { Order = b })
|
||||
.Select((b, a) => new { b.LatestPushTime, b.Id, b.QuestionType })
|
||||
.ToPageListAsync(pageindex, pageSize);
|
||||
|
||||
var latestPushTimeIds = new List<int>();
|
||||
var questionZeroIds = new List<int>();
|
||||
foreach (var item in ordersToUpdate)
|
||||
{
|
||||
var order = item.Order;
|
||||
var questionType = !order.LatestPushTime.HasValue || order.LatestPushTime < DateTime.Now.AddHours(-12)
|
||||
var questionType = !item.LatestPushTime.HasValue || item.LatestPushTime < DateTime.Now.AddHours(-12)
|
||||
? 2
|
||||
: 0;
|
||||
if (order.QuestionType == questionType) continue;
|
||||
if (questionType == 2) latestPushTimeIds.AddLast(order.Id);
|
||||
else questionZeroIds.AddLast(order.Id);
|
||||
if (item.QuestionType == questionType) continue;
|
||||
if (questionType == 2) latestPushTimeIds.AddLast(item.Id);
|
||||
else questionZeroIds.AddLast(item.Id);
|
||||
}
|
||||
|
||||
int rows = 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user