- 1.设置 settsings(Ctrl+Alt+S) -->Editor --> Code Style --> SQL 将keywords设置为大写(To upper)
如下图:
- 在sql文件中全选(Ctrl+A) -->格式化(Ctrl + Alt + L) 即可
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org/DTD Mapper 3.0" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.org.celay.mapper.AppWzglMapper">
<resultMap id="appWzglMap" type="AppWzgl">
</resultMap>
<select id="getPageList" resultMap="appWzglMap">
SELECT *
FROM APP_WZGL
WHERE zt != -1
<if test="null != lx">
AND LX = #{lx}
</if>
<if test="null != bt">
AND BT LIKE concat(concat('%',#{bt}),'%')
</if>
</select>
</mapper>
网友评论