Compare commits
2 Commits
8baa5aa793
...
7d10e19b3f
| Author | SHA1 | Date |
|---|---|---|
|
|
7d10e19b3f | |
|
|
28b2e5aaf3 |
|
|
@ -463,6 +463,7 @@ class BjdcController extends BaseController
|
|||
*/
|
||||
public function orderCreate(Request $request, BjdcService $service)
|
||||
{
|
||||
ThrowException::isTrue(!$this->allowHour(), '早六点到上午十点是非销售时间');
|
||||
$data = $request->all();
|
||||
$lotteryTypeId = Arr::get($data, 'lottery_type_id');
|
||||
$lotteryType = LotteryType::find($lotteryTypeId);
|
||||
|
|
@ -490,5 +491,12 @@ class BjdcController extends BaseController
|
|||
'pay_types' => $this->getPayTypes()
|
||||
]);
|
||||
}
|
||||
|
||||
public function allowHour()
|
||||
{
|
||||
$h = date('H');
|
||||
if ($h >= 6 && $h <= 10 ){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -585,6 +585,21 @@ class Order extends BaseModel
|
|||
$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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue