From d9ad631a286b5b5eb352dd4f813058f6442a059b Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 22 May 2025 15:06:54 +0800 Subject: [PATCH] =?UTF-8?q?feat(sale):=20=E6=96=B0=E5=A2=9E=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E5=8D=95=E4=BA=A7=E5=93=81=E8=8E=B7=E5=8F=96=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 change包和相关结构体 - 实现 All 方法以获取变更单产品信息 - 集成客户端调用,确保功能完整 --- erp/sale/change.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 erp/sale/change.go diff --git a/erp/sale/change.go b/erp/sale/change.go new file mode 100644 index 0000000..e872b43 --- /dev/null +++ b/erp/sale/change.go @@ -0,0 +1,32 @@ +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 +}