jaryhe 7 månader sedan
förälder
incheckning
833fa386d3

+ 3 - 3
impl/thirdparty_impl/zr/two_element_verify_national.go

@@ -6,7 +6,6 @@ package zr
 import (
 	"gd_vehicle/apis"
 	"gd_vehicle/common.in/utils"
-	"gd_vehicle/consts"
 	"gd_vehicle/errors"
 	"gd_vehicle/thirdparty"
 	dutils "gd_vehicle/utils"
@@ -18,13 +17,14 @@ import (
 
 
 func getZrNationalKey(req *apis.ThirdpartRequest) string {
-	key := consts.ZRNationalTwoElementVerifyPre + req.Params["plateNum"] + req.Params["name"]
+    key :=req.ProviderApiCode + ":" +  req.Params["plateNum"] + req.Params["name"]
+	//key := consts.ZRNationalTwoElementVerifyPre + req.Params["plateNum"] + req.Params["name"]
 	return key
 }
 
 
 func getZrNationalPlateNoKey(req *apis.ThirdpartRequest) string {
-	key := consts.ZRNationalTwoElementVerifyPre + req.Params["plateNum"]
+	key := req.ProviderApiCode + ":"  + req.Params["plateNum"]
 	return key
 }
 

+ 2 - 35
impl/thirdparty_impl/zr/vehicle_five.go

@@ -6,7 +6,6 @@ package zr
 import (
 	"gd_vehicle/apis"
 	"gd_vehicle/common.in/utils"
-	"gd_vehicle/consts"
 	"gd_vehicle/errors"
 	"gd_vehicle/thirdparty"
 	dutils "gd_vehicle/utils"
@@ -17,49 +16,17 @@ import (
 
 
 func getZrVehicleFiveKey(req *apis.ThirdpartRequest) string {
-	key := consts.ZRNationalVehicleFivePre + req.Params["plateNumber"]
+	key := req.ProviderApiCode + ":" +  req.Params["plateNumber"]
 	return key
 }
 
 func paramZrVehicleFiveData(rdata string, respMap map[string]string) {
-	//respMap["vehicle_type_detail"] = gjson.Get(rdata, "clfl").String() // "乘用车"
-	respMap["vehicle_type_detail"] = gjson.Get(rdata, "cllb").String()  //"中型车"
-	respMap["vehicle_type"] = ""
 	respMap["engine_type"] = gjson.Get(rdata, "fdjxh").String()
-	respMap["rated_power"] = gjson.Get(rdata, "gl").String()
-	respMap["back_wheel_distance"] = gjson.Get(rdata, "hlj").String()
-	respMap["front_wheel_distance"] = gjson.Get(rdata, "qlj").String()
-	respMap["unladen_mass"] = gjson.Get(rdata, "zbzl").String()
-	respMap["use_property_detail"] = gjson.Get(rdata, "usage").String()
-	respMap["use_property"] = ""
-
-	respMap["gross_mass"] = gjson.Get(rdata, "zzl").String()
-	respMap["traction_mass"] = gjson.Get(rdata, "edqyzzl").String()
-	respMap["long"] = gjson.Get(rdata, "wkc").String()
-	respMap["wheel_base"] = gjson.Get(rdata, "zj").String()
-
-	respMap["high"] = gjson.Get(rdata, "wkg").String()
 	respMap["engine_no"] = gjson.Get(rdata, "fdjh").String()
-
-	respMap["approved_load"] = gjson.Get(rdata, "edzzl").String()
-	//respMap["state"] = gjson.Get(rdata, "clzl").String()
-	respMap["wide"] = gjson.Get(rdata, "wkk").String()
 	respMap["model_no"] = gjson.Get(rdata, "clxh").String()
-	respMap["fuel_type_detail"] = gjson.Get(rdata, "rlzl").String()
-	respMap["fuel_type"] = ""
-	respMap["axle_number"] = gjson.Get(rdata, "zs").String()
 	respMap["vin"] = gjson.Get(rdata, "vin").String()
-
-
-	respMap["emission_standard"] = gjson.Get(rdata, "pfbz").String()
-	respMap["displacement_l"] = gjson.Get(rdata, "pl").String()
-	respMap["displacement"] = ""
-	respMap["brand_name"] = gjson.Get(rdata, "brand").String()
 	respMap["initial_registration_date"] = gjson.Get(rdata, "registerDate").String()
-	respMap["approved_number"] = gjson.Get(rdata, "edzk").String()
-	respMap["vehicle_body_color_detail"] = gjson.Get(rdata, "csys").String()
-	respMap["vehicle_body_color"] = ""
-
+	respMap["brand_name"] = gjson.Get(rdata, "brand").String()
 }
 
 func paramZrVehicleFiveReturn(ret string) (reply string, err error) {

+ 1 - 2
impl/thirdparty_impl/zr/vehicle_info.go

@@ -6,7 +6,6 @@ package zr
 import (
 	"gd_vehicle/apis"
 	"gd_vehicle/common.in/utils"
-	"gd_vehicle/consts"
 	"gd_vehicle/errors"
 	"gd_vehicle/thirdparty"
 	dutils "gd_vehicle/utils"
@@ -18,7 +17,7 @@ import (
 
 
 func getZrVehicleInfoKey(req *apis.ThirdpartRequest) string {
-	key := consts.ZRNationalVehicleInfoPre + req.Params["plateNumber"]
+	key := req.ProviderApiCode + ":" +  req.Params["plateNumber"]
 	return key
 }
 

+ 1 - 2
impl/thirdparty_impl/zr/vehicle_vin.go

@@ -6,7 +6,6 @@ package zr
 import (
 	"gd_vehicle/apis"
 	"gd_vehicle/common.in/utils"
-	"gd_vehicle/consts"
 	"gd_vehicle/errors"
 	"gd_vehicle/thirdparty"
 	dutils "gd_vehicle/utils"
@@ -17,7 +16,7 @@ import (
 
 
 func getZrVehicleVinKey(req *apis.ThirdpartRequest) string {
-	key := consts.ZRNationalVehicleVinPre + req.Params["vinOrPlateNumber"]
+	key := req.ProviderApiCode + ":" +  req.Params["vinOrPlateNumber"]
 	return key
 }