diff --git a/webapp/controller/MallController.class.php b/webapp/controller/MallController.class.php index 2ac59a9e..d69bca5d 100644 --- a/webapp/controller/MallController.class.php +++ b/webapp/controller/MallController.class.php @@ -232,15 +232,15 @@ class MallController extends BaseAuthedController { $goodsUuid = getReqVal('goods_uuid', ''); $price = getReqVal('price', ''); if (empty($price)) { - $this->_rspErr(1, 'price not found'); + myself()->_rspErr(1, 'price not found'); return; } if ($price <= 0) { - $this->_rspErr(1, 'price must > 0'); + myself()->_rspErr(1, 'price must > 0'); return; } if (!is_numeric($price)) { - $this->_rspErr(1, 'price must be number'); + myself()->_rspErr(1, 'price must be number'); return; } $goodsDb = Mall::findByGoodsUuid($goodsUuid); @@ -254,7 +254,7 @@ class MallController extends BaseAuthedController { return; } Mall::modifyPrice($goodsDto['goods_uuid'], $price); - $this->_rspOk(); + myself()->_rspOk(); } } diff --git a/webapp/controller/MarketController.class.php b/webapp/controller/MarketController.class.php index a5b689fa..58aa3753 100644 --- a/webapp/controller/MarketController.class.php +++ b/webapp/controller/MarketController.class.php @@ -36,6 +36,38 @@ class MarketController extends BaseAuthedController { if (!empty($seller)) { $queryData['seller'] = $seller; } + $orderBy = ''; + $orderAsc = 'ASC'; + if (getReqVal('order_asc', '') == 1) { + $orderAsc = 'DESC'; + } + switch (getReqVal('order_method', '')) { + case 1: + { + $orderBy = 'ORDER BY createtime ' . $orderAsc; + } + break; + case 2: + { + $orderBy = 'ORDER BY price ' . $orderAsc; + } + break; + case 3: + { + $orderBy = 'ORDER BY c_quality ' . $orderAsc; + } + break; + case 4: + { + $orderBy = 'ORDER BY c_lv ' . $orderAsc; + } + break; + case 5: + { + $orderBy = 'ORDER BY c_durability ' . $orderAsc; + } + break; + } $out = array( 'pagination' => array()