SbUnusedMapper.xml 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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.sbUnused.SbUnusedMapper">
  4. <sql id="Base_Column_List">
  5. unused.id,
  6. unused.name,
  7. unused.apply_time,
  8. unused.apply_user_id,
  9. unused.status,
  10. unused.created_user_id,
  11. unused.created_time,
  12. unused.update_user_id,
  13. unused.verity_user_id
  14. </sql>
  15. <sql id="Ref_Column_List">
  16. unused.name,
  17. unused.apply_time,
  18. unused.apply_user_id,
  19. unused.status,
  20. unused.verity_user_id
  21. </sql>
  22. <sql id="List_Condition">
  23. <if test="id != null and id != ''">
  24. and unused.id = #{id}
  25. </if>
  26. <if test="name != null and name != ''">
  27. and unused.name = #{name}
  28. </if>
  29. <if test="applyTimeStart != null">
  30. and unused.apply_time <![CDATA[>=]]>; #{applyTimeStart}
  31. </if>
  32. <if test="applyTimeEnd != null">
  33. and unused.apply_time <![CDATA[<=]]> #{applyTimeEnd}
  34. </if>
  35. <if test="applyTime != null">
  36. and unused.apply_time = #{applyTime}
  37. </if>
  38. <if test="applyUserId != null and applyUserId != ''">
  39. and unused.apply_user_id = #{applyUserId}
  40. </if>
  41. <if test="status != null">
  42. and unused.status = #{status}
  43. </if>
  44. <if test="createdUserId != null and createdUserId != ''">
  45. and unused.created_user_id = #{createdUserId}
  46. </if>
  47. <if test="createdTimeStart != null">
  48. and unused.created_time <![CDATA[>=]]>; #{createdTimeStart}
  49. </if>
  50. <if test="createdTimeEnd != null">
  51. and unused.created_time <![CDATA[<=]]> #{createdTimeEnd}
  52. </if>
  53. <if test="createdTime != null">
  54. and unused.created_time = #{createdTime}
  55. </if>
  56. <if test="updateUserId != null and updateUserId != ''">
  57. and unused.update_user_id = #{updateUserId}
  58. </if>
  59. <if test="verityUserId != null and verityUserId != ''">
  60. and unused.verity_user_id = #{verityUserId}
  61. </if>
  62. <if test="keyword != null and keyword != ''">
  63. and unused.id like concat(concat('%',#{keyword}),'%')
  64. </if>
  65. </sql>
  66. <select id="selectList" parameterType="com.platform.dao.dto.sbUnused.SbUnusedDTO" resultType="com.platform.dao.vo.query.sbUnused.SbUnusedVO">
  67. select unused.*,user.real_name as applyName,user2.real_name as verifyUserName
  68. from t_sb_unused as unused left join t_sys_user user on user.user_id = unused.apply_user_id
  69. left join t_sys_user user2 on user2.user_id = unused.verity_user_id
  70. <where>
  71. <include refid="List_Condition" />
  72. </where>
  73. </select>
  74. <select id="getUnusedVO" parameterType="java.lang.String"
  75. resultType="com.platform.dao.vo.query.sbUnused.SbUnusedVO">
  76. select unused.*,user.real_name as applyName,user2.real_name as verifyUserName from t_sb_unused unused left join t_sys_user user
  77. on unused.apply_user_id = user.user_id
  78. left join t_sys_user user2 on user2.user_id = unused.verify_user_id
  79. where id = #{id}
  80. </select>
  81. </mapper>