index.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import request from '@/config/axios'
  2. export interface AppVO {
  3. id: number
  4. appKey: string
  5. name: string
  6. status: number
  7. remark: string
  8. payNotifyUrl: string
  9. refundNotifyUrl: string
  10. transferNotifyUrl: string
  11. merchantId: number
  12. merchantName: string
  13. createTime: Date
  14. }
  15. export interface AppPageReqVO extends PageParam {
  16. name?: string
  17. status?: number
  18. remark?: string
  19. payNotifyUrl?: string
  20. refundNotifyUrl?: string
  21. transferNotifyUrl?: string
  22. merchantName?: string
  23. createTime?: Date[]
  24. }
  25. export interface AppUpdateStatusReqVO {
  26. id: number
  27. status: number
  28. }
  29. // 查询列表支付应用
  30. export const getAppPage = (params: AppPageReqVO) => {
  31. return request.get({ url: '/pay/app/page', params })
  32. }
  33. // 查询详情支付应用
  34. export const getApp = (id: number) => {
  35. return request.get({ url: '/pay/app/get?id=' + id })
  36. }
  37. // 新增支付应用
  38. export const createApp = (data: AppVO) => {
  39. return request.post({ url: '/pay/app/create', data })
  40. }
  41. // 修改支付应用
  42. export const updateApp = (data: AppVO) => {
  43. return request.put({ url: '/pay/app/update', data })
  44. }
  45. // 支付应用信息状态修改
  46. export const changeAppStatus = (data: AppUpdateStatusReqVO) => {
  47. return request.put({ url: '/pay/app/update-status', data: data })
  48. }
  49. // 删除支付应用
  50. export const deleteApp = (id: number) => {
  51. return request.delete({ url: '/pay/app/delete?id=' + id })
  52. }
  53. // 获得支付应用列表
  54. export const getAppList = () => {
  55. return request.get({
  56. url: '/pay/app/list'
  57. })
  58. }