index.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import request from '@/config/axios'
  2. export interface AppVO {
  3. id: number
  4. name: string
  5. status: number
  6. remark: string
  7. payNotifyUrl: string
  8. refundNotifyUrl: string
  9. merchantId: number
  10. merchantName: string
  11. createTime: Date
  12. }
  13. export interface AppPageReqVO extends PageParam {
  14. name?: string
  15. status?: number
  16. remark?: string
  17. payNotifyUrl?: string
  18. refundNotifyUrl?: string
  19. merchantName?: string
  20. createTime?: Date[]
  21. }
  22. export interface AppExportReqVO {
  23. name?: string
  24. status?: number
  25. remark?: string
  26. payNotifyUrl?: string
  27. refundNotifyUrl?: string
  28. merchantName?: string
  29. createTime?: Date[]
  30. }
  31. export interface AppUpdateStatusReqVO {
  32. id: number
  33. status: number
  34. }
  35. // 查询列表支付应用
  36. export const getAppPageApi = (params: AppPageReqVO) => {
  37. return request.get({ url: '/pay/app/page', params })
  38. }
  39. // 查询详情支付应用
  40. export const getAppApi = (id: number) => {
  41. return request.get({ url: '/pay/app/get?id=' + id })
  42. }
  43. // 新增支付应用
  44. export const createAppApi = (data: AppVO) => {
  45. return request.post({ url: '/pay/app/create', data })
  46. }
  47. // 修改支付应用
  48. export const updateAppApi = (data: AppVO) => {
  49. return request.put({ url: '/pay/app/update', data })
  50. }
  51. // 支付应用信息状态修改
  52. export const changeAppStatusApi = (data: AppUpdateStatusReqVO) => {
  53. return request.put({ url: '/pay/app/update-status', data: data })
  54. }
  55. // 删除支付应用
  56. export const deleteAppApi = (id: number) => {
  57. return request.delete({ url: '/pay/app/delete?id=' + id })
  58. }
  59. // 导出支付应用
  60. export const exportAppApi = (params: AppExportReqVO) => {
  61. return request.download({ url: '/pay/app/export-excel', params })
  62. }
  63. // 根据商ID称搜索应用列表
  64. export const getAppListByMerchantIdApi = (merchantId: number) => {
  65. return request.get({ url: '/pay/app/list-merchant-id', params: { merchantId: merchantId } })
  66. }