增加提货数量+领取时间和提货时间

This commit is contained in:
2023-01-30 11:49:31 +08:00
parent ee394e1ac8
commit a0e9eac706
7 changed files with 29 additions and 16 deletions

View File

@@ -77,9 +77,6 @@ class OrderBuyController extends Controller
$type = OrderModel::TYPE_NORMAL;
info($goods_sku->goods->channel);
info($goods_sku->goods->id);
info($goods_sku->id);
if ($goods_sku->goods->channel == Goods::CHANNEL_FREE) {
$type = OrderModel::TYPE_SAMPLE;
@@ -89,13 +86,10 @@ class OrderBuyController extends Controller
$type = OrderModel::TYPE_SCORE;
}
$areaCode = $user->info->areaCode;
if ($type == OrderModel::TYPE_SAMPLE) {
if (! $user->info->areaCode) {
return $this->failed('您没有提货码不可参与此活动');
}
$areaCode = AreaCode::where('code', $user->info->areaCode)->first();
if (! $areaCode) {
return $this->failed('您绑定的提货码不正确');
return $this->failed('您没有提货码不可参与此活动');
}
if ($areaCode->status != AreaCode::STATUS_INIT) {
@@ -190,13 +184,10 @@ class OrderBuyController extends Controller
$type = OrderModel::TYPE_SCORE;
}
$areaCode = $user->info->areaCode;
if ($type == OrderModel::TYPE_SAMPLE) {
if (! $user->info->areaCode) {
return $this->failed('您没有提货码不可参与此活动');
}
$areaCode = AreaCode::where('code', $user->info->areaCode)->first();
if (! $areaCode) {
return $this->failed('您绑定的提货码不正确');
return $this->failed('您没有提货码不可参与此活动');
}
if ($areaCode->status != AreaCode::STATUS_INIT) {
@@ -204,6 +195,7 @@ class OrderBuyController extends Controller
}
}
$address = Address::where('user_id', $user->id)->where('id', $address_id)->first();
if (in_array($type, [OrderModel::TYPE_SCORE, OrderModel::TYPE_NORMAL]) && ! $address) {