- 添加空JD回调消息

This commit is contained in:
gazebo
2019-05-08 21:49:48 +08:00
parent f1e90240dc
commit eeb91c0724
5 changed files with 95 additions and 35 deletions

View File

@@ -158,30 +158,52 @@ func (c *DjswController) transferResponse(inCallbackResponse *jdapi.CallbackResp
return inCallbackResponse
}
func (c *DjswController) afterSaleBillStatus() {
func (c *DjswController) EndOrderFinance() {
c.nullOperation()
}
func (c *DjswController) FinanceAdjustment() {
c.nullOperation()
}
func (c *DjswController) DeliveryCarrierModify() {
c.nullOperation()
}
func (c *DjswController) NewApplyAfterSaleBill() {
c.nullOperation()
}
func (c *DjswController) UpdateApplyAfterSaleBill() {
c.nullOperation()
}
func (c *DjswController) NewAfterSaleBill() {
c.nullOperation()
}
func (c *DjswController) AfterSaleBillStatus() {
// c.orderStatus(false)
c.OrderAccounting()
}
func (c *DjswController) OrderAccounting() {
var obj *jdapi.CallbackOrderMsg
var callbackResponse *jdapi.CallbackResponse
obj, callbackResponse = api.JdAPI.GetOrderCallbackMsg(getUsefulRequest(c.Ctx))
if callbackResponse == nil {
callbackResponse = jd.OnAfterSaleMsg(obj)
callbackResponse = jd.OnFinancialMsg2(obj)
}
c.Data["json"] = c.transferResponse(callbackResponse)
c.ServeJSON()
}
// func (c *DjswController) NewAfterSaleBill() {
// c.afterSaleBillStatus()
// }
func (c *DjswController) AfterSaleBillStatus() {
c.afterSaleBillStatus()
}
func (c *DjswController) OrderAccounting() {
c.afterSaleBillStatus()
}
func getUsefulRequest(ctx *context.Context) *http.Request {
ctx.Request.Body = ioutil.NopCloser(bytes.NewReader(ctx.Input.RequestBody))
return ctx.Request
}
func (c *DjswController) nullOperation() {
c.Data["json"] = c.transferResponse(nil)
c.ServeJSON()
}