fix : coupon

This commit is contained in:
2025-04-01 09:21:58 +08:00
parent 566498fd03
commit a73c547556
2 changed files with 5 additions and 4 deletions

View File

@@ -120,8 +120,6 @@ class DispenseAddService extends BaseService
/** /**
* @return array * @return array
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
public function handle(): array public function handle(): array
{ {

View File

@@ -68,10 +68,11 @@ class DispenseConfirmService extends BaseService
*/ */
private array $appointValue; private array $appointValue;
/** /**
* @var int * @var int
*/ */
private int $groupType; private int $claimRule;
/** /**
* @return array * @return array
@@ -80,7 +81,9 @@ class DispenseConfirmService extends BaseService
public function handle(): array public function handle(): array
{ {
try { try {
$userIdList = match ($this->groupType = (int)$this->request->input('appoint_group',CouponCode::DISPENSE_APPOINT_GROUP_ALL_PEOPLE)) $this->claimRule = (int)$this->request->input('claim_rule',CouponCode::DISPENSE_CLAIM_RULE_HOME_POPUPS);
$userIdList = match ((int)$this->request->input('appoint_group',CouponCode::DISPENSE_APPOINT_GROUP_ALL_PEOPLE))
{ {
CouponCode::DISPENSE_APPOINT_GROUP_DESIGNATED_USERS => $this->handleDesignatedUsers(), CouponCode::DISPENSE_APPOINT_GROUP_DESIGNATED_USERS => $this->handleDesignatedUsers(),
CouponCode::DISPENSE_APPOINT_GROUP_DESIGNATED_SITES => $this->handleDesignatedSites(), CouponCode::DISPENSE_APPOINT_GROUP_DESIGNATED_SITES => $this->handleDesignatedSites(),