feat : check

This commit is contained in:
2025-04-01 15:17:05 +08:00
parent d1a7efd5bb
commit ac9bfe1b92

View File

@@ -124,6 +124,8 @@ class DispenseAddService extends BaseService
public function handle(): array public function handle(): array
{ {
try { try {
$this->claimRule = (int)$this->request->input('claim_rule',CouponCode::DISPENSE_CLAIM_RULE_HOME_POPUPS);
$this->userIds = $this->beneficiary(); $this->userIds = $this->beneficiary();
$this->checkCouponTemplate(); $this->checkCouponTemplate();
@@ -226,7 +228,6 @@ class DispenseAddService extends BaseService
*/ */
private function checkClaimRuleData(): void 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'))) { if ($this->claimRule == CouponCode::DISPENSE_CLAIM_RULE_SINGLE_PAGE && empty($this->request->input('claim_value'))) {
throw new Exception('单页请输入路径'); throw new Exception('单页请输入路径');
} }