| 12345678910111213141516171819202122232425262728 |
- <?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="com.cdf.mapper.ILogMapper">
- <select id="getPageByParam" resultType="com.cdf.response.LogVo" parameterType="com.cdf.request.LogRequest">
- select * from t_log l
- left join t_user u on l.user_id = u.id
- left join t_dept d on u.dept_id = d.id
- left join t_role r on u.role_id = r.id
- WHERE l.tb_status = 0
- <if test="param.phone != null and param.phone !=''">
- and u.phone like CONCAT('%', #{param.phone},'%')
- </if>
- <if test="param.nickName != null and param.nickName !=''">
- and u.nick_name like CONCAT('%', #{param.nickName},'%')
- </if>
- <if test="param.deptId != null ">
- and u.dept_id = #{param.deptId}
- </if>
- <if test="param.startTime != null and param.startTime != ''">
- and l.create_time >= #{param.startTime}
- </if>
- <if test="param.endTime != null and param.endTime != ''">
- and l.create_time <= #{param.endTime}
- </if>
- order by l.create_time desc
- </select>
- </mapper>
|