|
|
@@ -231,7 +231,7 @@ class GroupBuyController extends BaseController
|
|
|
if ($goodsNum > intval($row['limit'] ?? 1)) {
|
|
|
util::fail('超出单人限购数量');
|
|
|
}
|
|
|
- $order = $this->createGroupBuyOrder($form, $row, $groupBuyId, $goodsNum);
|
|
|
+ $order = $this->createGroupBuyOrder($form, $row, $groupBuyId, $goodsNum, $custom);
|
|
|
GroupBuyMemberClass::bindOrderMember(
|
|
|
$groupBuyId,
|
|
|
$mainId,
|
|
|
@@ -282,7 +282,7 @@ class GroupBuyController extends BaseController
|
|
|
* @param int $goodsNum
|
|
|
* @return object
|
|
|
*/
|
|
|
- private function createGroupBuyOrder($form, $row, $groupBuyId, $goodsNum)
|
|
|
+ private function createGroupBuyOrder($form, $row, $groupBuyId, $goodsNum, $currenCustom = [])
|
|
|
{
|
|
|
$shop = $this->shop;
|
|
|
$openShop = ShopClass::getOpenShop($shop);
|
|
|
@@ -291,6 +291,9 @@ class GroupBuyController extends BaseController
|
|
|
}
|
|
|
$mainId = intval($this->mainId);
|
|
|
$custom = $this->custom;
|
|
|
+ if (empty($custom) && !empty($currenCustom)) {
|
|
|
+ $custom = $currenCustom;
|
|
|
+ }
|
|
|
$hd = $this->hd;
|
|
|
$user = $this->user;
|
|
|
$saleGoodsId = intval($row['goodsId']);
|