feat(PayEnum): 移除支付描述函数和支付方式名称属性
This commit is contained in:
parent
e1bddc0e32
commit
fe4cb330c9
@ -54,30 +54,6 @@ class PayEnum
|
||||
const UNPAID = 0; //未支付
|
||||
const ISPAID = 1; //已支付
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取支付类型
|
||||
* @param bool $value
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2023/2/23 15:36
|
||||
*/
|
||||
public static function getPayDesc($value = true)
|
||||
{
|
||||
$data = [
|
||||
self::BALANCE_PAY => '余额支付',
|
||||
self::WECHAT_PAY => '微信支付',
|
||||
self::ALIPAY => '支付宝支付',
|
||||
];
|
||||
if ($value === true) {
|
||||
return $data;
|
||||
}
|
||||
return $data[$value] ?? '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 支付状态
|
||||
* @param bool $value
|
||||
|
@ -30,16 +30,4 @@ class PayConfig extends BaseModel
|
||||
return empty($value) ? '' : FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 支付方式名称获取器
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string|string[]
|
||||
* @author ljj
|
||||
* @date 2021/7/31 2:24 下午
|
||||
*/
|
||||
public function getPayWayNameAttr($value,$data)
|
||||
{
|
||||
return PayEnum::getPayDesc($data['pay_way']);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user