支持批量INSERT,UPDATE,DELETE语句
支持数字、字符串、IN、BETWEEN、LIKE等常用表达式
支持特定特定条件不转换(数值前加#)
select a from table where b in (select b from dtable where c=1 and d=1 and e in (1,3)) and dd=#12313
点击【SQL转Mybatis】按钮直接转换为:
<select id="getProjectById" resultType="com.sdk.bo.ProjectBO"> select a from table where 1=1 AND b in ( select b from dtable where 1=1 <if test="c!=null and c!=''"> AND c=#{c} </if> <if test="d!=null and d!=''"> and d=#{d} </if> <if test="eList !=null and eList.size()>0"> and e in <foreach item="e" index="index" collection="eList" open="(" separator="," close=")"> #{e} </foreach> </if> ) and dd=12313 </select>
==> Preparing: select id, bucket_name, object_key, etag, version_id, creator, created, file_name, file_ext, file_size, updator, updated, enabled, object_url from ability_obs where id = ?
==> Parameters: 458898(Long)
点击【Mybatis转SQL】按钮直接转换为:
select id, bucket_name, object_key, etag, version_id, creator, created, file_name, file_ext, file_size, updator, updated, enabled, object_url from ability_obs where id = 458898