new product
This commit is contained in:
parent
b70b7abcda
commit
7c590a206a
@ -199,6 +199,7 @@ var productProcessors = map[string]func(*QueryServiceLogic, *types.QueryServiceR
|
|||||||
"toc_IDCardLocation": (*QueryServiceLogic).ProcessTocIDCardLocationLogic, // 身份证归属地
|
"toc_IDCardLocation": (*QueryServiceLogic).ProcessTocIDCardLocationLogic, // 身份证归属地
|
||||||
"toc_DebtRepayStress": (*QueryServiceLogic).ProcessTocDebtRepayStressLogic, // 偿贷压力
|
"toc_DebtRepayStress": (*QueryServiceLogic).ProcessTocDebtRepayStressLogic, // 偿贷压力
|
||||||
"toc_EducationInfo": (*QueryServiceLogic).ProcessTocEducationInfoLogic, // 学历信息查询
|
"toc_EducationInfo": (*QueryServiceLogic).ProcessTocEducationInfoLogic, // 学历信息查询
|
||||||
|
"toc_PersonEnterprisePro": (*QueryServiceLogic).ProcessTocPersonEnterpriseProLogic, // 企业法人
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *QueryServiceLogic) PreprocessLogic(req *types.QueryServiceReq, product string) (*types.QueryServiceResp, error) {
|
func (l *QueryServiceLogic) PreprocessLogic(req *types.QueryServiceReq, product string) (*types.QueryServiceResp, error) {
|
||||||
@ -2014,3 +2015,45 @@ func (l *QueryServiceLogic) ProcessTocEducationInfoLogic(req *types.QueryService
|
|||||||
|
|
||||||
return &types.QueryServiceResp{Id: cacheNo}, nil
|
return &types.QueryServiceResp{Id: cacheNo}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ProcessTocPersonEnterpriseProLogic 人企关系加强版
|
||||||
|
func (l *QueryServiceLogic) ProcessTocPersonEnterpriseProLogic(req *types.QueryServiceReq) (*types.QueryServiceResp, error) {
|
||||||
|
userID, getUidErr := ctxdata.GetUidFromCtx(l.ctx)
|
||||||
|
if getUidErr != nil {
|
||||||
|
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "查询服务, 获取用户信息失败, %+v", getUidErr)
|
||||||
|
}
|
||||||
|
|
||||||
|
// AES解密
|
||||||
|
decryptData, DecryptDataErr := l.DecryptData(req.Data)
|
||||||
|
if DecryptDataErr != nil {
|
||||||
|
return nil, DecryptDataErr
|
||||||
|
}
|
||||||
|
|
||||||
|
// 校验参数
|
||||||
|
var data types.TocPersonEnterprisePro
|
||||||
|
if unmarshalErr := json.Unmarshal(decryptData, &data); unmarshalErr != nil {
|
||||||
|
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "查询服务, 解密后的数据格式不正确: %+v", unmarshalErr)
|
||||||
|
}
|
||||||
|
|
||||||
|
if validatorErr := validator.Validate(data); validatorErr != nil {
|
||||||
|
return nil, errors.Wrapf(xerr.NewErrCodeMsg(xerr.PARAM_VERIFICATION_ERROR, validatorErr.Error()), "查询服务, 参数不正确: %+v", validatorErr)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 验证二要素
|
||||||
|
if verifyErr := l.VerifyTwoFactors(data.Name, data.IDCard); verifyErr != nil {
|
||||||
|
return nil, verifyErr
|
||||||
|
}
|
||||||
|
|
||||||
|
params := map[string]interface{}{
|
||||||
|
"name": data.Name,
|
||||||
|
"id_card": data.IDCard,
|
||||||
|
"mobile": data.Mobile,
|
||||||
|
}
|
||||||
|
cacheNo, cacheDataErr := l.CacheData(params, "toc_PersonEnterprisePro", userID)
|
||||||
|
if cacheDataErr != nil {
|
||||||
|
return nil, cacheDataErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return &types.QueryServiceResp{Id: cacheNo}, nil
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -2540,7 +2540,6 @@ func (a *ApiRequestService) ProcessG11BJ06Request(ctx context.Context, params []
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
func (a *ApiRequestService) ProcessG29BJ05Request(ctx context.Context, params []byte) (*APIInternalResult, error) {
|
func (a *ApiRequestService) ProcessG29BJ05Request(ctx context.Context, params []byte) (*APIInternalResult, error) {
|
||||||
|
|
||||||
idCard := gjson.GetBytes(params, "id_card")
|
idCard := gjson.GetBytes(params, "id_card")
|
||||||
name := gjson.GetBytes(params, "name")
|
name := gjson.GetBytes(params, "name")
|
||||||
mobile := gjson.GetBytes(params, "mobile")
|
mobile := gjson.GetBytes(params, "mobile")
|
||||||
|
@ -200,3 +200,10 @@ type TocEducationInfo struct {
|
|||||||
Name string `json:"name" validate:"required,name"`
|
Name string `json:"name" validate:"required,name"`
|
||||||
IDCard string `json:"id_card" validate:"required,idCard"`
|
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 人企关系加强版
|
||||||
|
type TocPersonEnterprisePro struct {
|
||||||
|
Name string `json:"name" validate:"required,name"`
|
||||||
|
IDCard string `json:"id_card" validate:"required,idCard"`
|
||||||
|
Mobile string `json:"mobile" validate:"required,mobile"`
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user