1
This commit is contained in:
parent
3585791680
commit
dd75807752
@ -2,31 +2,16 @@
|
|||||||
|
|
||||||
namespace services;
|
namespace services;
|
||||||
|
|
||||||
require_once('mt/ShopGoods.php');
|
require_once('mt/HashRateShop.php');
|
||||||
require_once('mt/Item.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 mt;
|
||||||
use phpcommon;
|
use phpcommon;
|
||||||
use models\ShopBuyRecord;
|
|
||||||
use models\Hero;
|
|
||||||
use models\HeroSkin;
|
|
||||||
use models\GunSkin;
|
|
||||||
|
|
||||||
class HashRateShopService {
|
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();
|
$goodsMetaList = $goodsMetaList ? $goodsMetaList : array();
|
||||||
$buyRecordHash = ShopBuyRecord::allToHash();
|
$buyRecordHash = ShopBuyRecord::allToHash();
|
||||||
@ -132,26 +117,4 @@ class HashRateShopService {
|
|||||||
return true;
|
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'],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user