mirror of
https://gitee.com/niucloud-team/niucloud
synced 2026-08-14 17:35:36 +08:00
up
This commit is contained in:
@@ -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'] ?? "";
|
||||
}
|
||||
}
|
||||
|
||||
49
niucloud/app/model/sys/AppVersion.php
Normal file
49
niucloud/app/model/sys/AppVersion.php
Normal 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']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user