1
This commit is contained in:
@@ -229,6 +229,21 @@ func (c *DjswController) OrderInfoChange() {
|
||||
}
|
||||
}
|
||||
|
||||
// ApplyOrderInvoiceStatus 发票申请
|
||||
func (c *DjswController) ApplyOrderInvoiceStatus() {
|
||||
if c.Ctx.Input.Method() == http.MethodPost {
|
||||
callbackResponse := c.handleMsg(func(a *jdapi.API, obj interface{}) (callbackResponse *jdapi.CallbackResponse) {
|
||||
callbackResponse = jd.OnInvoiceMsg(obj.(*jdapi.CallbackInvoiceMsg))
|
||||
return callbackResponse
|
||||
})
|
||||
callbackResponse = jdapi.Err2CallbackResponse(nil, "")
|
||||
c.Data["json"] = c.transferResponse("StoreCrud", callbackResponse)
|
||||
c.ServeJSON()
|
||||
} else {
|
||||
c.Abort("404")
|
||||
}
|
||||
}
|
||||
|
||||
//免费开卡接不到回调
|
||||
//func (c *DjswController) MemberCreateCard() {
|
||||
// if c.Ctx.Input.Method() == http.MethodPost {
|
||||
|
||||
@@ -1527,6 +1527,7 @@ func (c *OrderController) GetInvoiceRecord() {
|
||||
// @Param orderId formData string true "订单ID"
|
||||
// @Param invoiceUrl formData string true "发票地址[10M内pdf/png/jpeg/jpg]"
|
||||
// @Param invoiceId formData string true "发票号码"
|
||||
// @Param imgBase64 formData string false "京东发票pdf二进制文件流"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /UploadOrderInvoice [post]
|
||||
@@ -1542,7 +1543,7 @@ func (c *OrderController) UploadOrderInvoice() {
|
||||
invoice.InvoiceUrl = params.InvoiceUrl
|
||||
invoice.InvoiceId = params.InvoiceId
|
||||
handler, _ := partner.GetPurchasePlatformFromVendorID(invoice.VendorID).(partner.IPurchasePlatformStoreSkuHandler)
|
||||
success, _, err := handler.UploadInvoice(invoice)
|
||||
success, _, err := handler.UploadInvoice(invoice, params.ImgBase64)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
@@ -1555,6 +1556,7 @@ func (c *OrderController) UploadOrderInvoice() {
|
||||
invoice.Status = model.InvoiceStatusBillingSuccess
|
||||
}
|
||||
}
|
||||
case model.VendorIDJD:
|
||||
|
||||
}
|
||||
dao.UpdateEntity(db, invoice, "InvoiceUrl", "InvoiceId", "Status")
|
||||
|
||||
@@ -154,8 +154,6 @@ func (c *MtwmController) Invoice() {
|
||||
return
|
||||
}
|
||||
|
||||
//ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "MtwmController发票推送", utils.Format4Output(msg, false))
|
||||
globals.SugarLogger.Debugf("-----Invoice:data %s", utils.Format4Output(msg, false))
|
||||
data := &mtwmapi.InvoiceCallback{}
|
||||
utils.Map2StructByJson(utils.URLValues2Map(msg.FormData), data, false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user