feat: add

This commit is contained in:
fuzhongyun 2025-11-24 09:47:23 +08:00
parent a8cfb118fe
commit baff6ef573
1 changed files with 44 additions and 51 deletions

View File

@ -61,26 +61,25 @@ type ZltxOrderAfterSaleSupplierRequest struct {
} }
type ZltxOrderAfterSaleSupplierResponse struct { type ZltxOrderAfterSaleSupplierResponse struct {
Code int `json:"code"` Code int `json:"code"`
Msg string `json:"msg"` Msg string `json:"msg"`
Data []CheckResult2 `json:"data"` Data []ZltxOrderAfterSaleSupplierData `json:"data"`
} }
type CheckResult2 struct { type ZltxOrderAfterSaleSupplierData struct {
OrderType int `json:"orderType"` SerialNumber string `json:"serialNumber"`
OrderNumber string `json:"orderNumber"` PlatformName string `json:"platformName"`
OrderAmount float64 `json:"orderAmount"` SignCompany int `json:"signCompany"`
OrderPrice float64 `json:"orderPrice"` PlatformProductName string `json:"platformProductName"`
SignCompany int `json:"signCompany"` PlatformPrice float64 `json:"platformPrice"`
OrderQuantity int `json:"orderQuantity"` TerminalAccount string `json:"terminalAccount"`
ResellerID int `json:"resellerId"` Status int `json:"status"`
ResellerName string `json:"resellerName"` PlatformProductID int `json:"platformProductId"`
OurProductID int `json:"ourProductId"` PlatformID int `json:"platformId"`
OurProductTitle string `json:"ourProductTitle"` SignCompanyName string `json:"signCompanyName"`
Account []string `json:"account"` ExecuteTime int `json:"executeTime"`
Platforms struct { AfterSalesReason string `json:"afterSalesReason"`
Num4 string `json:"4"` AfterSalesPrice float64 `json:"afterSalesPrice"`
} `json:"platforms"`
} }
func (t *ZltxOrderAfterSaleSupplierTool) Execute(ctx context.Context, requireData *entitys.RequireData) error { func (t *ZltxOrderAfterSaleSupplierTool) Execute(ctx context.Context, requireData *entitys.RequireData) error {
@ -121,42 +120,36 @@ func (t *ZltxOrderAfterSaleSupplierTool) checkZltxOrderAfterSaleSupplier(orderNu
resp := ZltxOrderAfterSaleSupplierResponse{ resp := ZltxOrderAfterSaleSupplierResponse{
Code: 0, Code: 0,
Msg: "success", Msg: "success",
Data: []CheckResult2{ Data: []ZltxOrderAfterSaleSupplierData{
{ {
OrderType: 1, SerialNumber: "123456",
OrderNumber: orderNumber, PlatformName: "测试平台",
OrderAmount: 100, SignCompany: 1,
OrderPrice: 100, PlatformProductName: "测试商品",
SignCompany: 1, PlatformPrice: 100,
OrderQuantity: 1, TerminalAccount: "123456",
ResellerID: 1, Status: 1,
ResellerName: "测试", PlatformProductID: 1,
OurProductID: 1, PlatformID: 1,
OurProductTitle: "测试", SignCompanyName: "测试公司",
Account: []string{"123456"}, ExecuteTime: 1694560000,
Platforms: struct { AfterSalesReason: "测试售后",
Num4 string `json:"4"` AfterSalesPrice: 50,
}{
Num4: "123456",
},
}, },
{ {
OrderType: 2, SerialNumber: "123457",
OrderNumber: orderNumber, PlatformName: "测试平台2",
OrderAmount: 100, SignCompany: 1,
OrderPrice: 100, PlatformProductName: "测试商品2",
SignCompany: 1, PlatformPrice: 100,
OrderQuantity: 1, TerminalAccount: "123456",
ResellerID: 1, Status: 1,
ResellerName: "测试", PlatformProductID: 1,
OurProductID: 1, PlatformID: 1,
OurProductTitle: "测试", SignCompanyName: "测试公司2",
Account: []string{"123456"}, ExecuteTime: 1694570000,
Platforms: struct { AfterSalesReason: "测试售后2",
Num4 string `json:"4"` AfterSalesPrice: 30,
}{
Num4: "123456",
},
}, },
}, },
} }