SysLogCQuery.xml 1.0 KB

1234567891011121314151617181920212223
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.bowintek.practice.mapper.cquery.SysLogCQuery">
  4. <select id="selectLogList" resultType="com.bowintek.practice.vo.system.LogModel">
  5. select l.logID,l.logID,l.pageUrl,l.actionName,l.userID,l.logTime,us.name as userName,us.loginID,l.pageName
  6. from sys_log l
  7. inner join sys_user us on l.userID = us.userID
  8. where 1=1
  9. <if test="userName!='' and userName!=null">
  10. and us.name like Concat('%',#{userName},'%')
  11. </if>
  12. <if test="loginID!='' and loginID!=null">
  13. and us.loginID like Concat('%',#{loginID},'%')
  14. </if>
  15. <if test="startDate != null">
  16. and l.logTime <![CDATA[ >= ]]> #{startDate}
  17. </if>
  18. <if test="startDate != null ">
  19. and l.logTime <![CDATA[ < ]]> date_add(#{startDate}, interval 1 day)
  20. </if>
  21. order by l.logTime desc
  22. </select>
  23. </mapper>