From 1b8db59b6ba595e628265ab73a4e216bd3c229a7 Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Tue, 21 May 2024 17:28:07 +0800 Subject: [PATCH] 1 --- sql/gamedb2006_migrate_240521_01.sql | 12 ++------- .../controller/InGameMallController.class.php | 26 ++++++++++++++----- webapp/models/InGameMall.php | 3 ++- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/sql/gamedb2006_migrate_240521_01.sql b/sql/gamedb2006_migrate_240521_01.sql index 8b7362d7..f245e668 100644 --- a/sql/gamedb2006_migrate_240521_01.sql +++ b/sql/gamedb2006_migrate_240521_01.sql @@ -1,16 +1,8 @@ begin; -CREATE TABLE `t_sub_user_bind` ( - `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', - `org_account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '初始账号id', - `cur_account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '最新账号id', - `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', - `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', - PRIMARY KEY (`idx`), - UNIQUE KEY `org_account_id` (`org_account_id`) -) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +alter table t_ingame_mall add column `order1` int(11) NOT NULL DEFAULT '0' COMMENT '品质排序 '; -insert into version (version) values(2024050801); +insert into version (version) values(2024052101); commit; diff --git a/webapp/controller/InGameMallController.class.php b/webapp/controller/InGameMallController.class.php index 2d3b6fd3..b2cd0d3b 100644 --- a/webapp/controller/InGameMallController.class.php +++ b/webapp/controller/InGameMallController.class.php @@ -59,6 +59,10 @@ class InGameMallController extends BaseAuthedController { if (!empty($item_filter)) { $queryData['item_filter'] = $item_filter; } + $quality_filter = getReqVal('quality_filter', ''); + if (!empty($quality_filter)) { + $queryData['quality_filter'] = $quality_filter; + } $queryData['price_filter'] = getReqVal('price_filter', ''); $orderBy = ''; $orderAsc = 'ASC'; @@ -120,12 +124,12 @@ class InGameMallController extends BaseAuthedController { 'cond' => '=', 'ignore_empty' => true, ), -// array( -// 'name' => 'type_filter', -// 'field_name' => 'order_type', -// 'cond' => '=', -// 'ignore_empty' => true, -// ), + array( + 'name' => 'quality_filter', + 'field_name' => 'order1', + 'cond' => '=', + 'ignore_empty' => true, + ), array( 'name' => 'type_filter', 'field_name' => '', @@ -172,6 +176,7 @@ class InGameMallController extends BaseAuthedController { $amount = intval(getReqVal('amount', ''), 10); $priceBn = intval(getReqVal('price', '')); $itemMeta = \mt\Item::get($itemId); + $orderField = 0; if (!$itemMeta){ $this->_rspErr(1, 'param item_id error'); return; @@ -191,6 +196,7 @@ class InGameMallController extends BaseAuthedController { $this->_rspErr(1, 'Shelf heroes need to be packaged first'); return; } + $orderField = $heroDb['quality']; } break; case \mt\Item::CHIP_TYPE : { @@ -199,6 +205,7 @@ class InGameMallController extends BaseAuthedController { $this->_rspErr(1, 'param goods_unnid error'); return; } + $orderField = $chipDb['quality']; } break; case \mt\Item::GOLD_SYN :{ @@ -212,6 +219,10 @@ class InGameMallController extends BaseAuthedController { return; } } + break; + case \mt\Item::FRAGMENT_TYPE :{ + $orderField = $itemMeta['quality']; + } } if ($amount <= 0) { $this->_rspErr(1, 'amount must > 0'); @@ -282,7 +293,8 @@ class InGameMallController extends BaseAuthedController { $goodsUniid, $itemId, $amount, - $priceBn + $priceBn, + $orderField ); myself()->_rspData(array( 'property_chg' => $propertyChgService->toDto(), diff --git a/webapp/models/InGameMall.php b/webapp/models/InGameMall.php index 9ffb8ec9..7c8384ae 100644 --- a/webapp/models/InGameMall.php +++ b/webapp/models/InGameMall.php @@ -31,7 +31,7 @@ class InGameMall extends BaseModel { return $row; } - public static function add($orderId, $orderType, $goodsUniid,$itemId, $itemNum, $price) + public static function add($orderId, $orderType, $goodsUniid,$itemId, $itemNum, $price, $orderField) { SqlHelper::insert (myself()->_getMysql(''), @@ -45,6 +45,7 @@ class InGameMall extends BaseModel { 'item_id' => $itemId, 'item_num' => $itemNum, 'price' => $price, + 'order1' => $orderField, 'last_modify_price_time' => myself()->_getNowTime(), 'createtime' => myself()->_getNowTime(), 'modifytime' => myself()->_getNowTime(),