综合办公系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CmcContractMeetingMapper.xml 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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.oa.mapper.CmcContractMeetingMapper">
  6. <resultMap type="CmcContractMeeting" id="CmcContractMeetingResult">
  7. <result property="meetingId" column="meeting_id" />
  8. <result property="contractId" column="contract_id" />
  9. <result property="meetingTime" column="meeting_time" />
  10. <result property="hostId" column="host_id" />
  11. <result property="place" column="place" />
  12. <result property="users" column="users" />
  13. <result property="conclusion" column="conclusion" />
  14. <result property="document" column="document" />
  15. <result property="commentTime" column="comment_time" />
  16. </resultMap>
  17. <sql id="selectCmcContractMeetingVo">
  18. select meeting_id, contract_id, meeting_time, host_id, place, users, conclusion, document, comment_time from cmc_contract_meeting
  19. </sql>
  20. <select id="selectCmcContractMeetingList" parameterType="CmcContractMeeting" resultMap="CmcContractMeetingResult">
  21. <include refid="selectCmcContractMeetingVo"/>
  22. <where>
  23. <if test="contractId != null and contractId != ''"> and contract_id = #{contractId}</if>
  24. <if test="meetingTime != null "> and meeting_time = #{meetingTime}</if>
  25. <if test="hostId != null "> and host_id = #{hostId}</if>
  26. <if test="place != null and place != ''"> and place = #{place}</if>
  27. <if test="users != null and users != ''"> and users = #{users}</if>
  28. <if test="conclusion != null and conclusion != ''"> and conclusion = #{conclusion}</if>
  29. <if test="document != null and document != ''"> and document = #{document}</if>
  30. <if test="commentTime != null "> and comment_time = #{commentTime}</if>
  31. </where>
  32. </select>
  33. <select id="selectCmcContractMeetingByContractId" parameterType="String" resultMap="CmcContractMeetingResult">
  34. <include refid="selectCmcContractMeetingVo"/>
  35. where contract_id = #{contractId}
  36. </select>
  37. <insert id="insertCmcContractMeeting" parameterType="CmcContractMeeting">
  38. insert into cmc_contract_meeting
  39. <trim prefix="(" suffix=")" suffixOverrides=",">
  40. <if test="meetingId != null">meeting_id,</if>
  41. <if test="contractId != null">contract_id,</if>
  42. <if test="meetingTime != null">meeting_time,</if>
  43. <if test="hostId != null">host_id,</if>
  44. <if test="place != null">place,</if>
  45. <if test="users != null">users,</if>
  46. <if test="conclusion != null">conclusion,</if>
  47. <if test="document != null">document,</if>
  48. <if test="commentTime != null">comment_time,</if>
  49. </trim>
  50. <trim prefix="values (" suffix=")" suffixOverrides=",">
  51. <if test="meetingId != null">#{meetingId},</if>
  52. <if test="contractId != null">#{contractId},</if>
  53. <if test="meetingTime != null">#{meetingTime},</if>
  54. <if test="hostId != null">#{hostId},</if>
  55. <if test="place != null">#{place},</if>
  56. <if test="users != null">#{users},</if>
  57. <if test="conclusion != null">#{conclusion},</if>
  58. <if test="document != null">#{document},</if>
  59. <if test="commentTime != null">#{commentTime},</if>
  60. </trim>
  61. </insert>
  62. <update id="updateCmcContractMeeting" parameterType="CmcContractMeeting">
  63. update cmc_contract_meeting
  64. <trim prefix="SET" suffixOverrides=",">
  65. <if test="contractId != null">contract_id = #{contractId},</if>
  66. <if test="meetingTime != null">meeting_time = #{meetingTime},</if>
  67. <if test="hostId != null">host_id = #{hostId},</if>
  68. <if test="place != null">place = #{place},</if>
  69. <if test="users != null">users = #{users},</if>
  70. <if test="conclusion != null">conclusion = #{conclusion},</if>
  71. <if test="document != null">document = #{document},</if>
  72. <if test="commentTime != null">comment_time = #{commentTime},</if>
  73. </trim>
  74. where meeting_id = #{meetingId}
  75. </update>
  76. <delete id="deleteCmcContractMeetingByContractId" parameterType="String">
  77. delete from cmc_contract_meeting where contract_id = #{contractId}
  78. </delete>
  79. <delete id="deleteCmcContractMeetingByContractIds" parameterType="String">
  80. delete from cmc_contract_meeting where contract_id in
  81. <foreach item="contractId" collection="array" open="(" separator="," close=")">
  82. #{contractId}
  83. </foreach>
  84. </delete>
  85. </mapper>