移除商品兑换需要流水

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,
];
}

View File

@@ -19,8 +19,6 @@ export default {
amount_apply_suggested: 'Use suggested amount',
amount_ratio_missing: 'Mall points-to-cash reference ratio is unavailable; enter cash amount manually.',
points_to_cash_ratio_label: 'Reference ratio',
multiplier: 'Turnover multiplier',
multiplier_tip: 'Turnover requirement sent with bonus/withdraw grant.',
category: 'Category',
category_title: 'Category title',
admin_id: 'Created by',

View File

@@ -17,7 +17,6 @@ export default {
mallitem__title: 'Product title',
points_cost: 'Points spent',
amount: 'Cash amount',
multiplier: 'Turnover multiplier',
external_transaction_id: 'Order number',
grant_status: 'Grant status',
'grant_status NOT_SENT': 'Not sent',

View File

@@ -14,7 +14,6 @@ export default {
mallitem__title: 'title',
points_cost: 'points_cost',
amount: 'amount',
multiplier: 'multiplier',
external_transaction_id: 'external_transaction_id',
grant_status: 'grant_status',
'grant_status NOT_SENT': 'NOT_SENT',

View File

@@ -19,8 +19,6 @@ export default {
amount_apply_suggested: '填入建议金额',
amount_ratio_missing: '暂未读取到商城「积分兑现金参考比例」,建议金额无法计算;现金面值请手工填写。',
points_to_cash_ratio_label: '当前参考比例',
multiplier: '流水倍数',
multiplier_tip: '红利/提现发放时一并推送的流水倍数要求。',
category: '红利业务类别',
category_title: '类别展示名',
admin_id: '创建管理员',

View File

@@ -17,7 +17,6 @@ export default {
mallitem__title: '商品标题',
points_cost: '消耗积分',
amount: '现金面值',
multiplier: '流水倍数',
external_transaction_id: '订单号',
grant_status: '推送playX状态',
'grant_status NOT_SENT': '未发送',

View File

@@ -14,7 +14,6 @@ export default {
mallitem__title: '商品标题',
points_cost: '消耗积分',
amount: '现金面值',
multiplier: '流水倍数',
external_transaction_id: '订单号',
grant_status: '推送playX状态',
'grant_status NOT_SENT': '未发送',

View File

@@ -127,13 +127,6 @@ const baTable = new baTableClass(
sortable: false,
operator: 'RANGE',
},
{
label: t('mall.item.multiplier'),
prop: 'multiplier',
align: 'center',
sortable: false,
operator: 'eq',
},
{
label: t('mall.item.category'),
prop: 'category',

View File

@@ -101,7 +101,7 @@
:placeholder="t('Please input field', { field: t('mall.item.score') })"
/>
<!-- BONUS / WITHDRAW现金面值流水倍数 -->
<!-- BONUS / WITHDRAW现金面值 -->
<el-form-item v-if="isBonusOrWithdraw" :label="t('mall.item.amount')" prop="amount">
<el-input-number
v-model="baTable.form.items!.amount"
@@ -123,16 +123,6 @@
</div>
<div class="form-tip">{{ amountBlockHelp }}</div>
</el-form-item>
<FormItem
v-if="isBonusOrWithdraw"
:label="t('mall.item.multiplier')"
type="number"
v-model="baTable.form.items!.multiplier"
prop="multiplier"
:block-help="t('mall.item.multiplier_tip')"
:input-attr="{ step: 1 }"
:placeholder="t('Please input field', { field: t('mall.item.multiplier') })"
/>
<!-- BONUSBonus Grant 需要 -->
<FormItem
v-if="isBonus"
@@ -314,9 +304,8 @@ watch(
// BONUS实物库存不适用
baTable.form.items.stock = 0
} else if (typeNum === 2) {
// PHYSICAL现金/倍数/类别不适用
// PHYSICAL现金/类别不适用
baTable.form.items.amount = 0
baTable.form.items.multiplier = 0
baTable.form.items.category = ''
baTable.form.items.category_title = ''
} else if (typeNum === 3) {
@@ -379,25 +368,6 @@ const rules: Partial<Record<string, FormItemRule[]>> = reactive({
trigger: 'blur',
},
],
multiplier: [
{
validator: (rule: any, val: any, callback: Function) => {
if (!isBonusOrWithdraw.value) return callback()
if (val === '' || val === null || val === undefined) {
return callback(new Error(t('Please input field', { field: t('mall.item.multiplier') })))
}
const num = Number(val)
if (!Number.isFinite(num) || !Number.isInteger(num)) {
return callback(new Error(t('Please enter the correct field', { field: t('mall.item.multiplier') })))
}
if (num < 0) {
return callback(new Error(t('Please enter the correct field', { field: t('mall.item.multiplier') })))
}
return callback()
},
trigger: 'blur',
},
],
category: [
{
validator: (rule: any, val: any, callback: Function) => {

View File

@@ -124,7 +124,6 @@ const baTable = new baTableClass(
},
{ label: t('mall.order.points_cost'), prop: 'points_cost', align: 'center', minWidth: 90, operator: 'RANGE', sortable: false },
{ label: t('mall.order.amount'), prop: 'amount', align: 'center', minWidth: 90, operator: 'RANGE', sortable: false },
{ label: t('mall.order.multiplier'), prop: 'multiplier', align: 'center', minWidth: 90, operator: 'eq', sortable: false },
{
label: t('mall.order.external_transaction_id'),
prop: 'external_transaction_id',

View File

@@ -69,7 +69,6 @@ const baTable = new baTableClass(
{ label: t('mall.playxOrder.mallitem__title'), prop: 'mallItem.title', align: 'center', operatorPlaceholder: t('Fuzzy query'), sortable: false, operator: 'LIKE' },
{ label: t('mall.playxOrder.points_cost'), prop: 'points_cost', align: 'center', operator: 'RANGE', sortable: false },
{ label: t('mall.playxOrder.amount'), prop: 'amount', align: 'center', operator: 'RANGE', sortable: false },
{ label: t('mall.playxOrder.multiplier'), prop: 'multiplier', align: 'center', operator: 'eq', sortable: false },
{ label: t('mall.playxOrder.external_transaction_id'), prop: 'external_transaction_id', align: 'center', operatorPlaceholder: t('Fuzzy query'), sortable: false, operator: 'LIKE' },
{
label: t('mall.playxOrder.grant_status'),