feat: spu
This commit is contained in:
@@ -7,6 +7,7 @@ namespace App\Model;
|
||||
use App\Constants\Common\CityCode;
|
||||
use Hyperf\Database\Model\Builder;
|
||||
use Hyperf\DbConnection\Model\Model;
|
||||
use Hyperf\Tappable\HigherOrderTapProxy;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
@@ -68,6 +69,15 @@ class SystemCity extends Model
|
||||
return $this->whereIn('id',$ids)->pluck('title','id')->toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @return HigherOrderTapProxy|mixed|null
|
||||
*/
|
||||
public function getCityNameById(int $id)
|
||||
{
|
||||
return $this->where('id',$id)->where('is_del',CityCode::IS_NOT_DELETE)->value('title');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有数据
|
||||
* @param array $ids
|
||||
|
||||
Reference in New Issue
Block a user