kyle 2 years ago
parent
commit
5bc4522ae9
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      app/Http/Controllers/Web/Api2021Controller.php

+ 5
- 1
app/Http/Controllers/Web/Api2021Controller.php View File

34
     
34
     
35
     public function __destruct()
35
     public function __destruct()
36
     {
36
     {
37
-//        $this->aSv->syslog($this->sisLog);
37
+        $this->aSv->syslog($this->sisLog);
38
     }
38
     }
39
     
39
     
40
     // 申報系統(已廢棄)
40
     // 申報系統(已廢棄)
924
         } else {
924
         } else {
925
             $redis::incr($rlimitkey);
925
             $redis::incr($rlimitkey);
926
         }
926
         }
927
+
928
+        \Log::debug($rlimitkey);
929
+
927
         if ($redis::get($rlimitkey) > $this->settingManagementSv->getSetting()['TMZ_ESI_TEST_EVENT_LIMIT']) {
930
         if ($redis::get($rlimitkey) > $this->settingManagementSv->getSetting()['TMZ_ESI_TEST_EVENT_LIMIT']) {
928
             $this->sisLog['memoIn'] = json_encode(['error' => 'logical'], JSON_UNESCAPED_UNICODE);
931
             $this->sisLog['memoIn'] = json_encode(['error' => 'logical'], JSON_UNESCAPED_UNICODE);
929
             $this->sisLog['memoOut'] = json_encode(['msg' => '測試點數不能再打了'], JSON_UNESCAPED_UNICODE);
932
             $this->sisLog['memoOut'] = json_encode(['msg' => '測試點數不能再打了'], JSON_UNESCAPED_UNICODE);
933
         // 業務驗證(防重)
936
         // 業務驗證(防重)
934
         // 作用範圍: 以人為單位
937
         // 作用範圍: 以人為單位
935
         $rkey = $this->settingManagementSv->getSetting()['TMZ_ESI_TEST_EVENT_LIMIT'] . '_' . $lineId;
938
         $rkey = $this->settingManagementSv->getSetting()['TMZ_ESI_TEST_EVENT_LIMIT'] . '_' . $lineId;
939
+        \Log::debug($rkey);
936
         if (!$redis::setnx($rkey, 'true')) {
940
         if (!$redis::setnx($rkey, 'true')) {
937
             $redis::expire($rkey, 15); // 15 秒防重(這樣就算業務在其他地方掛了,他也會自動失效)
941
             $redis::expire($rkey, 15); // 15 秒防重(這樣就算業務在其他地方掛了,他也會自動失效)
938
             $this->sisLog['memoIn'] = json_encode(['error' => 'logical'], JSON_UNESCAPED_UNICODE);
942
             $this->sisLog['memoIn'] = json_encode(['error' => 'logical'], JSON_UNESCAPED_UNICODE);