新版官网模板
This commit is contained in:
32
app/api/user/point-log/index.ts
Normal file
32
app/api/user/point-log/index.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import request from '@/utils/request'
|
||||
import type { ApiResult, PageResult } from '@/api'
|
||||
import type { UserPointLog, UserPointLogParam } from './model'
|
||||
import { SERVER_API_URL } from '@/config/setting'
|
||||
|
||||
/**
|
||||
* 分页查询积分明细
|
||||
*/
|
||||
export async function pageUserPointLog(params: UserPointLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<UserPointLog>>>(
|
||||
SERVER_API_URL + '/sys/user-point-log/page',
|
||||
{ params }
|
||||
)
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message))
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询积分明细列表
|
||||
*/
|
||||
export async function listUserPointLog(params?: UserPointLogParam) {
|
||||
const res = await request.get<ApiResult<UserPointLog[]>>(
|
||||
SERVER_API_URL + '/sys/user-point-log',
|
||||
{ params }
|
||||
)
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message))
|
||||
}
|
||||
29
app/api/user/point-log/model/index.ts
Normal file
29
app/api/user/point-log/model/index.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import type { PageParam } from '@/api'
|
||||
|
||||
/**
|
||||
* 积分明细
|
||||
*/
|
||||
export interface UserPointLog {
|
||||
logId?: number
|
||||
userId?: number
|
||||
/** 积分变动量(正数增加,负数减少) */
|
||||
points?: number
|
||||
/** 场景类型:1 充值赠送 2 消费 3 签到 4 活动 5 兑换 9 系统调整 */
|
||||
scene?: number
|
||||
/** 场景描述 */
|
||||
describe?: string
|
||||
remark?: string
|
||||
status?: number
|
||||
tenantId?: number
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 积分明细查询条件
|
||||
*/
|
||||
export interface UserPointLogParam extends PageParam {
|
||||
userId?: number
|
||||
scene?: number
|
||||
createTimeStart?: string
|
||||
createTimeEnd?: string
|
||||
}
|
||||
Reference in New Issue
Block a user