f
This commit is contained in:
@@ -80,7 +80,8 @@ var productHandlers = map[string]queryHandlerFunc{
|
||||
"toc_VehiclesUnderName": runMarriageReq,
|
||||
"toc_VehiclesUnderNamePlate": runMarriageReq,
|
||||
"toc_PersonVehicleVerification": runPersonVehicleVerificationReq,
|
||||
"toc_PersonVehicleVerificationDetail": runPersonVehicleVerificationReq,
|
||||
"toc_PersonVehicleVerificationDetail": runPersonVehicleVerificationReq,
|
||||
"toc_PersonVehicleVerificationEnhanced": runPersonVehicleVerificationReq,
|
||||
// 车辆类产品(按 md 传参)
|
||||
"toc_VehiclesUnderNameCount": runVehiclesUnderNameCountReq,
|
||||
"toc_VehicleStaticInfo": runVehicleVinCodeReq,
|
||||
|
||||
@@ -216,6 +216,7 @@ var requestProcessors = map[string]func(*ApiRequestService, []byte) ([]byte, err
|
||||
"YYSY09CD": (*ApiRequestService).ProcessYYSY09CDRequest,
|
||||
"QCXGGB2Q": (*ApiRequestService).ProcessQCXGGB2QRequest,
|
||||
"QCXGYTS2": (*ApiRequestService).ProcessQCXGYTS2Request,
|
||||
"QCXG7K2N": (*ApiRequestService).ProcessQCXG7K2NRequest,
|
||||
"QCXG5F3A": (*ApiRequestService).ProcessQCXG5F3ARequest, //内部替换名下
|
||||
"FLXG0687": (*ApiRequestService).ProcessFLXG0687Request,
|
||||
"FLXG3D56": (*ApiRequestService).ProcessFLXG3D56Request,
|
||||
@@ -1227,6 +1228,35 @@ func (a *ApiRequestService) ProcessQCXGYTS2Request(params []byte) ([]byte, error
|
||||
return convertTianyuanResponse(resp)
|
||||
}
|
||||
|
||||
// ProcessQCXG7K2NRequest 人车核验加强版(plate_type 默认 02)
|
||||
func (a *ApiRequestService) ProcessQCXG7K2NRequest(params []byte) ([]byte, error) {
|
||||
plateNo := gjson.GetBytes(params, "plate_no")
|
||||
name := gjson.GetBytes(params, "name")
|
||||
if !plateNo.Exists() || plateNo.String() == "" || !name.Exists() || name.String() == "" {
|
||||
return nil, errors.New("api请求, QCXG7K2N, 获取相关参数失败")
|
||||
}
|
||||
|
||||
plateType := gjson.GetBytes(params, "plate_type")
|
||||
if !plateType.Exists() || plateType.String() == "" {
|
||||
plateType = gjson.GetBytes(params, "carplate_type")
|
||||
}
|
||||
plateTypeStr := "02"
|
||||
if plateType.Exists() && plateType.String() != "" {
|
||||
plateTypeStr = plateType.String()
|
||||
}
|
||||
|
||||
resp, err := a.tianyuanapi.CallInterface("QCXG7K2N", map[string]interface{}{
|
||||
"plate_no": plateNo.String(),
|
||||
"name": name.String(),
|
||||
"plate_type": plateTypeStr,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return convertTianyuanResponse(resp)
|
||||
}
|
||||
|
||||
// ProcessQCXG5F3ARequest 名下车辆(车牌)
|
||||
func (a *ApiRequestService) ProcessQCXG5F3ARequest(params []byte) ([]byte, error) {
|
||||
idCard := gjson.GetBytes(params, "id_card")
|
||||
|
||||
@@ -1090,6 +1090,91 @@ VALUES (
|
||||
1
|
||||
);
|
||||
|
||||
-- ------------------------------ 人车核验(加强版) QCXG7K2N -----------------------------
|
||||
INSERT INTO
|
||||
`product` (
|
||||
`create_time`,
|
||||
`update_time`,
|
||||
`delete_time`,
|
||||
`del_state`,
|
||||
`version`,
|
||||
`product_name`,
|
||||
`product_en`,
|
||||
`description`,
|
||||
`notes`,
|
||||
`cost_price`,
|
||||
`sell_price`
|
||||
)
|
||||
VALUES (
|
||||
NOW(),
|
||||
NOW(),
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
'人车核验(加强版)',
|
||||
'toc_PersonVehicleVerificationEnhanced',
|
||||
'<p>人车核验加强版,支持 plate_type 号牌类型编码,默认 02 小型汽车。</p>',
|
||||
NULL,
|
||||
0.50,
|
||||
14.90
|
||||
);
|
||||
|
||||
INSERT INTO
|
||||
`feature` (
|
||||
`create_time`,
|
||||
`update_time`,
|
||||
`delete_time`,
|
||||
`del_state`,
|
||||
`version`,
|
||||
`api_id`,
|
||||
`name`,
|
||||
`cost_price`
|
||||
)
|
||||
VALUES (
|
||||
NOW(),
|
||||
NOW(),
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
'QCXG7K2N',
|
||||
'人车核验(加强版)',
|
||||
0.80
|
||||
);
|
||||
|
||||
INSERT INTO
|
||||
`product_feature` (
|
||||
`product_id`,
|
||||
`feature_id`,
|
||||
`create_time`,
|
||||
`update_time`,
|
||||
`delete_time`,
|
||||
`del_state`,
|
||||
`version`,
|
||||
`sort`,
|
||||
`is_important`,
|
||||
`enable`
|
||||
)
|
||||
SELECT
|
||||
p.id,
|
||||
f.id,
|
||||
NOW(),
|
||||
NOW(),
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
1
|
||||
FROM
|
||||
`product` p,
|
||||
`feature` f
|
||||
WHERE
|
||||
p.product_en = 'toc_PersonVehicleVerificationEnhanced'
|
||||
AND f.api_id = 'QCXG7K2N'
|
||||
AND p.del_state = 0
|
||||
AND f.del_state = 0
|
||||
LIMIT 1;
|
||||
|
||||
-- ------------------------------ 核验工具(verify feature.md)-----------------------------
|
||||
-- 公安二要素 IVYZ9K7F
|
||||
INSERT INTO
|
||||
|
||||
Reference in New Issue
Block a user