wesmiler 2 месяцев назад
Родитель
Сommit
93f3e49248
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      app/Services/Api/ArticleService.php
  2. 1 1
      app/Services/Api/SupervisorsService.php

+ 1 - 1
app/Services/Api/ArticleService.php

@@ -258,7 +258,7 @@ class ArticleService extends BaseService
             $this->error = '请填写当前角色/职务';
             return false;
         }
-        $cacheKey = "caches:articles:consult:{$userId}";
+        $cacheKey = "caches:articles:consult:{$userId}_{$sourceId}";
         if (RedisService::get($cacheKey)) {
             $this->error = '您近期已经提交过,请30秒后重试';
             return false;

+ 1 - 1
app/Services/Api/SupervisorsService.php

@@ -182,7 +182,7 @@ class SupervisorsService extends BaseService
             $this->error = '请填写当前角色/职务';
             return false;
         }
-        $cacheKey = "caches:supervisors:consult:{$userId}";
+        $cacheKey = "caches:supervisors:consult:{$userId}_{$sourceId}";
         if (RedisService::get($cacheKey)) {
             $this->error = '您近期已经提交过,请30秒后重试';
             return false;