移除商品兑换需要流水

This commit is contained in:
2026-07-27 16:52:07 +08:00
parent 278532cdad
commit 3fc91cd2d3
16 changed files with 2 additions and 78 deletions

View File

@@ -36,7 +36,6 @@ class Order extends Backend
'mall_item_id',
'points_cost',
'amount',
'multiplier',
'external_transaction_id',
'grant_status',
'fail_reason',

View File

@@ -1004,7 +1004,6 @@ SELECT
t.item_type,
t.item_score,
t.item_amount,
t.item_multiplier,
t.item_category,
t.item_category_title,
t.sort_key
@@ -1022,7 +1021,6 @@ FROM (
0 AS item_type,
0 AS item_score,
0 AS item_amount,
0 AS item_multiplier,
'' AS item_category,
'' AS item_category_title,
CONCAT(LPAD(cl.create_time, 10, '0'), '_1_', LPAD(cl.id, 10, '0')) AS sort_key
@@ -1044,7 +1042,6 @@ FROM (
COALESCE(i.type, 0) AS item_type,
COALESCE(i.score, 0) AS item_score,
COALESCE(i.amount, 0) AS item_amount,
COALESCE(i.multiplier, 0) AS item_multiplier,
COALESCE(i.category, '') AS item_category,
COALESCE(i.category_title, '') AS item_category_title,
CONCAT(LPAD(o.create_time, 10, '0'), '_2_', LPAD(o.id, 10, '0')) AS sort_key
@@ -1067,7 +1064,6 @@ FROM (
COALESCE(i.type, 0) AS item_type,
COALESCE(i.score, 0) AS item_score,
COALESCE(i.amount, 0) AS item_amount,
COALESCE(i.multiplier, 0) AS item_multiplier,
COALESCE(i.category, '') AS item_category,
COALESCE(i.category_title, '') AS item_category_title,
CONCAT(LPAD(o.update_time, 10, '0'), '_3_', LPAD(o.id, 10, '0')) AS sort_key
@@ -1090,7 +1086,6 @@ FROM (
0 AS item_type,
0 AS item_score,
0 AS item_amount,
0 AS item_multiplier,
'' AS item_category,
'' AS item_category_title,
CONCAT(LPAD(pl.create_time, 10, '0'), '_4_', LPAD(pl.id, 10, '0')) AS sort_key
@@ -1158,7 +1153,6 @@ SQL;
'type' => $row['item_type'] ?? 0,
'score' => $row['item_score'] ?? 0,
'amount' => $row['item_amount'] ?? 0,
'multiplier' => $row['item_multiplier'] ?? 0,
'category' => $row['item_category'] ?? '',
'category_title' => $row['item_category_title'] ?? '',
] : null,
@@ -1420,10 +1414,6 @@ SQL;
}
$playxUserId = strval($asset->playx_user_id);
$multiplier = intval($item->multiplier ?? 0);
if ($multiplier <= 0) {
$multiplier = 1;
}
$amount = floatval($item->amount ?? 0);
Db::startTrans();
@@ -1439,7 +1429,6 @@ SQL;
'mall_item_id' => $item->id,
'points_cost' => $item->score,
'amount' => $amount,
'multiplier' => $multiplier,
'external_transaction_id' => $orderNo,
'grant_status' => MallOrder::GRANT_NOT_SENT,
'create_time' => time(),
@@ -1566,10 +1555,6 @@ SQL;
}
$playxUserId = strval($asset->playx_user_id);
$multiplier = intval($item->multiplier ?? 0);
if ($multiplier <= 0) {
$multiplier = 1;
}
$amount = floatval($item->amount ?? 0);
Db::startTrans();
@@ -1585,7 +1570,6 @@ SQL;
'mall_item_id' => $item->id,
'points_cost' => $item->score,
'amount' => $amount,
'multiplier' => $multiplier,
'external_transaction_id' => $orderNo,
'grant_status' => MallOrder::GRANT_NOT_APPLICABLE,
'create_time' => time(),
@@ -1692,7 +1676,6 @@ SQL;
'rewardName' => $item->title ?? '',
'category' => $item->category ?? 'daily',
'categoryTitle' => $item->category_title ?? '',
'multiplier' => $order->multiplier,
],
]);
$data = json_decode(strval($res->getBody()), true);

View File

@@ -77,10 +77,6 @@ final class MallBonusGrantPush
$start = gmdate('Y-m-d\TH:i:s\Z', strtotime(strval($order->start_time)));
$end = gmdate('Y-m-d\TH:i:s\Z', strtotime(strval($order->end_time)));
$multiplier = intval($order->multiplier ?? 0);
if ($multiplier <= 0) {
$multiplier = 1;
}
$payload = [
'merchant_code' => $merchantCode,
@@ -96,8 +92,6 @@ final class MallBonusGrantPush
'member_inbox_message' => 'Congratulations! You received an angpow.',
'category' => strval($item->category ?? ''),
'category_title' => strval($item->category_title ?? ''),
'one_time_turnover' => 'yes',
'multiplier' => $multiplier,
],
],
'currency_visual' => [

View File

@@ -29,7 +29,6 @@ class MallItem extends Model
'create_time' => 'integer',
'update_time' => 'integer',
'amount' => 'float',
'multiplier' => 'integer',
];
public function admin(): \think\model\relation\BelongsTo

View File

@@ -16,7 +16,6 @@ use support\think\Model;
* @property int $mall_item_id
* @property int $points_cost
* @property float $amount
* @property int $multiplier
* @property string $external_transaction_id
* @property string $grant_status
* @property string|null $fail_reason
@@ -58,7 +57,6 @@ class MallOrder extends Model
'update_time' => 'integer',
'points_cost' => 'integer',
'amount' => 'float',
'multiplier' => 'integer',
'retry_count' => 'integer',
'mall_address_id' => 'integer',
];

View File

@@ -281,8 +281,6 @@ class AngpowImportJobs
'member_inbox_message' => 'Congratulations! You received an angpow.',
'category' => strval($item->category ?? ''),
'category_title' => strval($item->category_title ?? ''),
'one_time_turnover' => 'yes',
'multiplier' => $order->multiplier,
];
}