INSERT INTO pf_device_info (device_code, device_name, device_type, device_model, device_user, device_phone,
create_id, create_user, create_time, is_active,puid,ball_index,type_code,device_status)
VALUES (#{deviceCode}, #{deviceName}, #{deviceType}, #{deviceModel}, #{deviceUser}, #{devicePhone},
#{createId}, #{createUser}, now(), '1',#{puid},#{ballIndex},#{typeCode},#{deviceStatus})
UPDATE pf_device_info SET
device_name = #{deviceName},
device_user = #{deviceUser},
device_phone = #{devicePhone},
puid = #{puid},
ball_index = #{ballIndex},
update_time = now(),
type_code=#{typeCode},
device_status=#{deviceStatus}
WHERE device_id = #{deviceId}
UPDATE pf_device_info SET device_code = #{deviceCode} WHERE device_id = #{deviceId}
UPDATE pf_device_info SET is_active = '0', update_time = now() WHERE device_id in
#{deviceId}