fix
This commit is contained in:
@@ -540,12 +540,10 @@ func (a *ApiRequestService) ProcessPersonEnterpriseProRequest(params []byte) ([]
|
|||||||
func (a *ApiRequestService) ProcesFLXG0V4BRequest(params []byte) ([]byte, error) {
|
func (a *ApiRequestService) ProcesFLXG0V4BRequest(params []byte) ([]byte, error) {
|
||||||
name := gjson.GetBytes(params, "name")
|
name := gjson.GetBytes(params, "name")
|
||||||
idCard := gjson.GetBytes(params, "id_card")
|
idCard := gjson.GetBytes(params, "id_card")
|
||||||
mobile := gjson.GetBytes(params, "mobile")
|
|
||||||
if !name.Exists() || !idCard.Exists() {
|
if !name.Exists() || !idCard.Exists() {
|
||||||
return nil, errors.New("api请求, FLXG0V4B, 获取相关参数失败")
|
return nil, errors.New("api请求, FLXG0V4B, 获取相关参数失败")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
resp, err := a.tianyuanapi.CallInterface("FLXG0V4B", map[string]interface{}{
|
resp, err := a.tianyuanapi.CallInterface("FLXG0V4B", map[string]interface{}{
|
||||||
"name": name.String(),
|
"name": name.String(),
|
||||||
"id_card": idCard.String(),
|
"id_card": idCard.String(),
|
||||||
@@ -565,12 +563,12 @@ func (a *ApiRequestService) ProcesFLXG0V4BRequest(params []byte) ([]byte, error)
|
|||||||
// ProcessFLXG0687Request 反诈反赌核验
|
// ProcessFLXG0687Request 反诈反赌核验
|
||||||
func (a *ApiRequestService) ProcessFLXG0687Request(params []byte) ([]byte, error) {
|
func (a *ApiRequestService) ProcessFLXG0687Request(params []byte) ([]byte, error) {
|
||||||
idCard := gjson.GetBytes(params, "id_card")
|
idCard := gjson.GetBytes(params, "id_card")
|
||||||
if !idCard.Exists() {
|
if !idCard.Exists() {
|
||||||
return nil, errors.New("api请求, FLXG0687, 获取相关参数失败")
|
return nil, errors.New("api请求, FLXG0687, 获取相关参数失败")
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := a.tianyuanapi.CallInterface("FLXG0687", map[string]interface{}{
|
resp, err := a.tianyuanapi.CallInterface("FLXG0687", map[string]interface{}{
|
||||||
"id_card": idCard.String(),
|
"id_card": idCard.String(),
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -614,14 +612,6 @@ func (a *ApiRequestService) ProcessFLXG3D56Request(params []byte) ([]byte, error
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
respBytes, err := convertTianyuanResponse(resp)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
codeResult := gjson.GetBytes(respBytes, "code")
|
codeResult := gjson.GetBytes(respBytes, "code")
|
||||||
if !codeResult.Exists() {
|
if !codeResult.Exists() {
|
||||||
return nil, fmt.Errorf("code 字段不存在")
|
return nil, fmt.Errorf("code 字段不存在")
|
||||||
|
|||||||
Reference in New Issue
Block a user