feat: spu

This commit is contained in:
2025-01-21 10:28:40 +08:00
parent 8e454659e1
commit df78fc705d
5 changed files with 63 additions and 1 deletions

View File

@@ -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