update shop buygoodsnew

This commit is contained in:
aozhiwei 2022-11-02 12:55:18 +08:00
parent 3025f0d659
commit 023cb76902
3 changed files with 4 additions and 14 deletions

2
third_party/j7 vendored

@ -1 +1 @@
Subproject commit 7533a5e7ed287378d33cb1bc3244487d33de7951
Subproject commit f98d9e8dfb0575f3c42795163bfbaa5c807a5935

@ -1 +1 @@
Subproject commit 848e05c01f44622e52996bb04dfb6b344acce1b8
Subproject commit 571b6c46137597d3bede13989e284130a070bea0

View File

@ -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;