1
This commit is contained in:
parent
8e405a57eb
commit
bb7f2822a2
@ -163,7 +163,7 @@ class MarketController extends BaseController {
|
||||
myself()->_rspErr(500, 'server internal error');
|
||||
return;
|
||||
}
|
||||
if (!mt\MarketGoods::isOnSaleItem($batchId, $idx, $itemId)) {
|
||||
if (!mt\MarketGoods::isOnSaleItem($currBatchMeta['batch_id'], $idx, $itemId)) {
|
||||
myself()->_rspErr(500, 'server internal error');
|
||||
return;
|
||||
}
|
||||
|
@ -14,6 +14,12 @@ class WhiteList {
|
||||
return getXVal(self::getMetaList(), $id);
|
||||
}
|
||||
|
||||
public static function inWhiteList($account)
|
||||
{
|
||||
self::mustBeAccountHash();
|
||||
return getXVal(self::$accountHash, $account, null) != null;
|
||||
}
|
||||
|
||||
protected static function getMetaList()
|
||||
{
|
||||
if (!self::$metaList) {
|
||||
@ -22,6 +28,17 @@ class WhiteList {
|
||||
return self::$metaList;
|
||||
}
|
||||
|
||||
protected static function mustBeAccountHash()
|
||||
{
|
||||
if (!self::$accountHash) {
|
||||
self::$accountHash = array();
|
||||
foreach (self::getMetaList() as $meta) {
|
||||
self::$accountHash[$meta['white_list']] = $meta;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected static $metaList;
|
||||
protected static $accountHash;
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user