瀏覽代碼

兑换商城只能有一个

durong 5 年之前
父節點
當前提交
59297a0c51
共有 1 個文件被更改,包括 2 次插入2 次删除
  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, '兑换商城只能有一个');
             }
         }