diff --git a/webapp/services/HashRateShopService.php b/webapp/services/HashRateShopService.php index 5dbf6a14..4ed45796 100644 --- a/webapp/services/HashRateShopService.php +++ b/webapp/services/HashRateShopService.php @@ -2,31 +2,16 @@ namespace services; -require_once('mt/ShopGoods.php'); +require_once('mt/HashRateShop.php'); require_once('mt/Item.php'); -require_once('mt/Shop.php'); - -require_once('models/ShopBuyRecord.php'); -require_once('models/Hero.php'); -require_once('models/HeroSkin.php'); -require_once('models/GunSkin.php'); use mt; use phpcommon; -use models\ShopBuyRecord; -use models\Hero; -use models\HeroSkin; -use models\GunSkin; class HashRateShopService { - public static function getGoodsList($shopId) + public static function getGoodsList() { - if ($shopId == 0) { - $goodsMetaList = mt\ShopGoods::all(); - } else { - $goodsMetaList = mt\ShopGoods::getGoodsList($shopId); - } $goodsMetaList = $goodsMetaList ? $goodsMetaList : array(); $buyRecordHash = ShopBuyRecord::allToHash(); @@ -132,26 +117,4 @@ class HashRateShopService { return true; } - public static function goodsMetaToInfo($goodsMeta) - { - return array( - 'item_id' => $goodsMeta['item_id'], - 'item_num' => $goodsMeta['item_num'], - 'max_amount' => $goodsMeta['max_amount'], - 'shop_id' => $goodsMeta['shop_id'], - 'shopstage' => $goodsMeta['shopstage'], - 'tag' => $goodsMeta['tag'], - 'recommend' => $goodsMeta['recommend'], - 'token_type' => $goodsMeta['token_type'], - 'price' => $goodsMeta['price'], - 'free_type' => $goodsMeta['free_type'], - 'shop_icon' => $goodsMeta['shop_icon'], - 'gg_product_id' => $goodsMeta['gg_product_id'], - 'ios_product_id' => $goodsMeta['ios_product_id'], - 'bonus' => $goodsMeta['bonus'], - 'bonus_num' => $goodsMeta['bonus_num'], - 'function' => $goodsMeta['function'], - ); - } - }