|
|
@@ -361,20 +361,23 @@ class IntraCityController extends BaseController
|
|
|
$orderType = $order['orderType'] ?? 1;
|
|
|
$goodsNum = $order['goodsNum'] ?? 0;
|
|
|
$goodsNum = $goodsNum > 0 ? $goodsNum : 1;
|
|
|
- $itemList = [['item_name' => '花材', 'item_pic_url' => imgUtil::groupImg(''), 'count' => $goodsNum]];
|
|
|
- if ($orderType == 1) {
|
|
|
- $itemInfo = OrderGoodsClass::getByCondition(['orderSn' => $sn], true);
|
|
|
- if (!empty($itemInfo)) {
|
|
|
- $cover = $itemInfo['cover'] ?? '';
|
|
|
- $itemList = [['item_name' => '花束', 'item_pic_url' => imgUtil::groupImg($cover), 'count' => $goodsNum]];
|
|
|
- }
|
|
|
- } else {
|
|
|
+
|
|
|
+ $itemList = [];
|
|
|
+ $itemInfo = OrderGoodsClass::getByCondition(['orderSn' => $sn], true);
|
|
|
+ if (!empty($itemInfo)) {
|
|
|
+ $cover = $itemInfo->cover ?? '';
|
|
|
+ $itemList = [['item_name' => '花束', 'item_pic_url' => imgUtil::groupImg($cover), 'count' => $goodsNum]];
|
|
|
+ }
|
|
|
+ if (empty($itemList)) {
|
|
|
$itemInfo = OrderItemClass::getByCondition(['orderSn' => $sn], true);
|
|
|
if (!empty($itemInfo)) {
|
|
|
- $cover = $itemInfo['cover'] ?? '';
|
|
|
+ $cover = $itemInfo->cover ?? '';
|
|
|
$itemList = [['item_name' => '花材', 'item_pic_url' => imgUtil::groupImg($cover), 'count' => $goodsNum]];
|
|
|
}
|
|
|
}
|
|
|
+ if (empty($itemList)) {
|
|
|
+ $itemList = [['item_name' => '鲜花花材', 'item_pic_url' => imgUtil::groupImg(''), 'count' => $goodsNum]];
|
|
|
+ }
|
|
|
|
|
|
$cargoName = $orderType == 1 ? '花束' : '花材';
|
|
|
|
|
|
@@ -742,7 +745,7 @@ class IntraCityController extends BaseController
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
- if (empty($msg)) { // $msg 不为空,则发通知
|
|
|
+ if (!empty($msg)) { // $msg 不为空,则发通知
|
|
|
$order = OrderClass::getById($orderId, true, 'id, shopId, customName, sendNum');
|
|
|
$shop = ShopClass::getById($order->shopId, true, 'id, ptStyle, mainId');
|
|
|
$result = $msg . $order->sendNum;
|