diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index 3c6e10bc..11e0ae31 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -44,7 +44,7 @@ class ShopController extends BaseAuthedController const TOKEN_TYPE_BNB = '102'; const TOKEN_TYPE_DSD = '99'; - + // 限购类型 const DAILY_BUY_LIMIT = 1; const WEEKLY_BUY_LIMIT = 2; @@ -277,11 +277,22 @@ class ShopController extends BaseAuthedController // } // 我返回给你这些数据和一个sign字段, // sign使用上面 repdata 按key 顺序排后, 组成key1=val1&key2=val2后, 使用hmac_sha256 hash, key是 iG4Rpsa)6U31$H#^T85$^^3 - error_log("buyGoodsDirect"); - $id = getReqVal('id', 0); + + $token_type = getReqVal('token_type', ''); $goods_num = getReqVal('goods_num', 0); + $order_id = 28; + error_log("buyGoodsDirect"); + + $conn = myself()->_getMysql(''); + + $order = SqlHelper::selectOne($conn, 't_shop_buy_order', array('account_id', 'item_id', 'goods_num', 'status'), array('idx' => $order_id)); + + $id = $order['item_id']; + $goods_num = $order['goods_num']; + $status = $order['status']; + $row = mt\ShopGoods::get($id); $desired_token_type = $row['token_type'];