select user_id, username, nick_name, (CASE user_type WHEN '1' THEN '居民用户' WHEN '2' THEN '商业用户'WHEN '3' THEN '工业用户'end) as user_type , address, longitude, latitude, linkman, phone, email, is_del, remarks from t_detector_user
<where>
<where> is_del = '0'
<iftest="username != null and username != ''"> and username like concat('%', #{username}, '%')</if>
<iftest="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>