This commit is contained in:
全栈小学生
2025-09-13 10:30:14 +08:00
parent d497fdcc30
commit 29213bc600
46 changed files with 1609 additions and 75 deletions

View File

@@ -11,6 +11,7 @@
namespace app\model\pay;
use app\dict\common\CommonActiveDict;
use app\dict\pay\PayDict;
use app\dict\pay\RefundDict;
use core\base\BaseModel;
@@ -134,4 +135,12 @@ class Refund extends BaseModel
$query->where('refund_no', 'like', "%$value%");
}
}
public function getTradeTypeNameAttr($value, $data)
{
if (empty($data['trade_type'])){
return '';
}
return CommonActiveDict::getActiveShort($data['trade_type'])['active_name'] ?? "";
}
}

View File

@@ -0,0 +1,49 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\model\sys;
use app\dict\channel\AppDict;
use core\base\BaseModel;
use think\db\Query;
class AppVersion extends BaseModel
{
protected $pk = 'id';
//类型
protected $type = [
'release_time' => 'timestamp',
];
/**
* 模型名称
* @var string
*/
protected $name = 'app_version';
public function searchPlatformAttr(Query $query, $value, $data)
{
if ($value) {
$query->where('platform', $value);
}
}
public function getPlatformNameAttr($value, $data)
{
return AppDict::getAppPlatformName($data['platform']);
}
public function getStatusNameAttr($value, $data)
{
return AppDict::getStatusName($data['status']);
}
}