Explorar el Código

兑换商城只能有一个

durong hace 5 años
padre
commit
59297a0c51
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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, '兑换商城只能有一个');
             }
         }