Browse Source

数据库转换成pg,mapper修改sql语句

dev
mh 4 months ago
parent
commit
ff763f89db
  1. 4
      mh-system/src/main/resources/mapper/system/SysLogininforMapper.xml
  2. 2
      mh-system/src/main/resources/mapper/system/SysNoticeMapper.xml
  3. 4
      mh-system/src/main/resources/mapper/system/SysOperLogMapper.xml

4
mh-system/src/main/resources/mapper/system/SysLogininforMapper.xml

@ -34,10 +34,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND user_name like concat('%', #{userName}, '%') AND user_name like concat('%', #{userName}, '%')
</if> </if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
AND login_time &gt;= #{params.beginTime} AND login_time &gt;= #{params.beginTime}::timestamp
</if> </if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND login_time &lt;= #{params.endTime} AND login_time &lt;= #{params.endTime}::timestamp
</if> </if>
</where> </where>
order by info_id desc order by info_id desc

2
mh-system/src/main/resources/mapper/system/SysNoticeMapper.xml

@ -18,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectNoticeVo"> <sql id="selectNoticeVo">
select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark select notice_id, notice_title, notice_type, notice_content, status, create_by, create_time, update_by, update_time, remark
from sys_notice from sys_notice
</sql> </sql>

4
mh-system/src/main/resources/mapper/system/SysOperLogMapper.xml

@ -59,10 +59,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND oper_name like concat('%', #{operName}, '%') AND oper_name like concat('%', #{operName}, '%')
</if> </if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
AND oper_time &gt;= #{params.beginTime} AND oper_time &gt;= #{params.beginTime}::timestamp
</if> </if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND oper_time &lt;= #{params.endTime} AND oper_time &lt;= #{params.endTime}::timestamp
</if> </if>
</where> </where>
order by oper_id desc order by oper_id desc

Loading…
Cancel
Save