feat : coupon
This commit is contained in:
@@ -159,7 +159,7 @@ class CateringService extends CateringBaseService
|
||||
$this->logInfo->status = CateringCode::CATERING_STATUS_FINISH;
|
||||
if (!$this->logInfo->save()) throw new Exception('配餐失败1');
|
||||
|
||||
if (!$this->orderModel->isCateringByOrderIds($this->orderIds)) throw new Exception('配餐失败2');
|
||||
if (!$this->orderModel->isCateringByOrderIds($this->orderIds) || !$this->orderGoodModel->isCateringByOrderIds($this->orderIds)) throw new Exception('配餐失败2');
|
||||
|
||||
Db::commit();
|
||||
|
||||
@@ -190,7 +190,7 @@ class CateringService extends CateringBaseService
|
||||
$currentDate = date('Y-m-d H:i:s');
|
||||
foreach ($this->orderList as &$order) {
|
||||
foreach ($order['copies_list'] as &$copiesItem) {
|
||||
if ($currentCode % $this->printBoxMaxNum === 0) {
|
||||
if ($currentCode / $this->printBoxMaxNum === 0) {
|
||||
$startCode = $currentCode + 1;
|
||||
$endCode = min($currentCode + $this->printBoxMaxNum, $this->totalCopies);
|
||||
$codeGroups = $this->splitArrayIntoPartitions(range($startCode, $endCode));
|
||||
|
||||
Reference in New Issue
Block a user