feat : order list
This commit is contained in:
@@ -5,8 +5,9 @@ namespace App\Constants\Common;
|
||||
class DriverCode
|
||||
{
|
||||
/**
|
||||
* @var int 状态 1 出发 2 目的地 99 异常
|
||||
* @var int 状态 1 出发 2 目的地 99 异常 999 未出发
|
||||
*/
|
||||
CONST INT NO_DEPARTURES = 999;
|
||||
CONST INT DEPARTURES = 1;
|
||||
CONST INT DESTINATION = 2;
|
||||
CONST INT EXCEPTIONS = 99;
|
||||
|
||||
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
namespace App\Service\Api\Driver;
|
||||
|
||||
use App\Constants\Admin\CateringCode;
|
||||
use App\Constants\Common\DriverCode;
|
||||
use App\Constants\Common\GoodCode;
|
||||
use App\Constants\Common\RoleCode;
|
||||
use App\Exception\ErrException;
|
||||
@@ -234,6 +235,7 @@ abstract class BaseDriverService extends BaseService
|
||||
'meal_list' => $mealArr[$site['id']]['sku'] ?? [],
|
||||
'option_order_quantity' => $optionArr[$site['id']]['copies'] ?? 0,
|
||||
'option_add_staple_food_num' => $optionArr[$site['id']]['add_staple_food_num'] ?? 0,
|
||||
'status' => DriverCode::NO_DEPARTURES,
|
||||
'create_time' => $dateTime,
|
||||
'update_time' => $dateTime,
|
||||
];
|
||||
|
||||
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
namespace App\Service\Api\Driver;
|
||||
|
||||
use App\Constants\Admin\CateringCode;
|
||||
use App\Constants\Common\DriverCode;
|
||||
use App\Constants\Common\OrderCode;
|
||||
use App\Exception\ErrException;
|
||||
use App\Model\Order;
|
||||
@@ -60,6 +61,7 @@ class LoadActionService extends BaseDriverService
|
||||
|
||||
$list = $this->buildListData();
|
||||
foreach ($list as &$one) {
|
||||
$one['status'] = DriverCode::DEPARTURES;
|
||||
$one['meal_list'] = json_encode($one['meal_list']);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user