This commit is contained in:
hujiabin 2024-05-21 17:28:07 +08:00
parent 56c32f7a69
commit 1b8db59b6b
3 changed files with 23 additions and 18 deletions

View File

@ -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;

View File

@ -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(),

View File

@ -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(),