<select id="getmaxnotonlineinfobyconditon" resulttype="com.shishike.susie.entity.customconfirminfo">
select *
from t_customconfirminfo
where (if(#{pduname,jdbctype=varchar} is null, 0 = 0, pduname = #{pduname,jdbctype=varchar})
and if(#{modulename,jdbctype=varchar} is null, 0 = 0, modulename = #{modulename,jdbctype=varchar})
and if(#{env,jdbctype=varchar} is null, 0 = 0, confirminfo = #{env,jdbctype=varchar})
and if(#{ossaddress,jdbctype=varchar} is null, 0 = 0, ossaddress = #{ossaddress,jdbctype=varchar})
and if(#{branch,jdbctype=varchar} is null, 0 = 0, branch like concat(concat('%',#{branch,jdbctype=varchar}),'%'))
and if(#{confirmid,jdbctype=bigint} is null, 0 = 0, id > #{confirmid,jdbctype=bigint})
and onlineinfo is null)
order by created desc
limit 1
</select>
<select id="finduserbyfuzzyemail" resultmap="baseresultmap"
parametertype="java.lang.string">
select id,username,email,status,createtime,updatetime from tb_user
<bind name="pattern" value="'%'+_parameter.getemail() +'%'" />
<where>
<if test="email != null and email != ''">
email like #{pattern}
</if>
</where>
</select>