增加发单开关
parent
07753ec10d
commit
c8ba1350d6
|
|
@ -9,7 +9,9 @@ use App\Model\Lottery;
|
|||
use App\Model\LotteryType;
|
||||
use App\Model\Seller\ShopCooperateLottery;
|
||||
use App\Service\LotteryService;
|
||||
use App\Utils\Helps;
|
||||
use App\Utils\Result;
|
||||
use App\Utils\ThrowException;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class LotteryController extends BaseController
|
||||
|
|
@ -35,6 +37,9 @@ class LotteryController extends BaseController
|
|||
public function types(Request $request)
|
||||
{
|
||||
$isFadan = $request->input('is_fadan');
|
||||
if ($isFadan) {
|
||||
ThrowException::isTrue(!Helps::genDanEnable(), '系统维护中...');
|
||||
}
|
||||
|
||||
$idList = Lottery::active()
|
||||
->where('shop_id', $this->customerShopId())
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class OrderController extends BaseController
|
|||
*/
|
||||
public function daShenList()
|
||||
{
|
||||
|
||||
ThrowException::isTrue(!Helps::genDanEnable(), '系统维护中...');
|
||||
$cdate = date('Ymd');
|
||||
$fames = CustomerRanking::with('customer:id,name,nickname,avatar,remark')
|
||||
->where('cdate', $cdate)
|
||||
|
|
@ -267,6 +267,7 @@ class OrderController extends BaseController
|
|||
*/
|
||||
public function copies(Request $request)
|
||||
{
|
||||
ThrowException::isTrue(!Helps::genDanEnable(), '系统维护中...');
|
||||
$size = $request->input('size');
|
||||
$filter = $request->input('filter');
|
||||
$nickname = $request->input('nickname');
|
||||
|
|
|
|||
|
|
@ -706,6 +706,7 @@ trait JingCaiTrait
|
|||
}
|
||||
|
||||
public function canCreateFanDanOrder($customerId) {
|
||||
ThrowException::isTrue(!Helps::genDanEnable(), '系统维护中...');
|
||||
$fadanNum = Order::usable()
|
||||
->where('type', OrderType::FADAN)
|
||||
->where('customer_id', $customerId)
|
||||
|
|
|
|||
|
|
@ -490,4 +490,12 @@ class Helps
|
|||
}
|
||||
return number_format($numerator / $denominator, $decimal, '.', '') * 100;
|
||||
}
|
||||
|
||||
public static function genDanEnable() {
|
||||
if (date('Y-m-d H:i:s') > '2024-11-17 23:30:00') {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue