feat : rank

This commit is contained in:
2025-04-09 15:10:07 +08:00
parent ec1d01751e
commit 35e5bb80b2

View File

@@ -77,7 +77,6 @@ class CateringService extends CateringBaseService
// 获取数据源
$this->logInfo = $this->orderMealCateringLogModel->find($id);
$this->siteInfo = $this->siteModel->find($this->logInfo->site_id);
$this->resCount = $this->logInfo->quantity;
// 检测数据
$this->check();
@@ -138,6 +137,8 @@ class CateringService extends CateringBaseService
if ($this->logInfo->quantity <= 0) throw new ErrException('该配餐数量为0不可配餐');
$this->resCount = $this->logInfo->quantity;
$allOrderIds = $this->orderModel
->where('site_id', $this->logInfo->site_id)
->where('cycle_id', $this->cycleId)
@@ -152,6 +153,6 @@ class CateringService extends CateringBaseService
->where('sku_id', $this->logInfo->sku_id)
->sum('copies') ?? 0;
if ($totalCopies != $this->logInfo->quantity) $this->resCount = $totalCopies;
if ($totalCopies != $this->logInfo->quantity) $this->resCount = (int)$totalCopies;
}
}