From 04102f7237efefa744090ed7c25f7b5d0807b679 Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Thu, 05 Feb 2026 18:11:57 +0800
Subject: [PATCH] 完成运营中心提现和运营中心权限管理

---
 admin/app/shop/model/supplier/Category.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/admin/app/shop/model/supplier/Category.php b/admin/app/shop/model/supplier/Category.php
index 87996a5..c9e873b 100644
--- a/admin/app/shop/model/supplier/Category.php
+++ b/admin/app/shop/model/supplier/Category.php
@@ -24,7 +24,7 @@
     public function add($data)
     {
         $data['app_id'] = self::$app_id;
-        $isExist = static::where('name','=',$data['name'])->find();
+        $isExist = static::where('name','=',$data['name'])->where('category_type','=',$data['category_type'])->find();
         if($isExist){
             $this->error='名称已存在';
             return false;
@@ -37,7 +37,7 @@
      */
     public function edit($data)
     {   
-        $isExist = static::where('name','=',$data['name'])->where('category_id','<>',$data['category_id'])->find();
+        $isExist = static::where('name','=',$data['name'])->where('category_type','=',$data['category_type'])->where('category_id','<>',$data['category_id'])->find();
         if($isExist){
             $this->error='名称已存在';
             return false;

--
Gitblit v1.9.2