<?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.njcn.device.pms.mapper.majornetwork.TerminalLogMapper">

<select id="pageList" resultType="TerminalLog">
    select
    pms_terminal_log.id,
    pms_terminal_log.operator_describe,
    pms_terminal_log.type,
    pms_terminal_log.create_time,
    sys_user.name createBy
    from pms_terminal_log pms_terminal_log
    left join sys_user sys_user on pms_terminal_log.create_by = sys_user.id
    where pms_terminal_log.status = 1
    and sys_user.state = 1
    and pms_terminal_log.create_time between concat(#{pmsTerminalLogParam.searchBeginTime}," 00:00:00") and concat(#{pmsTerminalLogParam.searchEndTime}," 23:59:59")
    <if test="pmsTerminalLogParam.type!=null">
        and pms_terminal_log.type = #{pmsTerminalLogParam.type}
    </if>
    <if test="pmsTerminalLogParam.searchValue!=null and pmsTerminalLogParam.searchValue!=''">
        and pms_terminal_log.operator_describe like concat('%',#{pmsTerminalLogParam.searchValue},'%')
    </if>
    order by create_time desc

</select>


</mapper>
