SqmyUnitReplyMapper.xml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.system.mapper.SqmyUnitReplyMapper">
  6. <resultMap type="SqmyUnitReply" id="SqmyUnitReplyResult">
  7. <result property="id" column="id" />
  8. <result property="deptId" column="dept_id" />
  9. <result property="deptName" column="dept_name" />
  10. <result property="sqmyId" column="sqmy_id" />
  11. <result property="isReply" column="is_reply" />
  12. <result property="content" column="content" />
  13. <result property="type" column="type" />
  14. <result property="startTime" column="start_time" />
  15. <result property="endTime" column="end_time" />
  16. <result property="handling" column="handling" />
  17. <result property="degree" column="degree" />
  18. <result property="remark" column="remark" />
  19. </resultMap>
  20. <sql id="selectSqmyUnitReplyVo">
  21. select id, dept_id, dept_name, sqmy_id, is_reply, content, type, start_time, end_time, handling, degree, remark from sqmy_unit_reply
  22. </sql>
  23. <select id="selectSqmyUnitReplyList" parameterType="SqmyUnitReply" resultMap="SqmyUnitReplyResult">
  24. <include refid="selectSqmyUnitReplyVo"/>
  25. <where>
  26. <if test="deptId != null "> and dept_id = #{deptId}</if>
  27. <if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
  28. <if test="sqmyId != null "> and sqmy_id = #{sqmyId}</if>
  29. <if test="isReply != null and isReply != ''"> and is_reply = #{isReply}</if>
  30. <if test="content != null and content != ''"> and content = #{content}</if>
  31. <if test="type != null and type != ''"> and type = #{type}</if>
  32. <if test="startTime != null "> and start_time = #{startTime}</if>
  33. <if test="endTime != null "> and end_time = #{endTime}</if>
  34. <if test="handling != null and handling != ''"> and handling = #{handling}</if>
  35. <if test="degree != null and degree != ''"> and degree = #{degree}</if>
  36. </where>
  37. </select>
  38. <select id="selectSqmyUnitReplyById" parameterType="Long" resultMap="SqmyUnitReplyResult">
  39. <include refid="selectSqmyUnitReplyVo"/>
  40. where id = #{id}
  41. </select>
  42. <insert id="insertSqmyUnitReply" parameterType="SqmyUnitReply" useGeneratedKeys="true" keyProperty="id">
  43. insert into sqmy_unit_reply
  44. <trim prefix="(" suffix=")" suffixOverrides=",">
  45. <if test="deptId != null">dept_id,</if>
  46. <if test="deptName != null">dept_name,</if>
  47. <if test="sqmyId != null">sqmy_id,</if>
  48. <if test="isReply != null">is_reply,</if>
  49. <if test="content != null and content != ''">content,</if>
  50. <if test="type != null">type,</if>
  51. <if test="startTime != null">start_time,</if>
  52. <if test="endTime != null">end_time,</if>
  53. <if test="handling != null">handling,</if>
  54. <if test="degree != null">degree,</if>
  55. <if test="remark != null">remark,</if>
  56. </trim>
  57. <trim prefix="values (" suffix=")" suffixOverrides=",">
  58. <if test="deptId != null">#{deptId},</if>
  59. <if test="deptName != null">#{deptName},</if>
  60. <if test="sqmyId != null">#{sqmyId},</if>
  61. <if test="isReply != null">#{isReply},</if>
  62. <if test="content != null and content != ''">#{content},</if>
  63. <if test="type != null">#{type},</if>
  64. <if test="startTime != null">#{startTime},</if>
  65. <if test="endTime != null">#{endTime},</if>
  66. <if test="handling != null">#{handling},</if>
  67. <if test="degree != null">#{degree},</if>
  68. <if test="remark != null">#{remark},</if>
  69. </trim>
  70. </insert>
  71. <update id="updateSqmyUnitReply" parameterType="SqmyUnitReply">
  72. update sqmy_unit_reply
  73. <trim prefix="SET" suffixOverrides=",">
  74. <if test="deptId != null">dept_id = #{deptId},</if>
  75. <if test="deptName != null">dept_name = #{deptName},</if>
  76. <if test="sqmyId != null">sqmy_id = #{sqmyId},</if>
  77. <if test="isReply != null">is_reply = #{isReply},</if>
  78. <if test="content != null and content != ''">content = #{content},</if>
  79. <if test="type != null">type = #{type},</if>
  80. <if test="startTime != null">start_time = #{startTime},</if>
  81. <if test="endTime != null">end_time = #{endTime},</if>
  82. <if test="handling != null">handling = #{handling},</if>
  83. <if test="degree != null">degree = #{degree},</if>
  84. <if test="remark != null">remark = #{remark},</if>
  85. </trim>
  86. where id = #{id}
  87. </update>
  88. <delete id="deleteSqmyUnitReplyById" parameterType="Long">
  89. delete from sqmy_unit_reply where id = #{id}
  90. </delete>
  91. <delete id="deleteSqmyUnitReplyByIds" parameterType="String">
  92. delete from sqmy_unit_reply where id in
  93. <foreach item="id" collection="array" open="(" separator="," close=")">
  94. #{id}
  95. </foreach>
  96. </delete>
  97. </mapper>