index.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import request from '@/config/axios'
  2. export interface SignInRecordVO {
  3. id: number
  4. userId: number
  5. day: number
  6. point: number
  7. }
  8. // 查询用户签到积分列表
  9. export const getSignInRecordPage = async (params) => {
  10. return await request.get({ url: `/point/sign-in-record/page`, params })
  11. }
  12. // 查询用户签到积分详情
  13. export const getSignInRecord = async (id: number) => {
  14. return await request.get({ url: `/point/sign-in-record/get?id=` + id })
  15. }
  16. // 新增用户签到积分
  17. export const createSignInRecord = async (data: SignInRecordVO) => {
  18. return await request.post({ url: `/point/sign-in-record/create`, data })
  19. }
  20. // 修改用户签到积分
  21. export const updateSignInRecord = async (data: SignInRecordVO) => {
  22. return await request.put({ url: `/point/sign-in-record/update`, data })
  23. }
  24. // 删除用户签到积分
  25. export const deleteSignInRecord = async (id: number) => {
  26. return await request.delete({ url: `/point/sign-in-record/delete?id=` + id })
  27. }
  28. // 导出用户签到积分 Excel
  29. export const exportSignInRecord = async (params) => {
  30. return await request.download({ url: `/point/sign-in-record/export-excel`, params })
  31. }