insert into
t_device(device_name,mac_id,puid,gb_code,type_code,device_type,ss_dw,update_time,state,remark,mac,ip_address,is_flag,create_time,
is_t,t_name,t_code,tw_code,td_code,pass_way)
VALUE (
#{deviceName}, #{macId}, #{puId}, #{gbCode}, #{typeCode},#{typeName}, #{ssdw}, #{updateTime}, '0', #{remark}, #{mac}, #{ipAddress},'0',
#{createTime},#{ist},#{tName},#{tCode},#{twCode},#{tdCode},#{passWay}
)
update t_device
,device_name=#{deviceName}
,mac_id=#{macId}
,puid=#{puId}
,gb_code=#{gbCode}
,type_code=#{typeCode}
,device_type=#{typeName}
,ss_dw=#{ssdw}
,update_time=#{updateTime}
,remark=#{remark}
,mac=#{mac}
,ip_address=#{ipAddress}
,is_t=#{ist}
,t_name=#{tName}
,t_code=#{tCode}
,tw_code=#{twCode}
,td_code=#{tdCode}
,pass_way=#{passWay}
WHERE id=#{id}
update t_device set is_flag='1' WHERE id=#{id}
INSERT INTO t_device(device_name,mac_id,puid,gb_code,type_code,device_type,ss_dw,state,remark,is_flag,is_t,t_name,t_code,tw_code,td_code,pass_way) VALUES
(
#{item.deviceName},#{item.macId},#{item.puId},#{item.gbCode},#{item.typeCode},#{item.typeName},#{item.ssdw},'0',
#{item.remark},'0',#{item.ist},#{item.tName},#{item.tCode},#{item.twCode},#{item.tdCode},'to-2'
)
UPDATE t_device SET state = #{OnlineFlag}
WHERE puid = #{PUID}
UPDATE t_device SET state = #{status}
WHERE t_code = #{devCode}
update t_device set state='1' WHERE is_flag=0
UPDATE t_device SET state = #{status}
WHERE puid = #{puid}