1.优化/dice/reward_config/index页面中的备注根据设置的档位来进行变化
2.检查为什么色子奖励权重有104条显示,应该只有26条(对应色子点数5-30) 3.移除掉所有实际金额在后台的显示
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
"tipIndex": "色子点数须在 5~30 之间且本表内不重复。",
|
"tipIndex": "色子点数须在 5~30 之间且本表内不重复。",
|
||||||
"tierRecommendRules": "【结算金额与档位】【大奖】T1:结算金额>2;【小赚】T2:2>=结算金额>1;【抽水】T3:1>=结算金额>0;【惩罚】T4:0>结算金额;【再来一次】T5:0=结算金额。下方可为各档位填写推荐结算金额;表格中「所属档位」随结算金额自动计算,不可手动修改。",
|
"tierRecommendRules": "【结算金额与档位】【大奖】T1:结算金额>2;【小赚】T2:2>=结算金额>1;【抽水】T3:1>=结算金额>0;【惩罚】T4:0>结算金额;【再来一次】T5:0=结算金额。下方可为各档位填写推荐结算金额;表格中「所属档位」随结算金额自动计算,不可手动修改。",
|
||||||
"tierRecommendRealEv": "推荐结算金额",
|
"tierRecommendRealEv": "推荐结算金额",
|
||||||
"tierRecommendAutoMatch": "修改结算金额时自动匹配档位",
|
"tierRecommendAutoMatch": "修改结算金额时自动匹配档位与备注",
|
||||||
"tierRecommendApplyAmount": "将推荐金额填入已选档位的行",
|
"tierRecommendApplyAmount": "将推荐金额填入已选档位的行",
|
||||||
"tierRecommendApplyAmountOk": "已为 {n} 行填入推荐结算金额",
|
"tierRecommendApplyAmountOk": "已为 {n} 行填入推荐结算金额",
|
||||||
"tierRecommendNoTierRows": "没有可根据结算金额推断档位的行",
|
"tierRecommendNoTierRows": "没有可根据结算金额推断档位的行",
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"tierRecommendT5UiText": "再来一次",
|
"tierRecommendT5UiText": "再来一次",
|
||||||
"tierRecommendT5UiTextEn": "Once again",
|
"tierRecommendT5UiTextEn": "Once again",
|
||||||
"colTierAutoHint": "根据结算金额自动匹配",
|
"colTierAutoHint": "根据结算金额自动匹配",
|
||||||
"tipBigwin": "从左至右:中大奖点数(不可改)、显示信息、实际中奖、备注、权重(0~10000)。点数 5、30 权重固定 100%。本表单独立提交,仅提交大奖权重。",
|
"tipBigwin": "从左至右:中大奖点数(不可改)、显示信息、结算金额、备注、权重(0~10000)。点数 5、30 权重固定 100%。本表单独立提交,仅提交大奖权重。",
|
||||||
"colId": "索引(id)",
|
"colId": "索引(id)",
|
||||||
"colDicePoints": "色子点数",
|
"colDicePoints": "色子点数",
|
||||||
"colDisplayText": "显示文本",
|
"colDisplayText": "显示文本",
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
"colBigwinPoints": "中大奖点数",
|
"colBigwinPoints": "中大奖点数",
|
||||||
"colDisplayInfo": "显示信息",
|
"colDisplayInfo": "显示信息",
|
||||||
"colDisplayInfoEn": "显示信息(英文)",
|
"colDisplayInfoEn": "显示信息(英文)",
|
||||||
"colRealPrize": "实际中奖",
|
"colRealPrize": "结算金额",
|
||||||
"colWeightRange": "权重(0-10000)",
|
"colWeightRange": "权重(0-10000)",
|
||||||
"placeholderDisplayInfoZh": "显示信息(中文)",
|
"placeholderDisplayInfoZh": "显示信息(中文)",
|
||||||
"placeholderDisplayInfoEn": "显示信息(英文)",
|
"placeholderDisplayInfoEn": "显示信息(英文)",
|
||||||
|
|||||||
@@ -78,13 +78,6 @@
|
|||||||
return api.list({ ...params, direction: currentDirection.value })
|
return api.list({ ...params, direction: currentDirection.value })
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatMoney2(val: unknown): string {
|
|
||||||
if (val === '' || val === null || val === undefined) return '-'
|
|
||||||
const n = typeof val === 'number' ? val : Number(val)
|
|
||||||
if (!Number.isFinite(n)) return '-'
|
|
||||||
return n.toFixed(2)
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleSearch = (params: Record<string, any>) => {
|
const handleSearch = (params: Record<string, any>) => {
|
||||||
Object.assign(searchParams, { ...params, direction: currentDirection.value })
|
Object.assign(searchParams, { ...params, direction: currentDirection.value })
|
||||||
getData()
|
getData()
|
||||||
@@ -132,13 +125,6 @@
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: true
|
showOverflowTooltip: true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
prop: 'real_ev',
|
|
||||||
label: 'page.table.realEv',
|
|
||||||
width: 110,
|
|
||||||
align: 'center',
|
|
||||||
formatter: (row: Record<string, any>) => formatMoney2(row?.real_ev)
|
|
||||||
},
|
|
||||||
{ prop: 'remark', label: 'page.table.remark', minWidth: 80, align: 'center', showOverflowTooltip: true },
|
{ prop: 'remark', label: 'page.table.remark', minWidth: 80, align: 'center', showOverflowTooltip: true },
|
||||||
{ prop: 'weight', label: 'page.table.weight', width: 110, align: 'center' }
|
{ prop: 'weight', label: 'page.table.weight', width: 110, align: 'center' }
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -53,17 +53,6 @@
|
|||||||
width="80"
|
width="80"
|
||||||
align="center"
|
align="center"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
|
||||||
:label="$t('page.weightShared.colRealEv')"
|
|
||||||
prop="real_ev"
|
|
||||||
width="90"
|
|
||||||
align="center"
|
|
||||||
show-overflow-tooltip
|
|
||||||
>
|
|
||||||
<template #default="{ row }">
|
|
||||||
<span>{{ formatMoney2(row?.real_ev) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="$t('page.weightShared.colUiText')"
|
:label="$t('page.weightShared.colUiText')"
|
||||||
prop="ui_text"
|
prop="ui_text"
|
||||||
|
|||||||
@@ -47,17 +47,6 @@
|
|||||||
align="center"
|
align="center"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
|
||||||
:label="$t('page.weightShared.colRealEv')"
|
|
||||||
prop="real_ev"
|
|
||||||
width="90"
|
|
||||||
align="center"
|
|
||||||
show-overflow-tooltip
|
|
||||||
>
|
|
||||||
<template #default="{ row }">
|
|
||||||
<span>{{ formatMoney2(row?.real_ev) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="$t('page.weightShared.colUiText')"
|
:label="$t('page.weightShared.colUiText')"
|
||||||
prop="ui_text"
|
prop="ui_text"
|
||||||
@@ -184,13 +173,6 @@
|
|||||||
align="center"
|
align="center"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
|
||||||
:label="$t('page.weightShared.colRealEv')"
|
|
||||||
prop="real_ev"
|
|
||||||
width="90"
|
|
||||||
align="center"
|
|
||||||
show-overflow-tooltip
|
|
||||||
/>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="$t('page.weightShared.colUiText')"
|
:label="$t('page.weightShared.colUiText')"
|
||||||
prop="ui_text"
|
prop="ui_text"
|
||||||
|
|||||||
@@ -137,15 +137,6 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</ElTableColumn>
|
</ElTableColumn>
|
||||||
<ElTableColumn
|
|
||||||
:label="$t('page.configPage.colRealReward')"
|
|
||||||
min-width="130"
|
|
||||||
align="center"
|
|
||||||
>
|
|
||||||
<template #default="{ row }">
|
|
||||||
<span>{{ formatMoney2(calcRealReward(row.real_ev)) }}</span>
|
|
||||||
</template>
|
|
||||||
</ElTableColumn>
|
|
||||||
<ElTableColumn :label="$t('page.configPage.colTier')" width="100" align="center">
|
<ElTableColumn :label="$t('page.configPage.colTier')" width="100" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span class="tier-readonly">{{ displayRowTier(row) }}</span>
|
<span class="tier-readonly">{{ displayRowTier(row) }}</span>
|
||||||
@@ -160,7 +151,8 @@
|
|||||||
<ElInput
|
<ElInput
|
||||||
v-model="row.remark"
|
v-model="row.remark"
|
||||||
size="small"
|
size="small"
|
||||||
:placeholder="$t('page.configPage.placeholderRemark')"
|
:placeholder="remarkPlaceholderForRow(row)"
|
||||||
|
@input="markRemarkTouched(row)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</ElTableColumn>
|
</ElTableColumn>
|
||||||
@@ -494,6 +486,7 @@
|
|||||||
buildRowsFromTiers,
|
buildRowsFromTiers,
|
||||||
computeBoardFrequencies,
|
computeBoardFrequencies,
|
||||||
DEFAULT_TIER_REAL_EV_STANDARDS,
|
DEFAULT_TIER_REAL_EV_STANDARDS,
|
||||||
|
defaultRemarkForTier,
|
||||||
generateTiers,
|
generateTiers,
|
||||||
inferTierFromRealEv,
|
inferTierFromRealEv,
|
||||||
summarizeCounts,
|
summarizeCounts,
|
||||||
@@ -528,6 +521,8 @@
|
|||||||
tier: string
|
tier: string
|
||||||
remark: string
|
remark: string
|
||||||
weight: number
|
weight: number
|
||||||
|
/** 用户已手动改过备注时不再随档位自动覆盖 */
|
||||||
|
remarkTouched?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const channelScope = useInjectedChannelDept()
|
const channelScope = useInjectedChannelDept()
|
||||||
@@ -610,6 +605,29 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function markRemarkTouched(row: IndexRow) {
|
||||||
|
row.remarkTouched = true
|
||||||
|
}
|
||||||
|
|
||||||
|
function syncRemarkFromTier(row: IndexRow) {
|
||||||
|
if (row.remarkTouched || row.tier === 'BIGWIN') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const tier = displayRowTier(row)
|
||||||
|
if (tier === '') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
row.remark = defaultRemarkForTier(tier, tierRecommend.T2)
|
||||||
|
}
|
||||||
|
|
||||||
|
function remarkPlaceholderForRow(row: IndexRow): string {
|
||||||
|
const tier = displayRowTier(row)
|
||||||
|
if (tier === '') {
|
||||||
|
return t('page.configPage.placeholderRemark')
|
||||||
|
}
|
||||||
|
return defaultRemarkForTier(tier, tierRecommend.T2)
|
||||||
|
}
|
||||||
|
|
||||||
function displayRowTier(row: IndexRow): string {
|
function displayRowTier(row: IndexRow): string {
|
||||||
const tier = inferTierFromRealEv(rowRealEvNumber(row))
|
const tier = inferTierFromRealEv(rowRealEvNumber(row))
|
||||||
return tier !== '' ? tier : row.tier || '-'
|
return tier !== '' ? tier : row.tier || '-'
|
||||||
@@ -625,6 +643,7 @@
|
|||||||
applyRealEvDisplay(row, ev)
|
applyRealEvDisplay(row, ev)
|
||||||
}
|
}
|
||||||
syncRowTierFromRealEv(row)
|
syncRowTierFromRealEv(row)
|
||||||
|
syncRemarkFromTier(row)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 奖励索引 id 与后端 DiceRewardConfigLogic 一致:0~25 */
|
/** 奖励索引 id 与后端 DiceRewardConfigLogic 一致:0~25 */
|
||||||
@@ -669,14 +688,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function calcRealReward(realEv: unknown): number {
|
|
||||||
const n = typeof realEv === 'number' && !Number.isNaN(realEv) ? realEv : Number(realEv)
|
|
||||||
if (Number.isNaN(n)) {
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
return n - 1
|
|
||||||
}
|
|
||||||
|
|
||||||
/** BIGWIN 行不参与按 real_ev 推断 T1-T5,避免编辑时从大奖权重表消失 */
|
/** BIGWIN 行不参与按 real_ev 推断 T1-T5,避免编辑时从大奖权重表消失 */
|
||||||
function setBigwinRowWeight(row: IndexRow, v: number | number[] | undefined | null) {
|
function setBigwinRowWeight(row: IndexRow, v: number | number[] | undefined | null) {
|
||||||
const n = Array.isArray(v) ? v[0] : v
|
const n = Array.isArray(v) ? v[0] : v
|
||||||
@@ -695,6 +706,7 @@
|
|||||||
} else {
|
} else {
|
||||||
applyRealEvDisplay(row, n)
|
applyRealEvDisplay(row, n)
|
||||||
}
|
}
|
||||||
|
syncRemarkFromTier(row)
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleApplyRecommendRealEv() {
|
function handleApplyRecommendRealEv() {
|
||||||
@@ -723,6 +735,7 @@
|
|||||||
let count = 0
|
let count = 0
|
||||||
for (const row of indexRowsExcludeBigwin.value) {
|
for (const row of indexRowsExcludeBigwin.value) {
|
||||||
syncRowTierFromRealEv(row)
|
syncRowTierFromRealEv(row)
|
||||||
|
syncRemarkFromTier(row)
|
||||||
if (row.tier !== '') {
|
if (row.tier !== '') {
|
||||||
count++
|
count++
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
<ElTableColumn label="start" prop="start_index" width="78" align="center" />
|
<ElTableColumn label="start" prop="start_index" width="78" align="center" />
|
||||||
<ElTableColumn :label="$t('page.table.endIndex')" prop="id" width="78" align="center" />
|
<ElTableColumn :label="$t('page.table.endIndex')" prop="id" width="78" align="center" />
|
||||||
<ElTableColumn :label="$t('page.table.displayText')" prop="ui_text" width="90" align="center" show-overflow-tooltip />
|
<ElTableColumn :label="$t('page.table.displayText')" prop="ui_text" width="90" align="center" show-overflow-tooltip />
|
||||||
<ElTableColumn :label="$t('page.table.realEv')" prop="real_ev" width="90" align="center" show-overflow-tooltip />
|
|
||||||
<ElTableColumn :label="$t('page.table.remark')" prop="remark" min-width="80" align="center" show-overflow-tooltip />
|
<ElTableColumn :label="$t('page.table.remark')" prop="remark" min-width="80" align="center" show-overflow-tooltip />
|
||||||
<ElTableColumn :label="$t('page.table.weight')" width="130" align="center">
|
<ElTableColumn :label="$t('page.table.weight')" width="130" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
@@ -77,7 +76,6 @@
|
|||||||
<ElTableColumn label="start" prop="start_index" width="78" align="center" />
|
<ElTableColumn label="start" prop="start_index" width="78" align="center" />
|
||||||
<ElTableColumn :label="$t('page.table.endIndex')" prop="id" width="78" align="center" />
|
<ElTableColumn :label="$t('page.table.endIndex')" prop="id" width="78" align="center" />
|
||||||
<ElTableColumn :label="$t('page.table.displayText')" prop="ui_text" width="90" align="center" show-overflow-tooltip />
|
<ElTableColumn :label="$t('page.table.displayText')" prop="ui_text" width="90" align="center" show-overflow-tooltip />
|
||||||
<ElTableColumn :label="$t('page.table.realEv')" prop="real_ev" width="90" align="center" show-overflow-tooltip />
|
|
||||||
<ElTableColumn :label="$t('page.table.remark')" prop="remark" min-width="80" align="center" show-overflow-tooltip />
|
<ElTableColumn :label="$t('page.table.remark')" prop="remark" min-width="80" align="center" show-overflow-tooltip />
|
||||||
<ElTableColumn :label="$t('page.table.weight')" width="120" align="center">
|
<ElTableColumn :label="$t('page.table.weight')" width="120" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
|||||||
@@ -50,13 +50,6 @@
|
|||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column :label="$t('page.weightRatio.colDicePoints')" prop="grid_number" width="80" align="center" />
|
<el-table-column :label="$t('page.weightRatio.colDicePoints')" prop="grid_number" width="80" align="center" />
|
||||||
<el-table-column
|
|
||||||
:label="$t('page.weightRatio.colRealEv')"
|
|
||||||
prop="real_ev"
|
|
||||||
width="90"
|
|
||||||
align="center"
|
|
||||||
show-overflow-tooltip
|
|
||||||
/>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="$t('page.weightRatio.colUiText')"
|
:label="$t('page.weightRatio.colUiText')"
|
||||||
prop="ui_text"
|
prop="ui_text"
|
||||||
|
|||||||
@@ -70,6 +70,32 @@ export const DEFAULT_TIER_REAL_EV_STANDARDS: TierRealEvStandards = {
|
|||||||
* T4 惩罚:0>金额
|
* T4 惩罚:0>金额
|
||||||
* T5 再来一次:=0
|
* T5 再来一次:=0
|
||||||
*/
|
*/
|
||||||
|
/** 各档位默认备注(奖励索引表;用户可手动改,改档位时会按规则刷新除非已手动编辑过备注) */
|
||||||
|
export function defaultRemarkForTier(
|
||||||
|
tier: IndexTier | 'BIGWIN' | string,
|
||||||
|
t2RealEvStandard?: number
|
||||||
|
): string {
|
||||||
|
if (tier === 'T1' || tier === 'BIGWIN') {
|
||||||
|
return '大奖格'
|
||||||
|
}
|
||||||
|
if (tier === 'T2') {
|
||||||
|
if (t2RealEvStandard !== undefined && t2RealEvStandard <= 1) {
|
||||||
|
return '完美回本'
|
||||||
|
}
|
||||||
|
return '小赚'
|
||||||
|
}
|
||||||
|
if (tier === 'T3') {
|
||||||
|
return '抽水'
|
||||||
|
}
|
||||||
|
if (tier === 'T4') {
|
||||||
|
return '惩罚'
|
||||||
|
}
|
||||||
|
if (tier === 'T5') {
|
||||||
|
return '再来一次'
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
|
||||||
export function inferTierFromRealEv(realEv: number): IndexTier | '' {
|
export function inferTierFromRealEv(realEv: number): IndexTier | '' {
|
||||||
if (!Number.isFinite(realEv)) {
|
if (!Number.isFinite(realEv)) {
|
||||||
return ''
|
return ''
|
||||||
|
|||||||
@@ -43,19 +43,21 @@ class DiceRewardLogic
|
|||||||
$orderField = isset($where['orderField']) && $where['orderField'] !== '' ? (string) $where['orderField'] : 'r.tier';
|
$orderField = isset($where['orderField']) && $where['orderField'] !== '' ? (string) $where['orderField'] : 'r.tier';
|
||||||
$orderType = isset($where['orderType']) && strtoupper((string) $where['orderType']) === 'DESC' ? 'desc' : 'asc';
|
$orderType = isset($where['orderType']) && strtoupper((string) $where['orderType']) === 'DESC' ? 'desc' : 'asc';
|
||||||
|
|
||||||
|
$keepIds = $this->resolveDedupedRewardIdsByGrid($direction, $tier, $adminInfo, $requestDeptId);
|
||||||
|
if ($keepIds === []) {
|
||||||
|
return [
|
||||||
|
'total' => 0,
|
||||||
|
'per_page' => $limit,
|
||||||
|
'current_page' => $page,
|
||||||
|
'data' => [],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
$query = DiceReward::alias('r')
|
$query = DiceReward::alias('r')
|
||||||
->where('r.direction', $direction)
|
->whereIn('r.id', $keepIds)
|
||||||
->field('r.id,r.tier,r.direction,r.end_index,r.weight,r.grid_number,r.start_index,r.ui_text,r.real_ev,r.remark,r.type,r.create_time,r.update_time')
|
->field('r.id,r.tier,r.direction,r.end_index,r.weight,r.grid_number,r.start_index,r.ui_text,r.real_ev,r.remark,r.type,r.create_time,r.update_time')
|
||||||
->order($orderField, $orderType)
|
->order($orderField, $orderType)
|
||||||
->order('r.end_index', 'asc');
|
->order('r.grid_number', 'asc');
|
||||||
|
|
||||||
if ($adminInfo !== null) {
|
|
||||||
AdminScopeHelper::applyConfigScope($query, $adminInfo, $requestDeptId, 'r.dept_id');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($tier !== '') {
|
|
||||||
$query->where('r.tier', $tier);
|
|
||||||
}
|
|
||||||
|
|
||||||
$paginator = $query->paginate($limit, false, ['page' => $page]);
|
$paginator = $query->paginate($limit, false, ['page' => $page]);
|
||||||
$arr = $paginator->toArray();
|
$arr = $paginator->toArray();
|
||||||
@@ -81,6 +83,41 @@ class DiceRewardLogic
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表去重:每个方向、每个色子点数(5-30)仅保留一条(取 id 最大),避免历史重复数据导致 104 条
|
||||||
|
* @return int[]
|
||||||
|
*/
|
||||||
|
private function resolveDedupedRewardIdsByGrid(
|
||||||
|
int $direction,
|
||||||
|
string $tier,
|
||||||
|
?array $adminInfo,
|
||||||
|
$requestDeptId
|
||||||
|
): array {
|
||||||
|
$dedupeQuery = DiceReward::alias('rd')
|
||||||
|
->field('MAX(rd.id) AS keep_id')
|
||||||
|
->where('rd.direction', $direction)
|
||||||
|
->whereBetween('rd.grid_number', [5, 30]);
|
||||||
|
|
||||||
|
if ($adminInfo !== null) {
|
||||||
|
AdminScopeHelper::applyConfigScope($dedupeQuery, $adminInfo, $requestDeptId, 'rd.dept_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($tier !== '') {
|
||||||
|
$dedupeQuery->where('rd.tier', $tier);
|
||||||
|
}
|
||||||
|
|
||||||
|
$rows = $dedupeQuery->group('rd.grid_number')->select()->toArray();
|
||||||
|
$ids = [];
|
||||||
|
foreach ($rows as $row) {
|
||||||
|
$id = isset($row['keep_id']) ? (int) $row['keep_id'] : 0;
|
||||||
|
if ($id > 0) {
|
||||||
|
$ids[] = $id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ids;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按单方向批量更新权重(仅更新当前方向的 weight,并刷新缓存)
|
* 按单方向批量更新权重(仅更新当前方向的 weight,并刷新缓存)
|
||||||
* @param int $direction 0=顺时针 1=逆时针
|
* @param int $direction 0=顺时针 1=逆时针
|
||||||
|
|||||||
Reference in New Issue
Block a user