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/common/model/supplier/Category.php | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/admin/app/common/model/supplier/Category.php b/admin/app/common/model/supplier/Category.php
index 056e650..94e5928 100644
--- a/admin/app/common/model/supplier/Category.php
+++ b/admin/app/common/model/supplier/Category.php
@@ -2,6 +2,7 @@
namespace app\common\model\supplier;
+use app\common\enum\supplier\SupplierType;
use app\common\model\BaseModel;
/**
@@ -11,6 +12,7 @@
{
protected $name = 'supplier_category';
protected $pk = 'category_id';
+ protected $append = ['type_text'];
/**
* 所有分类
@@ -19,12 +21,21 @@
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
- public static function getALL()
+ public static function getALL($params = [])
{
$model = new static;
+ !empty($params['category_type']) && $model=$model->where('category_type','=',$params['category_type']);
return $model->order(['sort' => 'asc', 'create_time' => 'asc'])->select();
}
/**
+ * 分类类型文本
+ */
+ public function getTypeTextAttr($value, $data)
+ {
+ return (new SupplierType())::getName($data['category_type']);
+ }
+
+ /**
* 详情
*/
public static function detail($category_id)
--
Gitblit v1.9.2