This commit is contained in:
aozhiwei 2020-07-10 19:09:09 +08:00
parent 9312c611ba
commit 47e5480e61
2 changed files with 20 additions and 3 deletions

View File

@ -118,7 +118,8 @@ CREATE TABLE `bag` (
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', `modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`), PRIMARY KEY (`idx`),
UNIQUE KEY `item_uuid` (`accountid`, `id`) UNIQUE KEY `item_uuid` (`accountid`, `id`),
KEY `accountid` (`accountid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --

View File

@ -28,7 +28,6 @@ class ShopController{
)); ));
return $conn; return $conn;
} }
protected function getItem($item_id) protected function getItem($item_id)
{ {
$g_conf_item_cluster = require('../res/item@item.php'); $g_conf_item_cluster = require('../res/item@item.php');
@ -47,6 +46,23 @@ class ShopController{
return $it; return $it;
} }
protected function getItemEx(&$g_conf_item_cluster, $item_id)
{
$item_conf = getItemConfig($g_conf_item_cluster, $item_id);
$it = array(
'id' => $item_conf['id'],
'price' => $item_conf['gold'],
'dprice' => $item_conf['diamond_price'],
'discount' => $item_conf['discount'],
'shop_type' => $item_conf['shop_type'],
'type' => $item_conf['fuction'],
'bug_groupnum' => $item_conf['bug_groupnum'],
'shop_list' => $item_conf['shop_list'],
'bug_groupnum' => $item_conf['bug_groupnum'],
);
return $it;
}
protected function getShop($shop_id) protected function getShop($shop_id)
{ {
$g_conf_shop_cluster = require('../res/shop@shop.php'); $g_conf_shop_cluster = require('../res/shop@shop.php');
@ -161,7 +177,7 @@ class ShopController{
$diamond_shop = array(); $diamond_shop = array();
$num = 1; $num = 1;
foreach($g_conf_item_cluster as $items) { foreach($g_conf_item_cluster as $items) {
$it = $this->getItem($items['id']); $it = $this->getItemEx($g_conf_item_cluster, $items['id']);
$status = 0; $status = 0;
foreach($rows as $r) { foreach($rows as $r) {
if ($r['id'] != $it['id']) { if ($r['id'] != $it['id']) {