admin/addon/replacebuy/model/GoodsSku.php

45 lines
1.5 KiB
PHP
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +---------------------------------------------------------------------+
// | NiuCloud | [ WE CAN DO IT JUST NiuCloud ]  |
// +---------------------------------------------------------------------+
// | Copy right 2019-2029 www.niucloud.com  |
// +---------------------------------------------------------------------+
// | Author | NiuCloud <niucloud@outlook.com>  |
// +---------------------------------------------------------------------+
// | Repository | https://github.com/niucloud/framework.git  |
// +---------------------------------------------------------------------+
namespace addon\replacebuy\model;
use app\model\BaseModel;
class GoodsSku extends BaseModel
{
/**
* 获取商品分页列表
* @param array $condition
* @param number $page
* @param string $page_size
* @param string $order
* @param string $field
*/
public function getGoodsSkuPageList($condition = [], $page = 1, $page_size = PAGE_LIST_ROWS, $order = 'gs.create_time desc', $field = '*')
{
$alias = 'gs';
$join = [
[
'goods g',
'g.goods_id = gs.goods_id',
'inner'
]
];
$field = 'gs.*';
$list = model('goods_sku')->pageList($condition, $field, $order, $page, $page_size, $alias, $join);
return $this->success($list);
}
}