123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697 |
- package query
- import (
- "adm-data/errors"
- "adm-data/model"
- "adm-data/parser"
- v1 "adm-data/pb/v1"
- "context"
- "encoding/json"
- "fmt"
- jsoniter "github.com/json-iterator/go"
- "git.getensh.com/common/gopkgsv2/database"
- "git.getensh.com/common/gopkgsv2/logger"
- "go.uber.org/zap"
- "google.golang.org/grpc/status"
- )
- type Aircondition struct {
- AirconditionControlType string `json:"aircondition_control_type"`
- CarAirPurifier string `json:"car_air_purifier"`
- FragranceSystem string `json:"fragrance_system"`
- NegativeIonGenerator string `json:"negative_ion_generator"`
- Pm25Device string `json:"pm25_device"`
- RearIndependentAirConditioner string `json:"rear_independent_air_conditioner"`
- RearSeatAirOutlet string `json:"rear_seat_air_outlet"`
- Refrigerator string `json:"refrigerator"`
- TemperatureZoneControl string `json:"temperature_zone_control"`
- }
- type Basic struct {
- Alternator string `json:"alternator"`
- BrakingDistanceMeasure string `json:"braking_distance_measure"`
- BrandName string `json:"brand_name"`
- EmissionStandard string `json:"emission_standard"`
- Engine string `json:"engine"`
- FastChargeAmount string `json:"fast_charge_amount"`
- FastChargingTime string `json:"fast_charging_time"`
- FuelTypeDetail string `json:"fuel_type_detail"`
- GearboxDesc string `json:"gearbox_desc"`
- HundredAccelerate string `json:"hundred_accelerate"`
- HundredAccelerateMeasure string `json:"hundred_accelerate_measure"`
- Level string `json:"level"`
- Lwh string `json:"lwh"`
- Maker string `json:"maker"`
- MaximumPower string `json:"maximum_power"`
- MaximumSimulationMilage string `json:"maximum_simulation_milage"`
- MaximumSimulationMilageMeasure string `json:"maximum_simulation_milage_measure"`
- MaximumSpeed string `json:"maximum_speed"`
- MaximumTorque string `json:"maximum_torque"`
- ModelYear string `json:"model_year"`
- OilWearComrehensive string `json:"oil_wear_comrehensive"`
- OilWearMeasure string `json:"oil_wear_measure"`
- Price string `json:"price"`
- PriceYuan string `json:"price_yuan"`
- SeriesId string `json:"series_id"`
- SeriesImg string `json:"series_img"`
- SeriesName string `json:"series_name"`
- SlowChargingTime string `json:"slow_charging_time"`
- StyleId string `json:"style_id"`
- StyleName string `json:"style_name"`
- SubLevel string `json:"sub_level"`
- VehicleStructure string `json:"vehicle_structure"`
- VehicleWarranty string `json:"vehicle_warranty"`
- BrandId string `json:"brand_id"`
- }
- type Body struct {
- BackWheelDistance string `json:"back_wheel_distance"`
- DoorNumber string `json:"door_number"`
- FrontWheelDistance string `json:"front_wheel_distance"`
- High string `json:"high"`
- Long string `json:"long"`
- MinimumGroundClearance string `json:"minimum_ground_clearance"`
- OilboxVolume string `json:"oilbox_volume"`
- SeatNumber string `json:"seat_number"`
- TrunkVolume string `json:"trunk_volume"`
- UnladenMass string `json:"unladen_mass"`
- Wheelbase string `json:"wheelbase"`
- Wide string `json:"wide"`
- }
- type Chassis struct {
- AssistType string `json:"assist_type"`
- BackSuspentionType string `json:"back_suspention_type"`
- BodyStructure string `json:"body_structure"`
- DriveType string `json:"drive_type"`
- FrontSuspentionType string `json:"front_suspention_type"`
- }
- type Control struct {
- AirSuspension string `json:"air_suspension"`
- AscentAssist string `json:"ascent_assist"`
- AutoHold string `json:"auto_hold"`
- AutomaticDrivingAssistance string `json:"automatic_driving_assistance"`
- AutomaticParking string `json:"automatic_parking"`
- BackParkingRador string `json:"back_parking_rador"`
- CentralDiffLock string `json:"central_diff_lock"`
- CruiseSystem string `json:"cruise_system"`
- DrivingModeSelection string `json:"driving_mode_selection"`
- EInductionSuspension string `json:"e_induction_suspension"`
- Edl string `json:"edl"`
- EngineStartStopTechnology string `json:"engine_start_stop_technology"`
- FrontParkingRador string `json:"front_parking_rador"`
- Hdc string `json:"hdc"`
- OverallActiveSteeringSystem string `json:"overall_active_steering_system"`
- ReverseVehicleSideWarningSystem string `json:"reverse_vehicle_side_warning_system"`
- VariableSteeringRatio string `json:"variable_steering_ratio"`
- VariableSuspension string `json:"variable_suspension"`
- WadeSensingSystem string `json:"wade_sensing_system"`
- }
- type Electric struct {
- BackElectricMaximumPower string `json:"back_electric_maximum_power"`
- BackElectricTorque string `json:"back_electric_torque"`
- BatteryEnergy string `json:"battery_energy"`
- BatteryPackWarranty string `json:"battery_pack_warranty"`
- BatteryType string `json:"battery_type"`
- FrontElectricMaximumPower string `json:"front_electric_maximum_power"`
- FrontElectricTorque string `json:"front_electric_torque"`
- HundredElectricityConsumption string `json:"hundred_electricity_consumption"`
- MaximumSimulationMilage string `json:"maximum_simulation_milage"`
- MotorLayout string `json:"motor_layout"`
- MotorNumber string `json:"motor_number"`
- MotorType string `json:"motor_type"`
- SystemIntegratedPower string `json:"system_integrated_power"`
- SystemIntegratedTorque string `json:"system_integrated_torque"`
- TotalMotorPower string `json:"total_motor_power"`
- TotalMotorTorque string `json:"total_motor_torque"`
- }
- type Internal struct {
- ActiveNoiseReduction string `json:"active_noise_reduction"`
- CarDrivingRecorder string `json:"car_driving_recorder"`
- DrivingComputerDisplay string `json:"driving_computer_display"`
- ElectricallyAdjustablePedal string `json:"electrically_adjustable_pedal"`
- FullLcdDashboard string `json:"full_lcd_dashboard"`
- FullLcdDashboardSize string `json:"full_lcd_dashboard_size"`
- HudRisingNumberDisplay string `json:"hud_rising_number_display"`
- MobilePhoneWirelessCharging string `json:"mobile_phone_wireless_charging"`
- MultiFunctionalSteeringWheel string `json:"multi_functional_steering_wheel"`
- SteeringWheelAdjustment string `json:"steering_wheel_adjustment"`
- SteeringWheelHeating string `json:"steering_wheel_heating"`
- SteeringWheelMaterial string `json:"steering_wheel_material"`
- SteeringWheelRemember string `json:"steering_wheel_remember"`
- SteeringWheelShift string `json:"steering_wheel_shift"`
- }
- type Engine struct {
- AirIntakForm string `json:"air_intak_form"`
- CylinderArrangement string `json:"cylinder_arrangement"`
- CylinderDiameter string `json:"cylinder_diameter"`
- CylinderHeadMaterial string `json:"cylinder_head_material"`
- CylinderMaterial string `json:"cylinder_material"`
- CylinderNumber string `json:"cylinder_number"`
- CylinderValveNumber string `json:"cylinder_valve_number"`
- Displacement string `json:"displacement"`
- DisplacementL string `json:"displacement_l"`
- EngineTechnology string `json:"engine_technology"`
- EngineType string `json:"engine_type"`
- FuelLable string `json:"fuel_lable"`
- FuelTypeDetail string `json:"fuel_type_detail"`
- MaximumHorsepower string `json:"maximum_horsepower"`
- MaximumPowerRpm string `json:"maximum_power_rpm"`
- OilSupplyMode string `json:"oil_supply_mode"`
- PistonStroke string `json:"piston_stroke"`
- ReductionRatio string `json:"reduction_ratio"`
- Rpm string `json:"rpm"`
- ValveMechanism string `json:"valve_mechanism"`
- }
- type External struct {
- ActiveIntakeGrille string `json:"active_intake_grille"`
- BatteryPreHeating string `json:"battery_pre_heating"`
- CentralControlLock string `json:"central_control_lock"`
- ElectricTrunk string `json:"electric_trunk"`
- ElectronicAntiTheft string `json:"electronic_anti_theft"`
- Eosd string `json:"eosd"`
- FramelessDesignDoor string `json:"frameless_design_door"`
- HideElectricDoorHandle string `json:"hide_electric_door_handle"`
- InductiveTrunk string `json:"inductive_trunk"`
- KeyType string `json:"key_type"`
- KeylessEntrySystem string `json:"keyless_entry_system"`
- KeylessStartSystem string `json:"keyless_start_system"`
- OutsidePedal string `json:"outside_pedal"`
- RearCompartmentPositionMemory string `json:"rear_compartment_position_memory"`
- RemoteStart string `json:"remote_start"`
- RimMaterial string `json:"rim_material"`
- RoofLuggageRack string `json:"roof_luggage_rack"`
- SideSlidingDoor string `json:"side_sliding_door"`
- SkylightType string `json:"skylight_type"`
- SportsAppearanceKit string `json:"sports_appearance_kit"`
- Tail string `json:"tail"`
- TheTailgateGlassOpensIndependently string `json:"the_tailgate_glass_opens_independently"`
- }
- type Gearbox struct {
- GearNumber string `json:"gear_number"`
- GearboxDesc string `json:"gearbox_desc"`
- GearboxType string `json:"gearbox_type"`
- }
- type Intelligent struct {
- AuxiliaryDrivingChip string `json:"auxiliary_driving_chip"`
- ChipComputingPower string `json:"chip_computing_power"`
- NumberOfCameras string `json:"number_of_cameras"`
- NumberOfLidars string `json:"number_of_lidars"`
- NumberOfMillimeterWaveRadars string `json:"number_of_millimeter_wave_radars"`
- NumberOfUltrasonicRadars string `json:"number_of_ultrasonic_radars"`
- }
- type Light struct {
- AdaptiveFarNear string `json:"adaptive_far_near"`
- Atmosphere string `json:"atmosphere"`
- AutoHead string `json:"auto_head"`
- Clean string `json:"clean"`
- Daytime string `json:"daytime"`
- Far string `json:"far"`
- Fog string `json:"fog"`
- HeadlampDelayOff string `json:"headlamp_delay_off"`
- HeadlampRainFogMode string `json:"headlamp_rain_fog_mode"`
- HeightAdjustable string `json:"height_adjustable"`
- LightingFeatures string `json:"lighting_features"`
- Near string `json:"near"`
- SideTurn string `json:"side_turn"`
- SteeringAssistLamp string `json:"steering_assist_lamp"`
- TouchReadingLamp string `json:"touch_reading_lamp"`
- }
- type Media struct {
- BackLcd string `json:"back_lcd"`
- CarInternet string `json:"car_internet"`
- CarPhone string `json:"car_phone"`
- CarTv string `json:"car_tv"`
- CdDvd string `json:"cd_dvd"`
- CenterConsoleLargeScreenSize string `json:"center_console_large_screen_size"`
- CentralColourScreen string `json:"central_colour_screen"`
- CentralLcdSplitScreen string `json:"central_lcd_split_screen"`
- ChargingInterface string `json:"charging_interface"`
- FaceRecognition string `json:"face_recognition"`
- GestureControl string `json:"gesture_control"`
- Gps string `json:"gps"`
- InterfaceOf12V string `json:"interface_of12v"`
- MobileInternet string `json:"mobile_internet"`
- NavigationTrafficInformationDisplay string `json:"navigation_traffic_information_display"`
- NumberOfInterfaces string `json:"number_of_interfaces"`
- Ota string `json:"ota"`
- PowerOf220V string `json:"power_of220v"`
- RearControlMultimedia string `json:"rear_control_multimedia"`
- RoadRescueCall string `json:"road_rescue_call"`
- SpeakerBrand string `json:"speaker_brand"`
- SpeakerNumber string `json:"speaker_number"`
- VoiceControl string `json:"voice_control"`
- }
- type Optional struct {
- BodyColour string `json:"body_colour"`
- InteriorColor string `json:"interior_color"`
- }
- type Rearview struct {
- AntiPinchHand string `json:"anti_pinch_hand"`
- BackElectricWindow string `json:"back_electric_window"`
- BackSidePrivacy string `json:"back_side_privacy"`
- BackSideSunshade string `json:"back_side_sunshade"`
- BackSunshade string `json:"back_sunshade"`
- BackWiper string `json:"back_wiper"`
- Cosmetic string `json:"cosmetic"`
- ExteriorRearviewMirrorFunction string `json:"exterior_rearview_mirror_function"`
- FrontElectricWindow string `json:"front_electric_window"`
- FrontWiper string `json:"front_wiper"`
- HeatableSprayNozzle string `json:"heatable_spray_nozzle"`
- InteriorRearviewMirrorFunction string `json:"interior_rearview_mirror_function"`
- MultilayerSoundInsulationGlass string `json:"multilayer_sound_insulation_glass"`
- WindowOneKey string `json:"window_one_key"`
- }
- type Safety struct {
- Abs string `json:"abs"`
- ActiveBrake string `json:"active_brake"`
- AsrTcsTrc string `json:"asr_tcs_trc"`
- AuxiliarySeatAirbag string `json:"auxiliary_seat_airbag"`
- BackBeltAirbag string `json:"back_belt_airbag"`
- BackHeadAirbag string `json:"back_head_airbag"`
- BackSideAirbag string `json:"back_side_airbag"`
- EbaBasBa string `json:"eba_bas_ba"`
- EbdCbc string `json:"ebd_cbc"`
- Esp string `json:"esp"`
- FatigueDrivingWarning string `json:"fatigue_driving_warning"`
- FontHeadAirbag string `json:"font_head_airbag"`
- FrontMiddleAirbag string `json:"front_middle_airbag"`
- FrontSideAirbag string `json:"front_side_airbag"`
- IsoFix string `json:"iso_fix"`
- KneeAirbag string `json:"knee_airbag"`
- LaneDepartureWarningSystem string `json:"lane_departure_warning_system"`
- LaneKeeping string `json:"lane_keeping"`
- MainSeatAirbag string `json:"main_seat_airbag"`
- NightVision string `json:"night_vision"`
- ParallelAuxiliary string `json:"parallel_auxiliary"`
- PassengerSeatCushionAirbag string `json:"passenger_seat_cushion_airbag"`
- PassivePedestrianProtection string `json:"passive_pedestrian_protection"`
- RearCentralAirbag string `json:"rear_central_airbag"`
- RearSeatAntiSlideAirbag string `json:"rear_seat_anti_slide_airbag"`
- RoadTrafficSignRecognition string `json:"road_traffic_sign_recognition"`
- RunFlatTire string `json:"run_flat_tire"`
- SeatBeltWarning string `json:"seat_belt_warning"`
- TirePresureMonitor string `json:"tire_presure_monitor"`
- }
- type Seat struct {
- AuxiliaryAdjustableButton string `json:"auxiliary_adjustable_button"`
- AuxiliaryElectricAdust string `json:"auxiliary_electric_adust"`
- AuxiliarySeatAdjustmentMode string `json:"auxiliary_seat_adjustment_mode"`
- BackCupHolder string `json:"back_cup_holder"`
- BackDownType string `json:"back_down_type"`
- BackFoldTable string `json:"back_fold_table"`
- BackHandrail string `json:"back_handrail"`
- ElectricSeatRemeber string `json:"electric_seat_remeber"`
- FrontHandrail string `json:"front_handrail"`
- FrontSeatFunction string `json:"front_seat_function"`
- HeatingCoolingCupHolder string `json:"heating_cooling_cup_holder"`
- MainElectricAdust string `json:"main_electric_adust"`
- MainSeatAdjustmentMode string `json:"main_seat_adjustment_mode"`
- RearSeatElectricAdjustment string `json:"rear_seat_electric_adjustment"`
- RearSeatFunction string `json:"rear_seat_function"`
- RearSeatPowerDown string `json:"rear_seat_power_down"`
- SeatLayoutForm string `json:"seat_layout_form"`
- SeatMaterial string `json:"seat_material"`
- SecondIndependent string `json:"second_independent"`
- SecondRowSeatAdjustment string `json:"second_row_seat_adjustment"`
- SportSeat string `json:"sport_seat"`
- }
- type Wheelbrake struct {
- BackBrakeType string `json:"back_brake_type"`
- BackWheelSpecification string `json:"back_wheel_specification"`
- FrontBrakeType string `json:"front_brake_type"`
- FrontWheelSpecification string `json:"front_wheel_specification"`
- ParkingBrakeType string `json:"parking_brake_type"`
- SpareWheelSpecification string `json:"spare_wheel_specification"`
- }
- type p04Response struct {
- Aircondition Aircondition `json:"aircondition"`
- Basic Basic `json:"basic"`
- Body Body `json:"body"`
- Chassis Chassis `json:"chassis"`
- Control Control `json:"control"`
- Electric Electric `json:"electric"`
- Engine Engine `json:"engine"`
- External External `json:"external"`
- Gearbox Gearbox `json:"gearbox"`
- Intelligent Intelligent `json:"intelligent"`
- Internal Internal `json:"internal"`
- Light Light `json:"light"`
- Media Media `json:"media"`
- Optional Optional `json:"optional"`
- Rearview Rearview `json:"rearview"`
- Safety Safety `json:"safety"`
- Seat Seat `json:"seat"`
- Wheelbrake Wheelbrake `json:"wheelbrake"`
- }
- type p04Request struct {
- StyleId string `json:"style_id"`
- }
- func SearchStyle(ctx context.Context, params string) (reply *v1.QueryResponse, err error) {
- reply = &v1.QueryResponse{}
- // 捕获各个task中的异常并返回给调用者
- defer func() {
- if r := recover(); r != nil {
- err = fmt.Errorf("%+v", r)
- e := &status.Status{}
- if er := json.Unmarshal([]byte(err.Error()), e); er != nil {
- logger.Error("err",
- zap.String("system_err", err.Error()),
- zap.Stack("stacktrace"))
- }
- }
- }()
- var req p04Request
- err = jsoniter.UnmarshalFromString(params, &req)
- if err != nil || req.StyleId == "" {
- return nil, errors.ParamsError
- }
- info, err := model.NewAds5Model().Get(database.DB().Where("style_id = ?", req.StyleId))
- if err != nil {
- return reply, errors.DataNotExistError
- }
- res := p04Response{}
- res.Aircondition = Aircondition{
- AirconditionControlType: info.AirconditionControlType,
- CarAirPurifier: info.CarAirPurifier,
- FragranceSystem: info.FragranceSystem,
- NegativeIonGenerator: info.NegativeIonGenerator,
- Pm25Device: info.Pm25Device,
- RearIndependentAirConditioner: info.RearIndependentAirConditioner,
- RearSeatAirOutlet: info.RearSeatAirOutlet,
- Refrigerator: info.Refrigerator,
- TemperatureZoneControl: info.TemperatureZoneControl,
- }
- res.Basic = Basic{
- BrandId: info.BrandId,
- Alternator: info.Alternator,
- BrakingDistanceMeasure: info.BrakingDistanceMeasure,
- BrandName: info.BrandName,
- EmissionStandard: info.EmissionStandard,
- Engine: info.Engine,
- FastChargeAmount: info.FastChargeAmount,
- FastChargingTime: info.FastChargingTime,
- FuelTypeDetail: info.FuelTypeDetail,
- GearboxDesc: info.GearboxDesc,
- HundredAccelerate: info.HundredAccelerate,
- HundredAccelerateMeasure: info.HundredAccelerateMeasure,
- Level: info.Level,
- Lwh: info.Lwh,
- Maker: info.Maker,
- MaximumPower: info.MaximumPower,
- MaximumSimulationMilage: info.MaximumSimulationMilage,
- MaximumSimulationMilageMeasure: info.MaximumSimulationMilageMeasure,
- MaximumSpeed: info.MaximumSpeed,
- MaximumTorque: info.MaximumTorque,
- ModelYear: info.ModelYear,
- OilWearComrehensive: info.OilWearComrehensive,
- OilWearMeasure: info.OilWearMeasure,
- Price: info.Price,
- PriceYuan: info.PriceYuan,
- SeriesId: info.SeriesId,
- SeriesImg: parser.Conf.Oss.SeriesImage + info.SeriesId + ".png",
- SeriesName: info.SeriesName,
- SlowChargingTime: info.SlowChargingTime,
- StyleId: info.StyleId,
- StyleName: info.StyleName,
- SubLevel: info.SubLevel,
- VehicleStructure: info.VehicleStructure,
- VehicleWarranty: info.VehicleWarranty,
- }
- res.Body = Body{
- BackWheelDistance: info.BackWheelDistance,
- DoorNumber: info.DoorNumber,
- FrontWheelDistance: info.FrontWheelDistance,
- High: info.High,
- Long: info.Long,
- MinimumGroundClearance: info.MinimumGroundClearance,
- OilboxVolume: info.OilboxVolume,
- SeatNumber: info.SeatNumber,
- TrunkVolume: info.TrunkVolume,
- UnladenMass: info.UnladenMass,
- Wheelbase: info.Wheelbase,
- Wide: info.Wide,
- }
- res.Chassis = Chassis{
- AssistType: info.AssistType,
- BackSuspentionType: info.BackSuspentionType,
- BodyStructure: info.BodyStructure,
- DriveType: info.DriveType,
- FrontSuspentionType: info.FrontSuspentionType,
- }
- res.Control = Control{
- AirSuspension: info.AirSuspension,
- AscentAssist: info.AscentAssist,
- AutoHold: info.AutoHold,
- AutomaticDrivingAssistance: info.AutomaticDrivingAssistance,
- AutomaticParking: info.AutomaticParking,
- BackParkingRador: info.BackParkingRador,
- CentralDiffLock: info.CentralDiffLock,
- CruiseSystem: info.CruiseSystem,
- DrivingModeSelection: info.DrivingModeSelection,
- EInductionSuspension: info.EInductionSuspension,
- Edl: info.Edl,
- EngineStartStopTechnology: info.EngineStartStopTechnology,
- FrontParkingRador: info.FrontParkingRador,
- Hdc: info.Hdc,
- OverallActiveSteeringSystem: info.OverallActiveSteeringSystem,
- ReverseVehicleSideWarningSystem: info.ReverseVehicleSideWarningSystem,
- VariableSteeringRatio: info.VariableSteeringRatio,
- VariableSuspension: info.VariableSuspension,
- WadeSensingSystem: info.WadeSensingSystem,
- }
- res.Electric = Electric{
- BackElectricMaximumPower: info.BackElectricMaximumPower,
- BackElectricTorque: info.BackElectricTorque,
- BatteryEnergy: info.BatteryEnergy,
- BatteryPackWarranty: info.BatteryPackWarranty,
- BatteryType: info.BatteryType,
- FrontElectricMaximumPower: info.FrontElectricMaximumPower,
- FrontElectricTorque: info.FrontElectricTorque,
- HundredElectricityConsumption: info.HundredElectricityConsumption,
- MaximumSimulationMilage: info.MaximumSimulationMilage,
- MotorLayout: info.MotorLayout,
- MotorNumber: info.MotorNumber,
- MotorType: info.MotorType,
- SystemIntegratedPower: info.SystemIntegratedPower,
- SystemIntegratedTorque: info.SystemIntegratedTorque,
- TotalMotorPower: info.TotalMotorPower,
- TotalMotorTorque: info.TotalMotorTorque,
- }
- res.Engine = Engine{
- AirIntakForm: info.AirIntakForm,
- CylinderArrangement: info.CylinderArrangement,
- CylinderDiameter: info.CylinderDiameter,
- CylinderHeadMaterial: info.CylinderHeadMaterial,
- CylinderMaterial: info.CylinderMaterial,
- CylinderNumber: info.CylinderNumber,
- CylinderValveNumber: info.CylinderValveNumber,
- Displacement: info.Displacement,
- DisplacementL: info.DisplacementL,
- EngineTechnology: info.EngineTechnology,
- EngineType: info.EngineType,
- FuelLable: info.FuelLable,
- FuelTypeDetail: info.FuelTypeDetail,
- MaximumHorsepower: info.MaximumHorsepower,
- MaximumPowerRpm: info.MaximumPowerRpm,
- OilSupplyMode: info.OilSupplyMode,
- PistonStroke: info.PistonStroke,
- ReductionRatio: info.ReductionRatio,
- Rpm: info.Rpm,
- ValveMechanism: info.ValveMechanism,
- }
- res.External = External{
- ActiveIntakeGrille: info.ActiveIntakeGrille,
- BatteryPreHeating: info.BatteryPreHeating,
- CentralControlLock: info.CentralControlLock,
- ElectricTrunk: info.ElectricTrunk,
- ElectronicAntiTheft: info.ElectronicAntiTheft,
- Eosd: info.Eosd,
- FramelessDesignDoor: info.FramelessDesignDoor,
- HideElectricDoorHandle: info.HideElectricDoorHandle,
- InductiveTrunk: info.InductiveTrunk,
- KeyType: info.KeyType,
- KeylessEntrySystem: info.KeylessEntrySystem,
- KeylessStartSystem: info.KeylessStartSystem,
- OutsidePedal: info.OutsidePedal,
- RearCompartmentPositionMemory: info.RearCompartmentPositionMemory,
- RemoteStart: info.RemoteStart,
- RimMaterial: info.RimMaterial,
- RoofLuggageRack: info.RoofLuggageRack,
- SideSlidingDoor: info.SideSlidingDoor,
- SkylightType: info.SkylightType,
- SportsAppearanceKit: info.SportsAppearanceKit,
- Tail: info.Tail,
- TheTailgateGlassOpensIndependently: info.TheTailgateGlassOpensIndependently,
- }
- res.Gearbox = Gearbox{
- GearNumber: info.GearNumber,
- GearboxDesc: info.GearboxDesc,
- GearboxType: info.GearboxType,
- }
- res.Internal = Internal{
- ActiveNoiseReduction: info.ActiveNoiseReduction,
- CarDrivingRecorder: info.CarDrivingRecorder,
- DrivingComputerDisplay: info.DrivingComputerDisplay,
- ElectricallyAdjustablePedal: info.ElectricallyAdjustablePedal,
- FullLcdDashboard: info.FullLcdDashboard,
- FullLcdDashboardSize: info.FullLcdDashboardSize,
- HudRisingNumberDisplay: info.HudRisingNumberDisplay,
- MobilePhoneWirelessCharging: info.MobilePhoneWirelessCharging,
- MultiFunctionalSteeringWheel: info.MultiFunctionalSteeringWheel,
- SteeringWheelAdjustment: info.SteeringWheelAdjustment,
- SteeringWheelHeating: info.SteeringWheelHeating,
- SteeringWheelMaterial: info.SteeringWheelMaterial,
- SteeringWheelRemember: info.SteeringWheelRemember,
- SteeringWheelShift: info.SteeringWheelShift,
- }
- res.Light = Light{
- AdaptiveFarNear: info.AdaptiveFarNear,
- Atmosphere: info.Atmosphere,
- AutoHead: info.AutoHead,
- Clean: info.Clean,
- Daytime: info.Daytime,
- Far: info.Far,
- Fog: info.Fog,
- HeadlampDelayOff: info.HeadlampDelayOff,
- HeadlampRainFogMode: info.HeadlampRainFogMode,
- HeightAdjustable: info.HeightAdjustable,
- LightingFeatures: info.LightingFeatures,
- Near: info.Near,
- SideTurn: info.SideTurn,
- SteeringAssistLamp: info.SteeringAssistLamp,
- TouchReadingLamp: info.TouchReadingLamp,
- }
- res.Media = Media{
- BackLcd: info.BackLcd,
- CarInternet: info.CarInternet,
- CarPhone: info.CarPhone,
- CarTv: info.CarTv,
- CdDvd: info.CdDvd,
- CenterConsoleLargeScreenSize: info.CenterConsoleLargeScreenSize,
- CentralColourScreen: info.CentralColourScreen,
- CentralLcdSplitScreen: info.CentralLcdSplitScreen,
- ChargingInterface: info.ChargingInterface,
- FaceRecognition: info.FaceRecognition,
- GestureControl: info.GestureControl,
- Gps: info.Gps,
- InterfaceOf12V: info.InterfaceOf12v,
- MobileInternet: info.MobileInternet,
- NavigationTrafficInformationDisplay: info.NavigationTrafficInformationDisplay,
- NumberOfInterfaces: info.NumberOfInterfaces,
- Ota: info.Ota,
- PowerOf220V: info.PowerOf220v,
- RearControlMultimedia: info.RearControlMultimedia,
- RoadRescueCall: info.RoadRescueCall,
- SpeakerBrand: info.SpeakerBrand,
- SpeakerNumber: info.SpeakerNumber,
- VoiceControl: info.VoiceControl,
- }
- res.Optional = Optional{
- BodyColour: info.BodyColour,
- InteriorColor: info.InteriorColor,
- }
- res.Rearview = Rearview{
- AntiPinchHand: info.AntiPinchHand,
- BackElectricWindow: info.BackElectricWindow,
- BackSidePrivacy: info.BackSidePrivacy,
- BackSideSunshade: info.BackSideSunshade,
- BackSunshade: info.BackSunshade,
- BackWiper: info.BackWiper,
- Cosmetic: info.Cosmetic,
- ExteriorRearviewMirrorFunction: info.ExteriorRearviewMirrorFunction,
- FrontElectricWindow: info.FrontElectricWindow,
- FrontWiper: info.FrontWiper,
- HeatableSprayNozzle: info.HeatableSprayNozzle,
- InteriorRearviewMirrorFunction: info.InteriorRearviewMirrorFunction,
- MultilayerSoundInsulationGlass: info.MultilayerSoundInsulationGlass,
- WindowOneKey: info.WindowOneKey,
- }
- res.Safety = Safety{
- Abs: info.Abs,
- ActiveBrake: info.ActiveBrake,
- AsrTcsTrc: info.AsrTcsTrc,
- AuxiliarySeatAirbag: info.AuxiliarySeatAirbag,
- BackBeltAirbag: info.BackBeltAirbag,
- BackHeadAirbag: info.BackHeadAirbag,
- BackSideAirbag: info.BackSideAirbag,
- EbaBasBa: info.EbaBasBa,
- EbdCbc: info.EbdCbc,
- Esp: info.Esp,
- FatigueDrivingWarning: info.FatigueDrivingWarning,
- FontHeadAirbag: info.FontHeadAirbag,
- FrontMiddleAirbag: info.FrontMiddleAirbag,
- FrontSideAirbag: info.FrontSideAirbag,
- IsoFix: info.IsoFix,
- KneeAirbag: info.KneeAirbag,
- LaneDepartureWarningSystem: info.LaneDepartureWarningSystem,
- LaneKeeping: info.LaneKeeping,
- MainSeatAirbag: info.MainSeatAirbag,
- NightVision: info.NightVision,
- ParallelAuxiliary: info.ParallelAuxiliary,
- PassengerSeatCushionAirbag: info.PassengerSeatCushionAirbag,
- PassivePedestrianProtection: info.PassivePedestrianProtection,
- RearCentralAirbag: info.RearCentralAirbag,
- RearSeatAntiSlideAirbag: info.RearSeatAntiSlideAirbag,
- RoadTrafficSignRecognition: info.RoadTrafficSignRecognition,
- RunFlatTire: info.RunFlatTire,
- SeatBeltWarning: info.SeatBeltWarning,
- TirePresureMonitor: info.TirePresureMonitor,
- }
- res.Seat = Seat{
- AuxiliaryAdjustableButton: info.AuxiliaryAdjustableButton,
- AuxiliaryElectricAdust: info.AuxiliaryElectricAdust,
- AuxiliarySeatAdjustmentMode: info.AuxiliarySeatAdjustmentMode,
- BackCupHolder: info.BackCupHolder,
- BackDownType: info.BackDownType,
- BackFoldTable: info.BackFoldTable,
- BackHandrail: info.BackHandrail,
- ElectricSeatRemeber: info.ElectricSeatRemeber,
- FrontHandrail: info.FrontHandrail,
- FrontSeatFunction: info.FrontSeatFunction,
- HeatingCoolingCupHolder: info.HeatingCoolingCupHolder,
- MainElectricAdust: info.MainElectricAdust,
- MainSeatAdjustmentMode: info.MainSeatAdjustmentMode,
- RearSeatElectricAdjustment: info.RearSeatElectricAdjustment,
- RearSeatFunction: info.RearSeatFunction,
- RearSeatPowerDown: info.RearSeatPowerDown,
- SeatLayoutForm: info.SeatLayoutForm,
- SeatMaterial: info.SeatMaterial,
- SecondIndependent: info.SecondIndependent,
- SecondRowSeatAdjustment: info.SecondRowSeatAdjustment,
- SportSeat: info.SportSeat,
- }
- res.Wheelbrake = Wheelbrake{
- BackBrakeType: info.BackBrakeType,
- BackWheelSpecification: info.BackWheelSpecification,
- FrontBrakeType: info.FrontBrakeType,
- FrontWheelSpecification: info.FrontWheelSpecification,
- ParkingBrakeType: info.ParkingBrakeType,
- SpareWheelSpecification: info.SpareWheelSpecification,
- }
- reply.Data, _ = jsoniter.MarshalToString(res)
- return reply, nil
- }
|