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:
@@ -15,5 +15,5 @@ import { API_BASE } from '@gold/config/api'
|
|||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
export function getPointRecordPage(params = {}) {
|
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 })
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,13 +66,14 @@ function maskMobile(mobile) {
|
|||||||
return mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
|
return mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取积分记录
|
// 获取积分记录(只显示已完成的记录)
|
||||||
async function fetchPointRecords() {
|
async function fetchPointRecords() {
|
||||||
recordsLoading.value = true
|
recordsLoading.value = true
|
||||||
try {
|
try {
|
||||||
const res = await getPointRecordPage({
|
const res = await getPointRecordPage({
|
||||||
pageNo: recordsPagination.current,
|
pageNo: recordsPagination.current,
|
||||||
pageSize: recordsPagination.pageSize
|
pageSize: recordsPagination.pageSize,
|
||||||
|
status: 'confirmed'
|
||||||
})
|
})
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
pointRecords.value = res.data.list || []
|
pointRecords.value = res.data.list || []
|
||||||
@@ -86,9 +87,9 @@ async function fetchPointRecords() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 分页变化
|
// 分页变化
|
||||||
function handleTableChange(pagination) {
|
function handleTableChange(page, pageSize) {
|
||||||
recordsPagination.current = pagination.current
|
recordsPagination.current = page
|
||||||
recordsPagination.pageSize = pagination.pageSize
|
recordsPagination.pageSize = pageSize
|
||||||
fetchPointRecords()
|
fetchPointRecords()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +113,11 @@ function getBizTypeName(bizType) {
|
|||||||
'exchange': '兑换',
|
'exchange': '兑换',
|
||||||
'admin': '后台调整',
|
'admin': '后台调整',
|
||||||
'gift': '礼包赠送',
|
'gift': '礼包赠送',
|
||||||
'digital_human': '数字人生成'
|
'dify_chat': 'AI文案',
|
||||||
|
'digital_human': '数字人',
|
||||||
|
'voice_tts': '语音克隆',
|
||||||
|
'tikhub_fetch': '数据采集',
|
||||||
|
'forecast_rewrite': '文案改写'
|
||||||
}
|
}
|
||||||
return typeMap[bizType] || bizType || '其他'
|
return typeMap[bizType] || bizType || '其他'
|
||||||
}
|
}
|
||||||
@@ -258,16 +263,12 @@ onMounted(async () => {
|
|||||||
</template>
|
</template>
|
||||||
<template #title>
|
<template #title>
|
||||||
<div class="record-title">
|
<div class="record-title">
|
||||||
<span class="record-reason">{{ item.reason || getBizTypeName(item.bizType) }}</span>
|
<span class="record-reason">{{ getBizTypeName(item.bizType) }}</span>
|
||||||
<a-tag :color="getStatusInfo(item.status).color" size="small">
|
|
||||||
{{ getStatusInfo(item.status).text }}
|
|
||||||
</a-tag>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #description>
|
<template #description>
|
||||||
<div class="record-desc">
|
<div class="record-desc">
|
||||||
<span>{{ formatRecordTime(item.createTime) }}</span>
|
<span>{{ formatRecordTime(item.createTime) }}</span>
|
||||||
<span v-if="item.bizType" class="record-biz-type">{{ getBizTypeName(item.bizType) }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</a-list-item-meta>
|
</a-list-item-meta>
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ public interface PointRecordMapper extends BaseMapperX<PointRecordDO> {
|
|||||||
.eqIfPresent(PointRecordDO::getBizType, reqVO.getBizType())
|
.eqIfPresent(PointRecordDO::getBizType, reqVO.getBizType())
|
||||||
.eqIfPresent(PointRecordDO::getBizId, reqVO.getBizId())
|
.eqIfPresent(PointRecordDO::getBizId, reqVO.getBizId())
|
||||||
.eqIfPresent(PointRecordDO::getRemark, reqVO.getRemark())
|
.eqIfPresent(PointRecordDO::getRemark, reqVO.getRemark())
|
||||||
|
.eqIfPresent(PointRecordDO::getStatus, reqVO.getStatus())
|
||||||
.betweenIfPresent(PointRecordDO::getCreateTime, reqVO.getCreateTime())
|
.betweenIfPresent(PointRecordDO::getCreateTime, reqVO.getCreateTime())
|
||||||
.orderByDesc(PointRecordDO::getId));
|
.orderByDesc(PointRecordDO::getId));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ public class PointRecordPageReqVO extends PageParam {
|
|||||||
@Schema(description = "备注", example = "你猜")
|
@Schema(description = "备注", example = "你猜")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "状态:pending-预扣 confirmed-已确认 canceled-已取消")
|
||||||
|
private String status;
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
@Schema(description = "创建时间")
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
private LocalDateTime[] createTime;
|
private LocalDateTime[] createTime;
|
||||||
|
|||||||
Reference in New Issue
Block a user