|
|
@@ -29,8 +29,22 @@ class ItemController extends BaseController
|
|
|
$classId = Yii::$app->request->get('classId', 0);
|
|
|
$where['mainId'] = $this->mainId;
|
|
|
$where['delStatus'] = $delStatus;
|
|
|
+ if (!empty($status)) {
|
|
|
+ $where['status'] = $status;
|
|
|
+ }
|
|
|
+ if ($requestType == 'book') {
|
|
|
+ unset($where['status']);
|
|
|
+ }
|
|
|
if (!empty($classId)) {
|
|
|
- $where['classId'] = $classId;
|
|
|
+ if ($classId == -1) {
|
|
|
+ $where['discountPrice'] = 1;
|
|
|
+ } elseif ($classId == -2) {
|
|
|
+ $where['reachNum>'] = 0;
|
|
|
+ } elseif ($classId == -3) {
|
|
|
+ $where['presell'] = 1;
|
|
|
+ } else {
|
|
|
+ $where['classId'] = $classId;
|
|
|
+ }
|
|
|
}
|
|
|
if ($py) {
|
|
|
$pyName = strtolower($py);
|
|
|
@@ -40,13 +54,6 @@ class ItemController extends BaseController
|
|
|
if ($requestType == 'changePrice' || $requestType == 'hasStockList') {
|
|
|
$where['stock>'] = 0;
|
|
|
}
|
|
|
- if (!empty($status)) {
|
|
|
- $where['status'] = $status;
|
|
|
- }
|
|
|
- if ($requestType == 'book') {
|
|
|
- unset($where['status']);
|
|
|
- }
|
|
|
- //客户等级
|
|
|
$customId = Yii::$app->request->get('customId', 0);
|
|
|
$level = 1;
|
|
|
if (!empty($customId)) {
|