Quellcode durchsuchen

兑换商城只能有一个

durong vor 5 Jahren
Ursprung
Commit
59297a0c51
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      app/Repositories/CmsContentTemplateRepository.php

+ 2 - 2
app/Repositories/CmsContentTemplateRepository.php

@@ -50,8 +50,8 @@ class CmsContentTemplateRepository {
             }
         }
         if ($request['apply_type'] == 2) {
-            if ($this->cmsContentTemplate->where(['title' => $request['title'], 'apply_type' => 2])->exists()) {
-                throw new HttpException(500, '当前模版类型下该名称已存在');
+            if ($this->cmsContentTemplate->where('apply_type', '=', 2)->exists()) {
+                throw new HttpException(500, '兑换商城只能有一个');
             }
         }