修改排序
This commit is contained in:
parent
3a5edfe0f8
commit
4011075698
@ -973,16 +973,20 @@ class IndexLogic extends Logic
|
||||
|
||||
private static function getIndexHotList()
|
||||
{
|
||||
$hot_list = $order_goods = [];
|
||||
|
||||
$hot_list = Db::name('hot_list')
|
||||
->alias('hl')
|
||||
->join('goods g', 'hl.goods_id = g.id')
|
||||
->where('delete_time', 0)
|
||||
->field('hl.*, g.id as gid, g.name, g.image, g.issuing_price, g.market_price, g.min_price, g.purchase_price, g.wholesale_price')
|
||||
->order('sort desc')
|
||||
->limit(6)
|
||||
->select()
|
||||
->toArray();
|
||||
|
||||
$count = count($hot_list);
|
||||
|
||||
if ($count < 6) {
|
||||
$where[] = ['og.create_time', '>=', strtotime("today")];
|
||||
$where[] = ['og.create_time', '<=', strtotime("tomorrow") - 1];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user