|
@@ -4,6 +4,7 @@ namespace App\Modules\Admin\Services;
|
|
|
|
|
|
use App\Base\BaseService;
|
|
|
use App\Base\Utils;
|
|
|
+use App\Models\Goods\GoodsCustom;
|
|
|
use App\Models\Order\Order;
|
|
|
use App\Models\Order\OrderGoods;
|
|
|
use App\Models\User\User;
|
|
@@ -46,7 +47,13 @@ class OrderService extends BaseService
|
|
|
"goods_thumb" => $goods->goods->thumb,
|
|
|
"goods_sn" => $goods->sn,
|
|
|
"goods_count" => $goods->count,
|
|
|
- "custom" => $goods->custom,
|
|
|
+ "custom" => array_map(function ($custom) {
|
|
|
+ return [
|
|
|
+ "custom_id" => $custom['custom_id'],
|
|
|
+ "title" => GoodsCustom::where("id", $custom['custom_id'])->value("title"),
|
|
|
+ "value" => $custom['value'] ?? "",
|
|
|
+ ];
|
|
|
+ }, $goods->custom ?? []),
|
|
|
];
|
|
|
}),
|
|
|
"phone" => $model->user->phone,
|