select id,name as name,date_format(created_time,'%Y-%m-%d %H:%i:%s') as createdTime,date_format(alter_time,'%Y-%m-%d %H:%i:%s') as alterTime from topology_user
select id,name as name,date_format(created_time,'%Y-%m-%d %H:%i:%s') as createdTime,date_format(alter_time,'%Y-%m-%d %H:%i:%s') as alterTime,switch_it as switchIt from topology
<where>
<where>
<iftest="id !=null and id!=''">and id = #{id}</if>
<iftest="id !=null and id!=''">and id = #{id}</if>
<iftest="switchIt !=null and switchIt!=''">and switch_it = #{switchIt}</if>
select id,name as name,date_format(created_time,'%Y-%m-%d %H:%i:%s') as createdTime,date_format(alter_time,'%Y-%m-%d %H:%i:%s') as alterTime from topology_user where id = #{id}
select id,name as name,date_format(created_time,'%Y-%m-%d %H:%i:%s') as createdTime,date_format(alter_time,'%Y-%m-%d %H:%i:%s') as alterTime,switch_it as switchIt from topology where id = #{id}