更新修复可转售商品列表接口

This commit is contained in:
yaooo 2023-08-14 09:42:19 +08:00
parent 994a186d32
commit a7d540841c
2 changed files with 2 additions and 1 deletions

View File

@ -99,7 +99,6 @@ class CommunityRepository extends BaseRepository
$config = systemConfig("community_app_switch"); $config = systemConfig("community_app_switch");
if (!isset($where['is_type']) && $config) $where['is_type'] = is_array($config) ? implode(',', $config) : $config; if (!isset($where['is_type']) && $config) $where['is_type'] = is_array($config) ? implode(',', $config) : $config;
$where['is_del'] = 0; $where['is_del'] = 0;
// print_r($where);
$query = $this->dao->search($where)->when(in_array(self::COMMUNITY_TYPE_RESALE, explode(',', $where['is_type'])), function ($query) { $query = $this->dao->search($where)->when(in_array(self::COMMUNITY_TYPE_RESALE, explode(',', $where['is_type'])), function ($query) {
$query->where('is_sale', 0); $query->where('is_sale', 0);
})->order('start DESC,Community.create_time DESC,community_id DESC'); })->order('start DESC,Community.create_time DESC,community_id DESC');

View File

@ -2445,6 +2445,8 @@ class ProductRepository extends BaseRepository
{ {
$merId = Db::name('store_service')->where('uid', $where['uid'])->where('status', 1)->value('mer_id', 0); $merId = Db::name('store_service')->where('uid', $where['uid'])->where('status', 1)->value('mer_id', 0);
unset($where['uid']); unset($where['uid']);
$where['status'] = 1;
$where['is_show'] = 1;
$query = $this->dao->search($merId, $where)->with(['merCateId.category', 'storeCategory', 'brand', 'attrValue']); $query = $this->dao->search($merId, $where)->with(['merCateId.category', 'storeCategory', 'brand', 'attrValue']);
$count = $query->count(); $count = $query->count();
$data = $query->page($page, $limit)->setOption('field', [])->field($this->filed)->select(); $data = $query->page($page, $limit)->setOption('field', [])->field($this->filed)->select();