sap.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package http
  2. import "kpt.xdmy/pkg/http"
  3. type Dest struct {
  4. DestID string `json:"DEST_ID"`
  5. BussTp string `json:"BUSS_TP"`
  6. MessID string `json:"MESS_ID"`
  7. Status string `json:"STATUS"`
  8. MessText string `json:"MESS_TEXT"`
  9. StatusOs string `json:"STATUS_OS"`
  10. Url string
  11. MESSIDOS string `json:"MESS_ID_OS"`
  12. BUSSDOCOS string `json:"BUSS_DOC_OS"`
  13. }
  14. type SapResp struct {
  15. Dest `json:"DEST"`
  16. Data SapRespMsg `json:"DATA"`
  17. }
  18. type SapRespMsg struct {
  19. Status string `json:"MSGTY"`
  20. Text string `json:"MSGTX"`
  21. ProofNumber string `json:"EXT01"`
  22. ProofYear string `json:"EXT02"`
  23. EqNumber string `json:"EXT03"`
  24. }
  25. var SapAuth *http.Auth
  26. type SapQueryReq struct {
  27. Dest Dest `json:"DEST"`
  28. Data SapQueryReqData `json:"DATA"`
  29. }
  30. type SapQueryReqData struct {
  31. }
  32. type SapDest interface {
  33. GetUrl() string
  34. GetName() string
  35. GetDest() *Dest
  36. }
  37. func (d *Dest) GetUrl() string {
  38. return d.Url
  39. }
  40. func (d *Dest) GetName() string {
  41. return d.BussTp
  42. }
  43. func (d *Dest) GetDest() *Dest {
  44. return d
  45. }
  46. type SrmResp struct {
  47. Success bool `json:"success"`
  48. Code string `json:"code"`
  49. Message string `json:"message"`
  50. }