ToolLogMapper.xml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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.platform.dao.mapper.tool.ToolLogMapper">
  4. <sql id="Base_Column_List">
  5. log.id,
  6. log.check_user_id,
  7. log.requirement,
  8. log.remark,
  9. log.created_user_id,
  10. log.update_user_id,
  11. log.created_user_name,
  12. log.update_user_name,
  13. log.created_time,
  14. log.update_time,
  15. log.tool_id,
  16. log.check_date,
  17. log.img_path,
  18. log.file_path
  19. </sql>
  20. <sql id="Ref_Column_List">
  21. log.check_user_id,
  22. log.requirement,
  23. log.remark, log.tool_id,
  24. log.check_date,
  25. log.img_path,
  26. log.file_path
  27. </sql>
  28. <sql id="List_Condition">
  29. <if test="id != null and id != ''">
  30. and log.id = #{id}
  31. </if>
  32. <if test="checkUserId != null and checkUserId != ''">
  33. and log.check_user_id = #{checkUserId}
  34. </if>
  35. <if test="requirement != null and requirement != ''">
  36. and log.requirement = #{requirement}
  37. </if>
  38. <if test="remark != null and remark != ''">
  39. and log.remark = #{remark}
  40. </if>
  41. <if test="createdUserId != null and createdUserId != ''">
  42. and log.created_user_id = #{createdUserId}
  43. </if>
  44. <if test="updateUserId != null and updateUserId != ''">
  45. and log.update_user_id = #{updateUserId}
  46. </if>
  47. <if test="createdUserName != null and createdUserName != ''">
  48. and log.created_user_name = #{createdUserName}
  49. </if>
  50. <if test="updateUserName != null and updateUserName != ''">
  51. and log.update_user_name = #{updateUserName}
  52. </if>
  53. <if test="createdTimeStart != null">
  54. and log.created_time <![CDATA[>=]]>; #{createdTimeStart}
  55. </if>
  56. <if test="createdTimeEnd != null">
  57. and log.created_time <![CDATA[<=]]> #{createdTimeEnd}
  58. </if>
  59. <if test="createdTime != null">
  60. and log.created_time = #{createdTime}
  61. </if>
  62. <if test="updateTimeStart != null">
  63. and log.update_time <![CDATA[>=]]>; #{updateTimeStart}
  64. </if>
  65. <if test="updateTimeEnd != null">
  66. and log.update_time <![CDATA[<=]]> #{updateTimeEnd}
  67. </if>
  68. <if test="updateTime != null">
  69. and log.update_time = #{updateTime}
  70. </if>
  71. <if test="toolId != null and toolId != ''">
  72. and log.tool_id = #{toolId}
  73. </if>
  74. <if test="checkDateStart != null">
  75. and log.check_date <![CDATA[>=]]>; #{checkDateStart}
  76. </if>
  77. <if test="checkDateEnd != null">
  78. and log.check_date <![CDATA[<=]]> #{checkDateEnd}
  79. </if>
  80. <if test="checkDate != null">
  81. and log.check_date = #{checkDate}
  82. </if>
  83. <if test="imgPath != null and imgPath != ''">
  84. and log.img_path = #{imgPath}
  85. </if>
  86. <if test="filePath != null and filePath != ''">
  87. and log.file_path = #{filePath}
  88. </if>
  89. <if test="keyword != null and keyword != ''">
  90. and log.id like concat(concat('%',#{keyword}),'%')
  91. </if>
  92. </sql>
  93. <select id="selectList" parameterType="com.platform.dao.dto.tool.ToolLogDTO"
  94. resultType="com.platform.dao.vo.query.tool.ToolLogVO">
  95. select log.*, tool.name as toolName, tool.ggxh as ggxh
  96. from t_tool_log as log
  97. Left JOIN t_tool as tool
  98. <where>
  99. <include refid="List_Condition"/>
  100. </where>
  101. </select>
  102. </mapper>