Compare commits

...

2 Commits

Author SHA1 Message Date
jcadmin 7d10e19b3f 北京单场早上06:00到10:00时间为非下单时间 2026-06-15 22:50:40 +08:00
jcadmin 28b2e5aaf3 派奖 2026-06-15 22:22:03 +08:00
2 changed files with 24 additions and 1 deletions

View File

@ -463,6 +463,7 @@ class BjdcController extends BaseController
*/ */
public function orderCreate(Request $request, BjdcService $service) public function orderCreate(Request $request, BjdcService $service)
{ {
ThrowException::isTrue(!$this->allowHour(), '早六点到上午十点是非销售时间');
$data = $request->all(); $data = $request->all();
$lotteryTypeId = Arr::get($data, 'lottery_type_id'); $lotteryTypeId = Arr::get($data, 'lottery_type_id');
$lotteryType = LotteryType::find($lotteryTypeId); $lotteryType = LotteryType::find($lotteryTypeId);
@ -490,5 +491,12 @@ class BjdcController extends BaseController
'pay_types' => $this->getPayTypes() 'pay_types' => $this->getPayTypes()
]); ]);
} }
public function allowHour()
{
$h = date('H');
if ($h >= 6 && $h <= 10 ){
return false;
}
return true;
}
} }

View File

@ -585,6 +585,21 @@ class Order extends BaseModel
$this->button_qupiao = BoolEnum::YES; $this->button_qupiao = BoolEnum::YES;
} }
} }
if (in_array($this->lottery_state, [LottState::WIN])) {
if ($this->cooperate_id > 0) {
if ($this->shop_id == $seller->shop_id) {
if ($this->cooperate_show == BoolEnum::NO && $this->cooperate_common == 1) {
$this->button_paijiang = BoolEnum::YES;
}
} else {
if ($this->cooperate_show == BoolEnum::YES) {
$this->button_paijiang = BoolEnum::YES;
}
}
} else {
$this->button_paijiang = BoolEnum::YES;
}
}
// 派奖,取票 // 派奖,取票
if ($this->lottery_state == LottState::WAIT) { if ($this->lottery_state == LottState::WAIT) {