<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.wise.sc.cement.business.mapper.SysLogsMapper">
<sql id="where">
<where>
<if test="params.startDate != null and params.startDate != ''">
and DATE(t.create_time) >= #{params.startDate}
</if>
<if test="params.endDate != null and params.endDate != ''">
and DATE(t.create_time) <= #{params.endDate}
</if>
<if test="params.objType != null">
and t.obj_type = #{params.objType}
</if>
<if test="params.objId != null">
and t.obj_id = #{params.objId}
</if>
</where>
</sql>
<select id="getPage" resultType="cn.wise.sc.cement.business.model.vo.LogVo">
select t.*,su.name as userName
from sys_logs t
left join sys_user su on su.id = t.user_id
<include refid="where"/>
order by t.create_time desc
</select>
</mapper>
-
qinhu authored56f766fe