diff --git a/third_party/j7 b/third_party/j7 index 7533a5e7..f98d9e8d 160000 --- a/third_party/j7 +++ b/third_party/j7 @@ -1 +1 @@ -Subproject commit 7533a5e7ed287378d33cb1bc3244487d33de7951 +Subproject commit f98d9e8dfb0575f3c42795163bfbaa5c807a5935 diff --git a/third_party/phpcommon b/third_party/phpcommon index 848e05c0..571b6c46 160000 --- a/third_party/phpcommon +++ b/third_party/phpcommon @@ -1 +1 @@ -Subproject commit 848e05c01f44622e52996bb04dfb6b344acce1b8 +Subproject commit 571b6c46137597d3bede13989e284130a070bea0 diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index d13cbe97..af84d3af 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -67,13 +67,7 @@ class ShopController extends BaseAuthedController { $token_type = getReqVal('token_type', ''); $goods_num = getReqVal('goods_num', 0); - $row = SqlHelper::ormSelectOne( - $this->_getSelfMysql(), - 't_shop_goods', - array( - 'id' => $id, - ) - ); + $row = mt\ShopGoods::get($id); $desired_token_type = $row['token_type']; $check_token_type = splitStr1($desired_token_type); @@ -151,6 +145,7 @@ class ShopController extends BaseAuthedController { switch($token_type) { case ShopController::TOKEN_TYPE_CEG: + case ShopController::TOKEN_TYPE_CEC: $costItems = $this->makeCostItems($costItemId, $goods_num*$need_price); $lackItem = null; if (!$this->_hasEnoughItems($costItems, $lackItem)) { @@ -193,11 +188,6 @@ class ShopController extends BaseAuthedController { )); break; - case ShopController::TOKEN_TYPE_CEC: - echo "token type: {$token_type} {$need_price} {$discount}"; - - break; - case ShopController::TOKEN_TYPE_BCEG: break;