diff --git a/app/store/controller/Goods.php b/app/store/controller/Goods.php index 1d682df3..ee24e063 100644 --- a/app/store/controller/Goods.php +++ b/app/store/controller/Goods.php @@ -692,8 +692,14 @@ class Goods extends Controller if(empty($detail)){ return $this->renderError('暂无线报商品'); } + $model = new GoodsModel(); + $List = GoodsModel::whereIn("goods_id",$detail['goods_id'])->select(); + $goodsList = null; + foreach ($List as $key => $value) { - $goodsList = GoodsModel::whereIn("goods_id",$detail['goods_id'])->select(); + $goodsList[] = $model->getDetail( $value["goods_id"]); + + } return $this->renderSuccess(compact('goodsList')); } diff --git a/app/store/service/order/Delivery.php b/app/store/service/order/Delivery.php index 66f2a93e..e9da5a43 100644 --- a/app/store/service/order/Delivery.php +++ b/app/store/service/order/Delivery.php @@ -50,11 +50,12 @@ class Delivery extends BaseService */ public function delivery(int $orderId, array $param): bool { - if(empty($param['expressId'])) { + + if($param['deliveryMethod'] == self::DELIVERY_METHOD_MANUAL && empty($param['expressId'])) { $this->error = '物流公司不能为空'; return false; } - if (empty($param['expressNo'])) { + if ($param['deliveryMethod'] == self::DELIVERY_METHOD_MANUAL && empty($param['expressNo'])) { $this->error = '物流单号不能为空'; return false; }