This commit is contained in:
邹宗楠
2026-06-24 09:35:00 +08:00
parent 26aa372c2d
commit c4717ecec7
3 changed files with 7 additions and 8 deletions

View File

@@ -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
}

View File

@@ -932,7 +932,7 @@ func BathUpdateInvoiceSetting(baiDuStoreId string, setting *ebaiapi.StoreInvoice
}
// QueryUnansweredInvoice 查询门店未回复发票信息
func QueryUnansweredInvoice(baiDuStoreId string, jxStoreId int) (*ebaiapi.QueryUnansweredInvoiceResult, error) {
func QueryUnansweredInvoice(baiDuStoreId string, jxStoreId int) (*ebaiapi.QueryUnansweredInvoiceResult2, error) {
var db = dao.GetDB()
unansweredList, err := api.EbaiAPI.QueryUnansweredInvoice(baiDuStoreId)
if err != nil {
@@ -950,7 +950,7 @@ func QueryUnansweredInvoice(baiDuStoreId string, jxStoreId int) (*ebaiapi.QueryU
invoiceDataMap[unansweredList.RecordList[i].ApplicationNo].Status = model.InvoiceStatusInit
dao.UpdateEntity(db, invoiceDataMap[unansweredList.RecordList[i].ApplicationNo], "Status")
} else {
invoiceObj := model.InvoiceMsg{
invoiceObj := &model.InvoiceMsg{
ModelIDCUL: model.ModelIDCUL{},
OrderId: utils.Int64ToStr(unansweredList.RecordList[i].OrderList[0].OrderId),
StoreID: utils.Str2Int(unansweredList.RecordList[i].ShopId),