在订单详情中添加店铺名称字段

在BeforehandOrderLogic类的getOrderDetail方法中,添加了系统店铺名称字段。此信息现在将通过SystemStore模型获取,并在返回的订单详情数组中提供,使得用户能够直接看到店铺名称,而不仅仅是店铺ID。
This commit is contained in:
mkm 2024-10-15 16:38:34 +08:00
parent 2da3b56f8a
commit bc056b892c

View File

@ -16,6 +16,7 @@ use app\common\model\store_order\StoreOrder;
use app\common\model\store_order_cart_info\StoreOrderCartInfo;
use app\common\model\store_product\StoreProduct;
use app\common\model\store_product_unit\StoreProductUnit;
use app\common\model\system_store\SystemStore;
use app\common\model\user\User;
use app\common\model\user\UserAddress;
use app\common\model\warehouse_order\WarehouseOrder;
@ -436,6 +437,7 @@ class BeforehandOrderLogic extends BaseLogic
$arr = StoreCategory::where('id', 'in', $top_cate_list)->field('name,id')->select();
$res['top_cate'] = $arr?->toArray();
}
$res['system_store']=SystemStore::where('id',$res['store_id'])->value('name');
return $res;
}
}