jdim测试
This commit is contained in:
@@ -249,15 +249,17 @@ func (c *DjswController) OrderInvoice() {
|
||||
func (c *DjswController) imMsg() {
|
||||
if c.Ctx.Input.Method() == http.MethodPost {
|
||||
var callbackResponse *jdapi.CallbackResponse
|
||||
|
||||
msg, url, err := jdapi.ImChatRiskMsg(getUsefulRequest(c.Ctx))
|
||||
if err != nil {
|
||||
callbackResponse = jdapi.Err2CallbackResponse(err, "")
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("-----url := %s", url)
|
||||
globals.SugarLogger.Debugf("-----msg := %s", string(msg))
|
||||
callbackResponse = jdapi.Err2CallbackResponse(im.ReadMsgFromVendor(model.VendorIDJD, url, msg), "")
|
||||
callbackResponse = jdapi.Err2CallbackResponse(nil, "")
|
||||
var base *jdapi.BaseInfo
|
||||
if utils.Map2StructByJson(msg, &base, false); err == nil {
|
||||
globals.SugarLogger.Debugf("-----url := %s", url)
|
||||
globals.SugarLogger.Debugf("-----msg := %s", utils.Format4Output(msg, false))
|
||||
callbackResponse = jdapi.Err2CallbackResponse(im.ReadMsgFromVendor(model.VendorIDJD, url, []byte(base.JdParamJson)), "")
|
||||
callbackResponse = jdapi.Err2CallbackResponse(nil, "")
|
||||
}
|
||||
}
|
||||
c.Data["json"] = c.transferResponse("orderStatus", callbackResponse)
|
||||
c.ServeJSON()
|
||||
|
||||
Reference in New Issue
Block a user