Compare commits
No commits in common. "4497e30a50b5fbb3a37f90c340417e813a6f5a0e" and "1b423fc5098062b437ce6d81e4b530421a1cab7e" have entirely different histories.
4497e30a50
...
1b423fc509
|
|
@ -4,4 +4,7 @@ type BotTools string
|
|||
|
||||
const (
|
||||
BotToolsBugOptimizationSubmit = "bug_optimization_submit" // 系统的bug/优化建议
|
||||
BotToolsAfterSalesSupplier = "after_sales_supplier" // 供应商售后
|
||||
BotToolsAfterSalesResellerSingle = "after_sales_reseller_single" // 分销商单条售后
|
||||
BotToolsAfterSalesResellerBatch = "after_sales_reseller_batch" // 分销商批量售后
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import (
|
|||
"ai_scheduler/internal/entitys"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type ZltxOrderAfterSaleResellerTool struct {
|
||||
|
|
@ -43,7 +44,7 @@ func (t *ZltxOrderAfterSaleResellerTool) Definition() entitys.ToolDefinition {
|
|||
"description": "售后订单号",
|
||||
},
|
||||
},
|
||||
// "required": []string{"orderType", "orderNumber"},
|
||||
"required": []string{"orderType", "orderNumber"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -91,9 +92,9 @@ func (t *ZltxOrderAfterSaleResellerTool) Execute(ctx context.Context, requireDat
|
|||
if err := json.Unmarshal([]byte(requireData.Match.Parameters), &req); err != nil {
|
||||
return err
|
||||
}
|
||||
// if req.OrderNumber == "" {
|
||||
// return fmt.Errorf("orderType and orderNumber are required")
|
||||
// }
|
||||
if req.OrderNumber == "" {
|
||||
return fmt.Errorf("orderType and orderNumber are required")
|
||||
}
|
||||
return t.checkZltxOrderAfterSaleReseller(req.OrderNumber, requireData)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import (
|
|||
"ai_scheduler/internal/entitys"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type ZltxOrderAfterSaleSupplierTool struct {
|
||||
|
|
@ -43,7 +44,7 @@ func (t *ZltxOrderAfterSaleSupplierTool) Definition() entitys.ToolDefinition {
|
|||
"description": "售后订单号",
|
||||
},
|
||||
},
|
||||
// "required": []string{"orderType", "orderNumber"},
|
||||
"required": []string{"orderType", "orderNumber"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -88,9 +89,9 @@ func (t *ZltxOrderAfterSaleSupplierTool) Execute(ctx context.Context, requireDat
|
|||
if err := json.Unmarshal([]byte(requireData.Match.Parameters), &req); err != nil {
|
||||
return err
|
||||
}
|
||||
// if req.OrderNumber == "" {
|
||||
// return fmt.Errorf("orderType and orderNumber are required")
|
||||
// }
|
||||
if req.OrderNumber == "" {
|
||||
return fmt.Errorf("orderType and orderNumber are required")
|
||||
}
|
||||
return t.checkZltxOrderAfterSaleSupplier(req.OrderNumber, requireData)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue