feat(cost): 修改成本添加接口返回结构

- 添加 ReplyCostAdd 结构体定义,包含 CostId 字段
- 修改 Add 方法返回值,从无返回改为返回 ReplyCostAdd 结构
- 更新方法实现以正确处理新返回结构
- 保持原有的客户端调用逻辑不变
This commit is contained in:
2026-03-04 14:47:49 +08:00
parent e20507aaee
commit 57d6339bee

View File

@@ -54,15 +54,18 @@ type ArgsCostAdd struct {
Remarks string // 备注
InvoiceSerial string // 发票号
}
type ReplyCostAdd struct {
CostId int64 `json:"costId"`
}
// 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)
if err != nil {
return
}
reply := 0
return xClient.Call(ctx, "Add", args, &reply)
err = xClient.Call(ctx, "Add", args, &reply)
return
}
type ArgsCostEdit struct {