Compare commits

..

2 Commits

Author SHA1 Message Date
6e3c268b82 Merge branch 'main' of http://1.117.67.95:3000/team/tyc-server-v2 2026-03-02 16:51:15 +08:00
6b8e7eada6 f 2026-03-02 16:51:05 +08:00
3 changed files with 40 additions and 0 deletions

View File

@@ -62,6 +62,7 @@ var productHandlers = map[string]queryHandlerFunc{
"preloanbackgroundcheck": runMarriageReq, "preloanbackgroundcheck": runMarriageReq,
"backgroundcheck": runMarriageReq, "backgroundcheck": runMarriageReq,
"personalData": runMarriageReq, "personalData": runMarriageReq,
"toc_PersonalBadRecord": runPersonalBadRecordReq,
"toc_PersonalLawsuit": runMarriageReq, "toc_PersonalLawsuit": runMarriageReq,
"toc_EnterpriseLawsuit": runEntLawsuitReq, "toc_EnterpriseLawsuit": runEntLawsuitReq,
// 人企关系加强版:仅身份证号 // 人企关系加强版:仅身份证号
@@ -276,6 +277,21 @@ func runLimitHighExecutedReq(l *QueryServiceLogic, decryptData []byte, product s
}, nil }, nil
} }
// 本人不良 FLXGDEA9姓名 + 身份证(授权由 ApiRequest 默认传 1
func runPersonalBadRecordReq(l *QueryServiceLogic, decryptData []byte, product string) (map[string]interface{}, error) {
var data types.PersonalBadRecordReq
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)
}
return map[string]interface{}{
"name": data.Name,
"id_card": data.IDCard,
}, nil
}
// 失信被执行人 QYGL2S0W // 失信被执行人 QYGL2S0W
func runDishonestExecutedReq(l *QueryServiceLogic, decryptData []byte, product string) (map[string]interface{}, error) { func runDishonestExecutedReq(l *QueryServiceLogic, decryptData []byte, product string) (map[string]interface{}, error) {
var data types.DishonestExecutedReq var data types.DishonestExecutedReq

View File

@@ -269,6 +269,7 @@ var requestProcessors = map[string]func(*ApiRequestService, []byte) ([]byte, err
"QYGL66SL": (*ApiRequestService).ProcessQYGL66SLRequest, "QYGL66SL": (*ApiRequestService).ProcessQYGL66SLRequest,
"FLXG3A9B": (*ApiRequestService).ProcessFLXG3A9BRequest, "FLXG3A9B": (*ApiRequestService).ProcessFLXG3A9BRequest,
"QYGL2S0W": (*ApiRequestService).ProcessQYGL2S0WRequest, "QYGL2S0W": (*ApiRequestService).ProcessQYGL2S0WRequest,
"FLXGDEA9": (*ApiRequestService).ProcessFLXGDEA9Request,
} }
// PreprocessRequestApi 调用指定的请求处理函数 // PreprocessRequestApi 调用指定的请求处理函数
@@ -1505,6 +1506,23 @@ func (a *ApiRequestService) ProcessQYGL2S0WRequest(params []byte) ([]byte, error
return a.processVerifyPassThrough(params, "QYGL2S0W") return a.processVerifyPassThrough(params, "QYGL2S0W")
} }
// FLXGDEA9 本人不良
func (a *ApiRequestService) ProcessFLXGDEA9Request(params []byte) ([]byte, error) {
var m map[string]interface{}
if err := json.Unmarshal(params, &m); err != nil {
return nil, fmt.Errorf("api请求, FLXGDEA9, 解析参数失败: %w", err)
}
// 授权由后端默认传 1前端与查询服务不再感知 authorized
if v, ok := m["authorized"]; !ok || v == "" {
m["authorized"] = "1"
}
resp, err := a.tianyuanapi.CallInterface("FLXGDEA9", m)
if err != nil {
return nil, err
}
return convertTianyuanResponse(resp)
}
// buildVehicleBody 从 params 中取 required 与 optional 键,仅非空才写入 body // buildVehicleBody 从 params 中取 required 与 optional 键,仅非空才写入 body
func buildVehicleBody(params []byte, required, optional []string) map[string]interface{} { func buildVehicleBody(params []byte, required, optional []string) map[string]interface{} {
body := make(map[string]interface{}) body := make(map[string]interface{})

View File

@@ -85,6 +85,12 @@ type DishonestExecutedReq struct {
IDCard string `json:"id_card" validate:"required,idCard"` IDCard string `json:"id_card" validate:"required,idCard"`
} }
// PersonalBadRecord 本人不良FLXGDEA9姓名 + 身份证(授权由 ApiRequest 默认传 1
type PersonalBadRecordReq struct {
Name string `json:"name" validate:"required,name"`
IDCard string `json:"id_card" validate:"required,idCard"`
}
// TocPersonEnterprisePro 人企关系加强版预查询:仅身份证号 // TocPersonEnterprisePro 人企关系加强版预查询:仅身份证号
type TocPersonEnterpriseProReq struct { type TocPersonEnterpriseProReq struct {
IDCard string `json:"id_card" validate:"required,idCard"` IDCard string `json:"id_card" validate:"required,idCard"`