index.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import request from '@/config/axios'
  2. export interface RecordVO {
  3. id: number
  4. bizId: string
  5. bizType: string
  6. type: string
  7. title: string
  8. description: string
  9. point: number
  10. totalPoint: number
  11. status: number
  12. userId: number
  13. freezingTime: Date
  14. thawingTime: Date
  15. createDate: Date
  16. }
  17. // 查询用户积分记录列表
  18. export const getRecordPage = async (params) => {
  19. return await request.get({ url: `/point/record/page`, params })
  20. }
  21. // 查询用户积分记录详情
  22. export const getRecord = async (id: number) => {
  23. return await request.get({ url: `/point/record/get?id=` + id })
  24. }
  25. // 新增用户积分记录
  26. export const createRecord = async (data: RecordVO) => {
  27. return await request.post({ url: `/point/record/create`, data })
  28. }
  29. // 修改用户积分记录
  30. export const updateRecord = async (data: RecordVO) => {
  31. return await request.put({ url: `/point/record/update`, data })
  32. }
  33. // 删除用户积分记录
  34. export const deleteRecord = async (id: number) => {
  35. return await request.delete({ url: `/point/record/delete?id=` + id })
  36. }
  37. // 导出用户积分记录 Excel
  38. export const exportRecord = async (params) => {
  39. return await request.download({ url: `/point/record/export-excel`, params })
  40. }