TBranchMeetingMgrMapper.xml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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.branch.mapper.TBranchMeetingMgrMapper">
  6. <resultMap type="TBranchMeetingMgr" id="TBranchMeetingMgrResult">
  7. <result property="meetingId" column="meeting_id" />
  8. <result property="meetingType" column="meeting_type" />
  9. <result property="meetingTime" column="meeting_time" />
  10. <result property="meetingVenue" column="meeting_venue" />
  11. <result property="host" column="host" />
  12. <result property="recorder" column="recorder" />
  13. <result property="participants" column="participants" />
  14. <result property="absentees" column="absentees" />
  15. <result property="attendees" column="attendees" />
  16. <result property="mainTopics" column="main_topics" />
  17. <result property="resolutionsFormed" column="resolutions_formed" />
  18. <result property="remarks" column="remarks" />
  19. <result property="delFlag" column="del_flag" />
  20. <result property="createBy" column="create_by" />
  21. <result property="createTime" column="create_time" />
  22. <result property="updateBy" column="update_by" />
  23. <result property="updateTime" column="update_time" />
  24. </resultMap>
  25. <sql id="selectTBranchMeetingMgrVo">
  26. select meeting_id, meeting_type, meeting_time, meeting_venue, host, recorder, participants, absentees, attendees, main_topics, resolutions_formed, remarks, del_flag, create_by, create_time, update_by, update_time from t_branch_meeting_mgr
  27. </sql>
  28. <select id="selectTBranchMeetingMgrList" parameterType="TBranchMeetingMgr" resultMap="TBranchMeetingMgrResult">
  29. <include refid="selectTBranchMeetingMgrVo"/>
  30. <where>
  31. <if test="meetingId != null "> and meeting_id = #{meetingId}</if>
  32. <if test="meetingType != null and meetingType != ''"> and meeting_type = #{meetingType}</if>
  33. <if test="meetingTime != null "> and meeting_time = #{meetingTime}</if>
  34. <if test="meetingVenue != null and meetingVenue != ''"> and meeting_venue = #{meetingVenue}</if>
  35. <if test="host != null and host != ''"> and host = #{host}</if>
  36. <if test="recorder != null and recorder != ''"> and recorder = #{recorder}</if>
  37. <if test="participants != null and participants != ''"> and participants = #{participants}</if>
  38. <if test="absentees != null and absentees != ''"> and absentees = #{absentees}</if>
  39. <if test="attendees != null and attendees != ''"> and attendees = #{attendees}</if>
  40. <if test="mainTopics != null and mainTopics != ''"> and main_topics = #{mainTopics}</if>
  41. <if test="resolutionsFormed != null and resolutionsFormed != ''"> and resolutions_formed = #{resolutionsFormed}</if>
  42. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  43. and del_flag = 0
  44. </where>
  45. order by meeting_time desc
  46. </select>
  47. <select id="selectTBranchMeetingMgrByMeetingId" parameterType="Long" resultMap="TBranchMeetingMgrResult">
  48. <include refid="selectTBranchMeetingMgrVo"/>
  49. where meeting_id = #{meetingId}
  50. </select>
  51. <insert id="insertTBranchMeetingMgr" parameterType="TBranchMeetingMgr">
  52. <selectKey keyProperty="meetingId" resultType="long" order="BEFORE">
  53. SELECT seq_t_branch_meeting_mgr.NEXTVAL as meetingId FROM DUAL
  54. </selectKey>
  55. insert into t_branch_meeting_mgr
  56. <trim prefix="(" suffix=")" suffixOverrides=",">
  57. <if test="meetingId != null">meeting_id,</if>
  58. <if test="meetingType != null">meeting_type,</if>
  59. <if test="meetingTime != null">meeting_time,</if>
  60. <if test="meetingVenue != null">meeting_venue,</if>
  61. <if test="host != null">host,</if>
  62. <if test="recorder != null">recorder,</if>
  63. <if test="participants != null">participants,</if>
  64. <if test="absentees != null">absentees,</if>
  65. <if test="attendees != null">attendees,</if>
  66. <if test="mainTopics != null">main_topics,</if>
  67. <if test="resolutionsFormed != null">resolutions_formed,</if>
  68. <if test="remarks != null">remarks,</if>
  69. <if test="delFlag != null">del_flag,</if>
  70. <if test="createBy != null">create_by,</if>
  71. <if test="createTime != null">create_time,</if>
  72. <if test="updateBy != null">update_by,</if>
  73. <if test="updateTime != null">update_time,</if>
  74. </trim>
  75. <trim prefix="values (" suffix=")" suffixOverrides=",">
  76. <if test="meetingId != null">#{meetingId},</if>
  77. <if test="meetingType != null">#{meetingType},</if>
  78. <if test="meetingTime != null">#{meetingTime},</if>
  79. <if test="meetingVenue != null">#{meetingVenue},</if>
  80. <if test="host != null">#{host},</if>
  81. <if test="recorder != null">#{recorder},</if>
  82. <if test="participants != null">#{participants},</if>
  83. <if test="absentees != null">#{absentees},</if>
  84. <if test="attendees != null">#{attendees},</if>
  85. <if test="mainTopics != null">#{mainTopics},</if>
  86. <if test="resolutionsFormed != null">#{resolutionsFormed},</if>
  87. <if test="remarks != null">#{remarks},</if>
  88. <if test="delFlag != null">#{delFlag},</if>
  89. <if test="createBy != null">#{createBy},</if>
  90. <if test="createTime != null">#{createTime},</if>
  91. <if test="updateBy != null">#{updateBy},</if>
  92. <if test="updateTime != null">#{updateTime},</if>
  93. </trim>
  94. </insert>
  95. <update id="updateTBranchMeetingMgr" parameterType="TBranchMeetingMgr">
  96. update t_branch_meeting_mgr
  97. <trim prefix="SET" suffixOverrides=",">
  98. <if test="meetingType != null">meeting_type = #{meetingType},</if>
  99. <if test="meetingTime != null">meeting_time = #{meetingTime},</if>
  100. <if test="meetingVenue != null">meeting_venue = #{meetingVenue},</if>
  101. <if test="host != null">host = #{host},</if>
  102. <if test="recorder != null">recorder = #{recorder},</if>
  103. <if test="participants != null">participants = #{participants},</if>
  104. <if test="absentees != null">absentees = #{absentees},</if>
  105. <if test="attendees != null">attendees = #{attendees},</if>
  106. <if test="mainTopics != null">main_topics = #{mainTopics},</if>
  107. <if test="resolutionsFormed != null">resolutions_formed = #{resolutionsFormed},</if>
  108. <if test="remarks != null">remarks = #{remarks},</if>
  109. <if test="delFlag != null">del_flag = #{delFlag},</if>
  110. <if test="createBy != null">create_by = #{createBy},</if>
  111. <if test="createTime != null">create_time = #{createTime},</if>
  112. <if test="updateBy != null">update_by = #{updateBy},</if>
  113. <if test="updateTime != null">update_time = #{updateTime},</if>
  114. </trim>
  115. where meeting_id = #{meetingId}
  116. </update>
  117. <delete id="deleteTBranchMeetingMgrByMeetingId" parameterType="Long">
  118. update t_branch_meeting_mgr set del_flag = 2 where meeting_id = #{meetingId}
  119. </delete>
  120. <delete id="deleteTBranchMeetingMgrByMeetingIds" parameterType="String">
  121. update t_branch_meeting_mgr set del_flag = 2 where meeting_id in
  122. <foreach item="meetingId" collection="array" open="(" separator="," close=")">
  123. #{meetingId}
  124. </foreach>
  125. </delete>
  126. </mapper>