service/erp/sale/change.go
kanade d9ad631a28 feat(sale): 新增变更单产品获取功能
- 添加 change包和相关结构体
- 实现 All 方法以获取变更单产品信息
- 集成客户端调用,确保功能完整
2025-05-22 15:06:54 +08:00

33 lines
716 B
Go

package sale
import (
"context"
"git.kumo.work/shama/service/client"
"time"
)
type change struct {
}
type ArgsChangeAllSearch struct {
SaleId int64 // 销售合同id
WorkflowId int64 // 审核id
}
type ChangeProduct struct {
Id int64 `json:"id"`
SaleProductID int64 `json:"saleProductID"`
SaleCount int64 `json:"saleCount"`
CreatedAt *time.Time `json:"createdAt"`
UpdatedAt *time.Time `json:"updatedAt"`
}
// All @TITLE 获取产品
func (c *change) All(ctx context.Context, args ArgsChangeAllSearch) (reply []ChangeProduct, err error) {
xClient, err := client.GetClient(c)
if err != nil {
return
}
err = xClient.Call(ctx, "All", args, &reply)
return
}