領収証発行サービス
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

32 行
648B

  1. <?php
  2. namespace App\Logic\ReceiptIssuingOrder;
  3. use App\Models\ReceiptIssuingOrder;
  4. use App\Util\DateUtil;
  5. class TokenCheckManager extends ReceiptIssuingOrderManager
  6. {
  7. public function __construct(
  8. protected ReceiptIssuingOrder $order,
  9. ) {
  10. parent::__construct($order);
  11. }
  12. public function check(string $token): bool
  13. {
  14. $ret = $this->checkToken($token);
  15. if (
  16. $ret &&
  17. $this->order->status_first_access_datetime === null
  18. ) {
  19. $this->order->status_first_access_datetime = DateUtil::now();
  20. $this->save();
  21. }
  22. return $ret;
  23. }
  24. }