feat : check
This commit is contained in:
@@ -124,6 +124,8 @@ class DispenseAddService extends BaseService
|
||||
public function handle(): array
|
||||
{
|
||||
try {
|
||||
$this->claimRule = (int)$this->request->input('claim_rule',CouponCode::DISPENSE_CLAIM_RULE_HOME_POPUPS);
|
||||
|
||||
$this->userIds = $this->beneficiary();
|
||||
|
||||
$this->checkCouponTemplate();
|
||||
@@ -226,7 +228,6 @@ class DispenseAddService extends BaseService
|
||||
*/
|
||||
private function checkClaimRuleData(): void
|
||||
{
|
||||
$this->claimRule = (int)$this->request->input('claim_rule',CouponCode::DISPENSE_CLAIM_RULE_HOME_POPUPS);
|
||||
if ($this->claimRule == CouponCode::DISPENSE_CLAIM_RULE_SINGLE_PAGE && empty($this->request->input('claim_value'))) {
|
||||
throw new Exception('单页请输入路径');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user