Merge pull request 'preview' (#62) from preview into master
Reviewed-on: #62
This commit is contained in:
commit
cd3f437c1f
@ -34,7 +34,7 @@ use think\facade\Queue;
|
||||
class SpuRepository extends BaseRepository
|
||||
{
|
||||
public $dao;
|
||||
public $merchantFiled = 'mer_id,mer_name,mer_avatar,is_trader,mer_info,mer_keyword,type_id';
|
||||
public $merchantFiled = 'mer_id,mer_name,mer_avatar,is_trader,mer_info,mer_keyword,type_id,long,lat';
|
||||
public $productFiled = 'P.bar_code,S.product_id,S.store_name,S.image,activity_id,S.keyword,S.price,S.mer_id,spu_id,S.status,store_info,brand_id,cate_id,unit_name,S.star,S.rank,S.sort,sales,S.product_type,rate,reply_count,extension_type,S.sys_labels,S.mer_labels,P.delivery_way,P.delivery_free,P.ot_price,svip_price_type,stock,mer_svip_status';
|
||||
|
||||
public $userInfo;
|
||||
|
@ -308,7 +308,6 @@ class MerchantRepository extends BaseRepository
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
if ($where['keyword'] !== '') {
|
||||
app()->make(UserVisitRepository::class)->searchMerchant($userInfo ? $userInfo['uid'] : 0, $where['keyword']);
|
||||
}
|
||||
|
@ -114,7 +114,8 @@ class CloudWarehouse extends BaseController
|
||||
$count = Db::name('cloud_product')->where('street_code', $street_code)->where('status', 1)->count();
|
||||
$select = Db::name('store_product')->whereIn('product_id', $cloud_product)->where($where)
|
||||
->withAttr('merchant', function ($value, $data) {
|
||||
return Db::name('merchant')->where('mer_id', $data['mer_id'])->field('mer_id,mer_name')->find();
|
||||
$find= Db::name('merchant')->where('mer_id', $data['mer_id'])->field('mer_id,mer_name')->find();
|
||||
return $find;
|
||||
})
|
||||
->withAttr('sku', function ($value, $data) {
|
||||
$find = Db::name('store_product_attr_value')->where('mer_id', $data['mer_id'])->where('product_id', $data['product_id'])->find();
|
||||
@ -126,7 +127,7 @@ class CloudWarehouse extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定类型的云仓商品列表
|
||||
* 镇级供应链列表
|
||||
* @return mixed
|
||||
*/
|
||||
public function town()
|
||||
@ -158,7 +159,7 @@ class CloudWarehouse extends BaseController
|
||||
$where['product_type'] = $params['product_type'];
|
||||
$where['is_gift_bag'] = 0;
|
||||
$where['order'] = $params['order'] ?: 'sort';
|
||||
$products = $this->spuRepository->getApiCloudSearch($where, $page, $limit, false);
|
||||
$products = $this->spuRepository->getApiSearch($where, $page, $limit, false);
|
||||
return app('json')->success($products);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user