|
@@ -85,6 +85,7 @@ class StoreProduct extends BaseModel
|
|
|
public static function getProductList($data, $uid)
|
|
public static function getProductList($data, $uid)
|
|
|
{
|
|
{
|
|
|
$sId = $data['sid'];
|
|
$sId = $data['sid'];
|
|
|
|
|
+ $store_id = $data['store_id'] ?? 0;
|
|
|
$cId = $data['cid'];
|
|
$cId = $data['cid'];
|
|
|
$keyword = $data['keyword'];
|
|
$keyword = $data['keyword'];
|
|
|
$priceOrder = $data['priceOrder'];
|
|
$priceOrder = $data['priceOrder'];
|
|
@@ -96,6 +97,7 @@ class StoreProduct extends BaseModel
|
|
|
$model = self::validWhere();
|
|
$model = self::validWhere();
|
|
|
$model->where('max_use_integral', 0)->where('is_suit', 0);
|
|
$model->where('max_use_integral', 0)->where('is_suit', 0);
|
|
|
if ($data['is_consumer'] > 0) $model = $model->where('is_consumer', $data['is_consumer']);
|
|
if ($data['is_consumer'] > 0) $model = $model->where('is_consumer', $data['is_consumer']);
|
|
|
|
|
+ if ($store_id > 0) $model = $model->where('store_id', $store_id);
|
|
|
if ($sId) {
|
|
if ($sId) {
|
|
|
$model->whereIn('id', function ($query) use ($sId) {
|
|
$model->whereIn('id', function ($query) use ($sId) {
|
|
|
$query->name('store_product_cate')->where('cate_id', $sId)->field('product_id')->select();
|
|
$query->name('store_product_cate')->where('cate_id', $sId)->field('product_id')->select();
|