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