This commit is contained in:
2024-09-20 14:51:43 +08:00
parent aafd4150c3
commit 57d59b3fbe
9 changed files with 274 additions and 34 deletions

View File

@@ -10,20 +10,21 @@ type annotations struct {
}
type AnnotationsItem struct {
Id int64 `json:"id"`
Sort int64 `json:"sort"`
Value string `json:"value"`
CreatedAt *time.Time `json:"createdAt"`
UpdatedAt *time.Time `json:"updatedAt"`
Id int64 `json:"id"`
PurchaseId int64 `json:"purchaseId"`
Sort int64 `json:"sort"`
Value string `json:"value"`
CreatedAt *time.Time `json:"createdAt"`
UpdatedAt *time.Time `json:"updatedAt"`
}
// All @TITLE 获取附注
func (a *annotations) All(ctx context.Context, purchaseId int64) (reply []AnnotationsItem, err error) {
func (a *annotations) All(ctx context.Context, purchaseIds []int64) (reply []AnnotationsItem, err error) {
xClient, err := client.GetClient(a)
if err != nil {
return
}
err = xClient.Call(ctx, "All", purchaseId, &reply)
err = xClient.Call(ctx, "All", purchaseIds, &reply)
return
}

View File

@@ -10,21 +10,22 @@ type clause struct {
}
type ClauseItem struct {
Id int64 `json:"id"`
Sort int64 `json:"sort"`
Key string `json:"key"`
Value string `json:"value"`
CreatedAt *time.Time `json:"createdAt"`
UpdatedAt *time.Time `json:"updatedAt"`
Id int64 `json:"id"`
PurchaseId int64 `json:"purchaseId"`
Sort int64 `json:"sort"`
Key string `json:"key"`
Value string `json:"value"`
CreatedAt *time.Time `json:"createdAt"`
UpdatedAt *time.Time `json:"updatedAt"`
}
// All @TITLE 获取条款
func (c *clause) All(ctx context.Context, purchaseId int64) (reply []ClauseItem, err error) {
func (c *clause) All(ctx context.Context, purchaseIds []int64) (reply []ClauseItem, err error) {
xClient, err := client.GetClient(c)
if err != nil {
return
}
err = xClient.Call(ctx, "All", purchaseId, &reply)
err = xClient.Call(ctx, "All", purchaseIds, &reply)
return
}