Compare commits

...

5 Commits

Author SHA1 Message Date
fdb5d99214 fix : order 2025-08-06 17:58:50 +08:00
b202835205 fix : order 2025-08-06 17:43:26 +08:00
44a500df9f fix : date 2025-08-06 17:24:43 +08:00
1a962ecb39 fix : date 2025-08-06 17:22:10 +08:00
24a911d63a fix : user default address 2025-08-06 17:18:36 +08:00
4 changed files with 5 additions and 5 deletions

View File

@@ -91,6 +91,6 @@ class UserSite extends Model
*/
public function getUserDefaultInfoByUserId(int $userId)
{
return $this->where('user_id', $userId)->where('is_default',SiteCode::USER_NO_DEFAULT)->first();
return $this->where('user_id', $userId)->where('is_default',SiteCode::USER_DEFAULT)->first();
}
}

View File

@@ -47,7 +47,7 @@ class FinancesService extends BaseService
->when($searchKitchenId, function ($query) use ($searchKitchenId) {
$query->where('kitchen_id', $searchKitchenId);
})
->groupBy('cycle_id')
->groupBy('cycle_id','date')
->orderByDesc('cycle_id')
->select(
'date',

View File

@@ -156,11 +156,11 @@ class OrderInfoService extends BaseService
for ($i = 1; $i <= (count($newOrderSkuList) ?? 0); $i++) {
$pickupCodeOneCopies = $pickupCodeArrList[$order['id']][$i]['pickup_code'] ?? null;
$pickupCodeOneCopies = $pickupCodeList[$i] ?? null;
$boxNum = 0;
if (!empty($pickupCodeOneCopies)) {
$pickupCodeOneCopiesArr = explode('-', $pickupCodeOneCopies);
$boxNum = ceil(end($pickupCodeOneCopiesArr) ?? '0' / (int)$this->configCache->getConfigValueByKey(ConfigCode::MAXIMUM_VALUE_IN_FULL_BOX));
$boxNum = ceil((int)(end($pickupCodeOneCopiesArr) ?? 0) / (int)$this->configCache->getConfigValueByKey(ConfigCode::MAXIMUM_VALUE_IN_FULL_BOX));
}
$oneCopiesInfo = [

View File

@@ -184,7 +184,7 @@ class OrderListService extends BaseService
$boxNum = 0;
if (!empty($pickupCodeOneCopies)) {
$pickupCodeOneCopiesArr = explode('-', $pickupCodeOneCopies);
$boxNum = ceil(end($pickupCodeOneCopiesArr) ?? '0' / (int)$this->configCache->getConfigValueByKey(ConfigCode::MAXIMUM_VALUE_IN_FULL_BOX));
$boxNum = ceil((int)(end($pickupCodeOneCopiesArr) ?? 0) / (int)$this->configCache->getConfigValueByKey(ConfigCode::MAXIMUM_VALUE_IN_FULL_BOX));
}
$oneCopiesInfo = [
'total_price' => '0.00',