1
This commit is contained in:
@@ -47,15 +47,15 @@ func (p *PurchaseHandler) InvoiceApply(msg *ebaiapi.CallbackMsg) (response *ebai
|
||||
if err := utils.Map2StructByJson(msg.Body, invoice, false); err != nil {
|
||||
return api.EbaiAPI.Err2CallbackResponse(msg.Cmd, err, msg.Cmd)
|
||||
}
|
||||
orderId = utils.Int64ToStr(invoice.OrderList[0].OrderId)
|
||||
invoiceData, _ := dao.GetInvoiceInfo(db, utils.Int64ToStr(invoice.OrderList[0].OrderId))
|
||||
orderId = invoice.OrderList[0].OrderId
|
||||
invoiceData, _ := dao.GetInvoiceInfo(db, orderId)
|
||||
applyNo = invoice.ApplicationNo
|
||||
storeId = invoice.ShopId
|
||||
vendorStoreId = invoice.BaiduShopId
|
||||
if invoiceData == nil {
|
||||
invoiceObj := model.InvoiceMsg{
|
||||
invoiceObj := &model.InvoiceMsg{
|
||||
ModelIDCUL: model.ModelIDCUL{},
|
||||
OrderId: utils.Int64ToStr(invoice.OrderList[0].OrderId),
|
||||
OrderId: orderId,
|
||||
StoreID: utils.Str2Int(invoice.ShopId),
|
||||
VendorID: model.VendorIDEBAI,
|
||||
InvoiceTaskId: invoice.ApplicationNo,
|
||||
@@ -74,7 +74,7 @@ func (p *PurchaseHandler) InvoiceApply(msg *ebaiapi.CallbackMsg) (response *ebai
|
||||
InvoiceId: "",
|
||||
}
|
||||
if len(invoice.OrderList) > 1 {
|
||||
orderList := make(map[int64]float64, 0)
|
||||
orderList := make(map[string]float64, 0)
|
||||
for _, v := range invoice.OrderList {
|
||||
orderList[v.OrderId] = v.InvoiceAmount
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user