- handle jd partial failed.
This commit is contained in:
@@ -43,6 +43,8 @@ const (
|
||||
ResponseInnerCodeOrderAlreadyPickedUp = "10132"
|
||||
ResponseInnerCodeOrderCanceled = "10138"
|
||||
ResponseInnerCodeOrderLocked = "10139"
|
||||
|
||||
ResponseInnerCodePartialFailed = "190005"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -213,7 +215,11 @@ func genNoPageResultParser(codeKey, msgKey, resultKey, okCode string) func(data
|
||||
return nil, nil
|
||||
}
|
||||
if msg, ok := data[msgKey]; ok {
|
||||
return nil, utils.NewErrorCode(msg.(string), innerCode, 1)
|
||||
errMsg := msg.(string)
|
||||
if innerCode == ResponseInnerCodePartialFailed {
|
||||
errMsg += ", " + utils.Format4Output(data[resultKey], true)
|
||||
}
|
||||
return nil, utils.NewErrorCode(errMsg, innerCode, 1)
|
||||
}
|
||||
panic(fmt.Sprintf("genNoPageResultParser msgKey %s can not be found in result:%v", msgKey, data))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user