begin
if new.open_state = 0 then
set @switch_status = 1;
else
set @switch_status = 2;
end if;
update parking_carlock set voltage = new.voltage , switch_status = @switch_status, run_status= new.equi_state , car_status=new.car_state where slave_id = new.slave_id;
end