|
|
@@ -60,8 +60,16 @@ class ProductController extends BaseController
|
|
|
}
|
|
|
$where['delStatus'] = 0;
|
|
|
|
|
|
+ //客户等级
|
|
|
+ $customId = Yii::$app->request->get('customId', 0);
|
|
|
+ $level = 0;
|
|
|
+ if (!empty($customId)) {
|
|
|
+ $custom = CustomClass::getById($customId, true);
|
|
|
+ $level = $custom->level ?? 0;
|
|
|
+ }
|
|
|
+
|
|
|
$itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], "*");
|
|
|
- $itemInfoData = ProductClass::groupProductInfo($itemInfoData);
|
|
|
+ $itemInfoData = ProductClass::groupProductInfo($itemInfoData, $level);
|
|
|
|
|
|
$data = ProductService::assembleData($classIds, $itemInfoData, true);
|
|
|
|