refactor(shipment): 修改Gen方法返回值类型
- 将Gen方法的返回值从error修改为(mixedId int64, err error) - 更新错误处理逻辑以返回新的返回值结构 - 修改客户端调用方式以适配新的返回值格式
This commit is contained in:
@@ -49,11 +49,11 @@ type ArgsMixedGen struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Gen @TITLE 生成
|
// Gen @TITLE 生成
|
||||||
func (m *mixed) Gen(ctx context.Context, args ArgsMixedGen) error {
|
func (m *mixed) Gen(ctx context.Context, args ArgsMixedGen) (mixedId int64, err error) {
|
||||||
xClient, err := client.GetClient(m)
|
xClient, err := client.GetClient(m)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return mixedId, err
|
||||||
}
|
}
|
||||||
reply := 0
|
err = xClient.Call(ctx, "Gen", args, &mixedId)
|
||||||
return xClient.Call(ctx, "Gen", args, &reply)
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user