diff --git a/crmeb/app/adminapi/controller/v1/order/RefundOrder.php b/crmeb/app/adminapi/controller/v1/order/RefundOrder.php index dd2c64fe6..fbb9c5b4b 100644 --- a/crmeb/app/adminapi/controller/v1/order/RefundOrder.php +++ b/crmeb/app/adminapi/controller/v1/order/RefundOrder.php @@ -190,7 +190,8 @@ class RefundOrder extends AuthController $refund_data['open_id'] = $wechatUserServices->uidToOpenid((int)$order['uid'], 'routine') ?? ''; $refund_data['refund_no'] = $orderRefund['order_id']; //修改订单退款状态 - $data['refund_price'] = $data['refunded_price']; +// $data['refund_price'] = $data['refunded_price']; + unset($data['refund_price']); if ($this->services->agreeRefund($id, $refund_data)) { $this->services->update($id, $data); return app('json')->success(400149); diff --git a/crmeb/app/services/activity/live/LiveRoomServices.php b/crmeb/app/services/activity/live/LiveRoomServices.php index 4408c8647..a5f03b14a 100644 --- a/crmeb/app/services/activity/live/LiveRoomServices.php +++ b/crmeb/app/services/activity/live/LiveRoomServices.php @@ -40,6 +40,10 @@ class LiveRoomServices extends BaseServices $where['is_del'] = 0; [$page, $limit] = $this->getPageValue(); $list = $this->dao->getList($where, '*', [], $page, $limit); + $liveProductServices = app()->make(LiveRoomGoodsServices::class); + foreach ($list as &$item) { + $item['product_ids'] = array_column($liveProductServices->selectList(['live_room_id' => $item['id']])->toArray(), 'live_goods_id'); + } $count = $this->dao->count($where); return compact('count', 'list'); } diff --git a/crmeb/app/services/order/StoreCartServices.php b/crmeb/app/services/order/StoreCartServices.php index 9367bd849..34275c1da 100644 --- a/crmeb/app/services/order/StoreCartServices.php +++ b/crmeb/app/services/order/StoreCartServices.php @@ -232,8 +232,10 @@ class StoreCartServices extends BaseServices public function setCart(int $uid, int $product_id, int $cart_num = 1, string $product_attr_unique = '', int $type = 0, bool $new = true, int $combination_id = 0, int $seckill_id = 0, int $bargain_id = 0, int $advance_id = 0) { if ($cart_num < 1) $cart_num = 1; - //检查限购 - $this->checkLimit($uid, $product_id, $cart_num, $new); + if ($type == 0) { + //检查限购 + $this->checkLimit($uid, $product_id, $cart_num, $new); + } //检测库存限量 [$attrInfo, $product_attr_unique, $bargainPriceMin, $cart_num, $productInfo] = $this->checkProductStock($uid, $cart_num, $product_attr_unique, $type, $product_id, $seckill_id, $bargain_id, $combination_id, $advance_id); if ($new) { @@ -702,8 +704,8 @@ class StoreCartServices extends BaseServices } } else if ($limitInfo['limit_type'] == 2) { $cartNum = $this->dao->sum(['uid' => $uid, 'product_id' => $product_id], 'cart_num'); - $orderPayNum = $orderCartServices->sum(['uid' => $uid, 'product_id' => $product_id, 'pid' => 0], 'cart_num'); - $orderRefundNum = $orderCartServices->sum(['uid' => $uid, 'product_id' => $product_id, 'pid' => 0], 'refund_num'); + $orderPayNum = $orderCartServices->sum(['uid' => $uid, 'product_id' => $product_id, 'split_status' => 0], 'cart_num'); + $orderRefundNum = $orderCartServices->sum(['uid' => $uid, 'product_id' => $product_id, 'split_status' => 0], 'refund_num'); $orderNum = $orderPayNum - $orderRefundNum; if (($num + $orderNum + $cartNum) > $limitInfo['limit_num']) { throw new ApiException(410240, ['limit' => $limitInfo['limit_num'], 'pay_num' => $orderNum]); diff --git a/crmeb/app/services/order/StoreOrderSplitServices.php b/crmeb/app/services/order/StoreOrderSplitServices.php index 8950205d3..e6178ecae 100644 --- a/crmeb/app/services/order/StoreOrderSplitServices.php +++ b/crmeb/app/services/order/StoreOrderSplitServices.php @@ -160,6 +160,7 @@ class StoreOrderSplitServices extends BaseServices 'cart_info' => json_encode($_info), ]; } + $storeOrderCartInfoServices->update(['oid' => $id, 'cart_id' => $cart['cart_id']], ['surplus_num' => 0, 'split_status' => 2]); } if ($orderInfo['pid'] > 0 && $key == 'other') {