问题修复
This commit is contained in:
@@ -177,3 +177,40 @@ func (p *purchase) Cancel(ctx context.Context, purchaseId int64) (err error) {
|
||||
err = xClient.Call(ctx, "Cancel", purchaseId, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsPurchaseHistory struct {
|
||||
Page bean.Page
|
||||
Search PurchaseHistorySearch
|
||||
}
|
||||
type PurchaseHistorySearch struct {
|
||||
ProductId int64 // 产品id
|
||||
}
|
||||
type ReplyPurchaseHistory struct {
|
||||
List []PurchaseHistoryItem `json:"list"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
type PurchaseHistoryItem struct {
|
||||
PurchaseId int64 `json:"purchaseId"`
|
||||
PiSerial string `json:"piSerial"`
|
||||
OrderDate time.Time `json:"orderDate"`
|
||||
FactorySerial string `json:"factorySerial"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
PurchasePrice decimal.Decimal `json:"purchasePrice"`
|
||||
PurchaseCount int64 `json:"purchaseCount"`
|
||||
PurchaseAmount decimal.Decimal `json:"purchaseAmount"`
|
||||
PurchaseCurrency string `json:"purchaseCurrency"`
|
||||
PurchaseCurrencyName string `json:"purchaseCurrencyName"`
|
||||
PurchaseCurrencySymbol string `json:"purchaseCurrencySymbol"`
|
||||
PurchaseCurrencyRate decimal.Decimal `json:"purchaseCurrencyRate"`
|
||||
CreatedStaffId int64 `json:"createdStaffId"`
|
||||
}
|
||||
|
||||
// History @TITLE 历史记录
|
||||
func (p *purchase) History(ctx context.Context, args ArgsPurchaseHistory) (reply ReplyPurchaseHistory, err error) {
|
||||
xClient, err := client.GetClient(p)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "History", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user