智慧食堂-队列消费项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

shipping_template.go 2.7 KiB

2 maanden geleden
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. package md
  2. //
  3. type MallShippingTemplateReq struct {
  4. MerchantId int `json:"merchant_id" label:"商家id"`
  5. Id int `json:"id" label:"not null pk autoincr INT(11)"`
  6. Name string `json:"name" label:"模板名称" binding:"required"`
  7. Data []MallShippingTemplateData `json:"data" label:"运费数据" binding:"required"`
  8. CalculateType int `json:"calculateType" label:"计费方式:1按重量 2按件数" binding:"required"`
  9. //云链额外字段
  10. CloudChainTemId string `json:"cloud_chain_tem_id"`
  11. }
  12. type MallShippingTemplateData struct {
  13. Regions []string `json:"region" label:"省/市/区(县)" label:"省市区的id"`
  14. AdditionalAmount string `json:"additionalAmount" label:"续件/续重"`
  15. AdditionalFee string `json:"additionalFee" label:"续费"`
  16. FirstAmount string `json:"firstAmount" label:"首件/首重"`
  17. FirstFee string `json:"firstFee" label:"运费"`
  18. }
  19. //
  20. type MallShippingTemplateListResp struct {
  21. Id int `json:"id" label:"not null pk autoincr INT(11)"`
  22. Name string `json:"name" label:"模板名称" binding:"required"`
  23. RegionRules RegionRule `json:"regionRules"`
  24. Data []MallShippingTemplateData `json:"data" label:"运费数据" binding:"required"`
  25. CalculateType int `json:"calculateType" label:"计费方式:1按重量 2按件数" binding:"required"`
  26. CreateTime string `json:"createTime"`
  27. }
  28. type RegionRule struct {
  29. City map[string]int `json:"city"`
  30. County map[string]int `json:"county"`
  31. Provice map[string]int `json:"provice"`
  32. }
  33. // 复制模板请求
  34. type CopyOrDelMallShippingTemplateReq struct {
  35. Id int `json:"id" binding:"required"`
  36. }
  37. // list
  38. type MallShippingTemplateListReq struct {
  39. MerchantId int `json:"merchantId"`
  40. Name string `json:"name"`
  41. CalculateType int `json:"calculateType"`
  42. P int `json:"page"`
  43. PSize int `json:"pSize"`
  44. }
  45. // 地区
  46. type Region struct {
  47. Index int `json:"index"`
  48. Part string `json:"part"`
  49. Provinces []*Province `json:"provinces"`
  50. }
  51. type Province struct {
  52. Cities []*City `json:"cities"`
  53. Name string `json:"name"`
  54. RegionID string `json:"regionId"`
  55. }
  56. type City struct {
  57. Counties []*County `json:"counties"`
  58. Name string `json:"name"`
  59. RegionID string `json:"regionId"`
  60. }
  61. type County struct {
  62. Name string `json:"name"`
  63. RegionID string `json:"regionId"`
  64. }
  65. type ShippingTemplateForGoodsList struct {
  66. ShippingTemplateId int `json:"shipping_template_id" label:"模板id"`
  67. Name string `json:"name" label:"模板名称"`
  68. }