public static function spuList($where = [])
{
$data = Db::table('good_spu')
->alias('gs')
->leftJoin('good_category gc', 'gs.category_id = gc.id')
->leftJoin('good_brand gb', 'gs.brand_id = gb.id')
->where($where)
->field('gs.*,gc.name category_name,gb.name brand_name')
->select();
return $data;
} 最佳答案