22 lines
476 B
PHP
22 lines
476 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace app\common\logic;
|
||
|
|
|
||
|
|
use app\common\model\SysConfig;
|
||
|
|
use app\common\model\SysCurrency;
|
||
|
|
use app\common\traits\crud\CrudLogicTrait;
|
||
|
|
|
||
|
|
class SysConfigLogic
|
||
|
|
{
|
||
|
|
use CrudLogicTrait;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 指定当前要操作的模型
|
||
|
|
*/
|
||
|
|
protected string $modelClass = SysCurrency::class;
|
||
|
|
|
||
|
|
public function findByKey(string $key)
|
||
|
|
{
|
||
|
|
return SysConfig::where('status', 1)->where('config_key', $key)->get(['id', 'config_key', 'config_value']);
|
||
|
|
}
|
||
|
|
}
|