This commit is contained in:
songliang 2023-07-13 17:38:28 +08:00
parent 41b027c384
commit d74f2a645b

View File

@ -197,15 +197,18 @@ class ShopController extends BaseAuthedController
if ($goods_num <= 0) {
$this->_rspErr(1, 'goods_num is invalid');
return;
}
$goods = mt\ShopGoods::get($id);
if (!$goods) {
$this->_rspErr(1, "id is invalid. {$id}");
return;
}
if ($goods['shop_id'] == 9 && $goods_num > 1) {
$this->_rspErr(1, 'goods_num is invalid');
return;
}
$conn = myself()->_getSelfMysql();
@ -213,6 +216,7 @@ class ShopController extends BaseAuthedController
$address = myself()->_getAddress();
if (!$address) {
$this->_rspErr(1, 'address is empty');
return;
}
$goods_str = json_encode($goods);