优化和平小店兑换记录查询
This commit is contained in:
@@ -307,10 +307,13 @@ type xiaodianOrderList struct {
|
||||
}
|
||||
|
||||
type xiaodianOrder struct {
|
||||
BuyTime string `json:"dtBuyTime"`
|
||||
PayTime string `json:"dtPayTime"`
|
||||
Status string `json:"iStatus"`
|
||||
GoodsRaw string `json:"sGoodsInfo"`
|
||||
BuyTime string `json:"dtBuyTime"`
|
||||
PayTime string `json:"dtPayTime"`
|
||||
Status string `json:"iStatus"`
|
||||
Price xiaodianFlexibleString `json:"iPrice"`
|
||||
PayAmount xiaodianFlexibleString `json:"iPayAmount"`
|
||||
RoleName string `json:"sRoleName"`
|
||||
GoodsRaw string `json:"sGoodsInfo"`
|
||||
}
|
||||
|
||||
type xiaodianOrderGoods struct {
|
||||
@@ -896,10 +899,14 @@ func (c *DouyuClient) XiaodianExchangeList(cookie string) ([]types.XiaodianExcha
|
||||
}
|
||||
}
|
||||
for _, item := range goods.List {
|
||||
price := parseXiaodianInt(string(order.PayAmount))
|
||||
if strings.TrimSpace(string(order.PayAmount)) == "" {
|
||||
price = parseXiaodianInt(string(order.Price))
|
||||
}
|
||||
all = append(all, types.XiaodianExchangeRecord{
|
||||
CommodityID: item.GoodsID, CommodityName: item.GoodsName,
|
||||
Quantity: parseXiaodianInt(string(item.Quantity)), BuyTime: order.BuyTime,
|
||||
PayTime: order.PayTime, Status: order.Status,
|
||||
PayTime: order.PayTime, Price: price, RoleName: order.RoleName, Status: order.Status,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user