|
@@ -109,6 +109,8 @@ class GoodsController extends BaseController
|
|
|
$cId = isset($get['cId']) && !empty($get['cId']) ? $get['cId'] : 0;
|
|
$cId = isset($get['cId']) && !empty($get['cId']) ? $get['cId'] : 0;
|
|
|
$name = isset($get['name']) && !empty($get['name']) ? $get['name'] : '';
|
|
$name = isset($get['name']) && !empty($get['name']) ? $get['name'] : '';
|
|
|
$flowerNum = isset($get['flowerNum']) && $get['flowerNum'] > 0 ? $get['flowerNum'] : 0;
|
|
$flowerNum = isset($get['flowerNum']) && $get['flowerNum'] > 0 ? $get['flowerNum'] : 0;
|
|
|
|
|
+ $flower = isset($get['flower']) ? $get['flower'] : '';
|
|
|
|
|
+ $hasStock = isset($get['hasStock']) ? $get['hasStock'] : 0;
|
|
|
$where = [];
|
|
$where = [];
|
|
|
if ($status != -1) {
|
|
if ($status != -1) {
|
|
|
$where['status'] = $status;
|
|
$where['status'] = $status;
|
|
@@ -124,11 +126,16 @@ class GoodsController extends BaseController
|
|
|
if ($flowerNum > 0) {
|
|
if ($flowerNum > 0) {
|
|
|
$where['flowerNum'] = $flowerNum;
|
|
$where['flowerNum'] = $flowerNum;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (is_numeric($flower)) {
|
|
|
|
|
+ $where['flower'] = $flower;
|
|
|
|
|
+ }
|
|
|
|
|
+ if ($hasStock == 1) {
|
|
|
|
|
+ $where['stock>'] = 0;
|
|
|
|
|
+ }
|
|
|
$data = GoodsService::getGoodsList($where);
|
|
$data = GoodsService::getGoodsList($where);
|
|
|
util::success($data);
|
|
util::success($data);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
//获取商品详情 ssh 2019.12.7
|
|
//获取商品详情 ssh 2019.12.7
|
|
|
public function actionDetail()
|
|
public function actionDetail()
|
|
|
{
|
|
{
|