feat(cost): 修改成本添加接口返回结构
- 添加 ReplyCostAdd 结构体定义,包含 CostId 字段 - 修改 Add 方法返回值,从无返回改为返回 ReplyCostAdd 结构 - 更新方法实现以正确处理新返回结构 - 保持原有的客户端调用逻辑不变
This commit is contained in:
@@ -54,15 +54,18 @@ type ArgsCostAdd struct {
|
|||||||
Remarks string // 备注
|
Remarks string // 备注
|
||||||
InvoiceSerial string // 发票号
|
InvoiceSerial string // 发票号
|
||||||
}
|
}
|
||||||
|
type ReplyCostAdd struct {
|
||||||
|
CostId int64 `json:"costId"`
|
||||||
|
}
|
||||||
|
|
||||||
// Add @TITLE 添加
|
// Add @TITLE 添加
|
||||||
func (c *cost) Add(ctx context.Context, args ArgsCostAdd) (err error) {
|
func (c *cost) Add(ctx context.Context, args ArgsCostAdd) (reply ReplyCostAdd, err error) {
|
||||||
xClient, err := client.GetClient(c)
|
xClient, err := client.GetClient(c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
reply := 0
|
err = xClient.Call(ctx, "Add", args, &reply)
|
||||||
return xClient.Call(ctx, "Add", args, &reply)
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
type ArgsCostEdit struct {
|
type ArgsCostEdit struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user