修复浏览记录

wysf
ztt 9 months ago
parent 2d1744746b
commit f587bbb766
  1. 2
      app/api/model/Goods.php

@ -155,7 +155,7 @@ class Goods extends GoodsModel
$userId = UserService::getCurrentLoginUserId(); $userId = UserService::getCurrentLoginUserId();
$model = new GoodsBrowseLog; $model = new GoodsBrowseLog;
$end_time = date('Y-m-d'); $end_time = date('Y-m-d');
$start_time = date('Y-m-d', strtotime($end_time . ' - 2 days')); $start_time = date('Y-m-d', strtotime($end_time . ' - 15 days'));
$list = $model->with(['sku', 'goods', 'images.file']) $list = $model->with(['sku', 'goods', 'images.file'])
->where('ctime', '>=', $start_time) ->where('ctime', '>=', $start_time)
->where('ctime', '<=', $end_time) ->where('ctime', '<=', $end_time)

Loading…
Cancel
Save