feat(point-record): add status filter for point record queries

- Change API endpoint from APP_MEMBER to APP_TIK for point record requests
- Add status parameter to filter only confirmed records in frontend
- Update fetchPointRecords function to pass status: 'confirmed' by default
- Modify handleTableChange function signature to accept page and pageSize directly
- Add new business type mappings for AI-related services (dify_chat, voice_tts, tikhub_fetch, forecast_rewrite)
- Remove redundant reason display and status tag from record items
- Add status field to backend query conditions in PointRecordMapper
- Include status parameter in PointRecordPageReqVO with proper schema documentation
This commit is contained in:
2026-02-26 21:41:55 +08:00
parent 9c4d39e29d
commit 3bbb28677b
4 changed files with 17 additions and 12 deletions

View File

@@ -15,5 +15,5 @@ import { API_BASE } from '@gold/config/api'
* @returns {Promise}
*/
export function getPointRecordPage(params = {}) {
return http.get(`${API_BASE.APP_MEMBER}/tik/point-record/page`, { params })
return http.get(`${API_BASE.APP_TIK}/point-record/page`, { params })
}

View File

@@ -66,13 +66,14 @@ function maskMobile(mobile) {
return mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
}
// 获取积分记录
// 获取积分记录(只显示已完成的记录)
async function fetchPointRecords() {
recordsLoading.value = true
try {
const res = await getPointRecordPage({
pageNo: recordsPagination.current,
pageSize: recordsPagination.pageSize
pageSize: recordsPagination.pageSize,
status: 'confirmed'
})
if (res.data) {
pointRecords.value = res.data.list || []
@@ -86,9 +87,9 @@ async function fetchPointRecords() {
}
// 分页变化
function handleTableChange(pagination) {
recordsPagination.current = pagination.current
recordsPagination.pageSize = pagination.pageSize
function handleTableChange(page, pageSize) {
recordsPagination.current = page
recordsPagination.pageSize = pageSize
fetchPointRecords()
}
@@ -112,7 +113,11 @@ function getBizTypeName(bizType) {
'exchange': '兑换',
'admin': '后台调整',
'gift': '礼包赠送',
'digital_human': '数字人生成'
'dify_chat': 'AI文案',
'digital_human': '数字人',
'voice_tts': '语音克隆',
'tikhub_fetch': '数据采集',
'forecast_rewrite': '文案改写'
}
return typeMap[bizType] || bizType || '其他'
}
@@ -258,16 +263,12 @@ onMounted(async () => {
</template>
<template #title>
<div class="record-title">
<span class="record-reason">{{ item.reason || getBizTypeName(item.bizType) }}</span>
<a-tag :color="getStatusInfo(item.status).color" size="small">
{{ getStatusInfo(item.status).text }}
</a-tag>
<span class="record-reason">{{ getBizTypeName(item.bizType) }}</span>
</div>
</template>
<template #description>
<div class="record-desc">
<span>{{ formatRecordTime(item.createTime) }}</span>
<span v-if="item.bizType" class="record-biz-type">{{ getBizTypeName(item.bizType) }}</span>
</div>
</template>
</a-list-item-meta>

View File

@@ -29,6 +29,7 @@ public interface PointRecordMapper extends BaseMapperX<PointRecordDO> {
.eqIfPresent(PointRecordDO::getBizType, reqVO.getBizType())
.eqIfPresent(PointRecordDO::getBizId, reqVO.getBizId())
.eqIfPresent(PointRecordDO::getRemark, reqVO.getRemark())
.eqIfPresent(PointRecordDO::getStatus, reqVO.getStatus())
.betweenIfPresent(PointRecordDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(PointRecordDO::getId));
}

View File

@@ -40,6 +40,9 @@ public class PointRecordPageReqVO extends PageParam {
@Schema(description = "备注", example = "你猜")
private String remark;
@Schema(description = "状态pending-预扣 confirmed-已确认 canceled-已取消")
private String status;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;