1
This commit is contained in:
parent
d2069c3e76
commit
e6a6b90fa5
@ -84,14 +84,18 @@ class ShopController extends BaseAuthedController {
|
|||||||
$this->_rspErr(1, 'goods not found, goods_id: ' . $goodsMeta['goods_id']);
|
$this->_rspErr(1, 'goods not found, goods_id: ' . $goodsMeta['goods_id']);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$errCode = 0;
|
||||||
|
$errMsg = '';
|
||||||
if ($itemMeta['type'] == mt\Item::HERO_SKIN_TYPE) {
|
if ($itemMeta['type'] == mt\Item::HERO_SKIN_TYPE) {
|
||||||
$errCode = 0;
|
|
||||||
$errMsg = '';
|
|
||||||
if (!$this->canBuy($itemMeta, $errCode, $errMsg)) {
|
if (!$this->canBuy($itemMeta, $errCode, $errMsg)) {
|
||||||
$this->_rspErr($errCode, $errMsg);
|
$this->_rspErr($errCode, $errMsg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!ShopService::buyLimitCheck($goodsMeta, $errCode, $errMsg)) {
|
||||||
|
$this->_rspErr($errCode, $errMsg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$goodsId = $goodsMeta['goods_id'];
|
$goodsId = $goodsMeta['goods_id'];
|
||||||
|
|
||||||
|
@ -102,8 +102,10 @@ class ShopService {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function buyLimitCheck($goodsMeta)
|
public static function buyLimitCheck($goodsMeta, &$errCode, &$errMsg)
|
||||||
{
|
{
|
||||||
|
$errCode = 0;
|
||||||
|
$errMsg = '';
|
||||||
$buyRecordHash = ShopBuyRecord::allToHash();
|
$buyRecordHash = ShopBuyRecord::allToHash();
|
||||||
$boughtTimes = 1;
|
$boughtTimes = 1;
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user