TProjectMeetingMapper.xml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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.invest.mapper.TProjectMeetingMapper">
  6. <resultMap type="TProjectMeeting" id="TProjectMeetingResult">
  7. <result property="id" column="id" />
  8. <result property="meetingTheme" column="meeting_theme" />
  9. <result property="meetingCode" column="meeting_code" />
  10. <result property="meetingType" column="meeting_type" />
  11. <result property="projectPoolId" column="project_pool_id" />
  12. <result property="startTime" column="start_time" />
  13. <result property="endTime" column="end_time" />
  14. <result property="place" column="place" />
  15. <result property="promoter" column="promoter" />
  16. <result property="participants" column="participants" />
  17. <result property="delFlag" column="del_flag" />
  18. <result property="createBy" column="create_by" />
  19. <result property="createTime" column="create_time" />
  20. <result property="updateBy" column="update_by" />
  21. <result property="updateTime" column="update_time" />
  22. </resultMap>
  23. <sql id="selectTProjectMeetingVo">
  24. select id, meeting_theme, meeting_code, meeting_type, project_pool_id, start_time, end_time, place, promoter, participants, del_flag, create_by, create_time, update_by, update_time from t_project_meeting
  25. </sql>
  26. <select id="selectTProjectMeetingList" parameterType="TProjectMeeting" resultMap="TProjectMeetingResult">
  27. <include refid="selectTProjectMeetingVo"/>
  28. <where>
  29. del_flag = 0
  30. <if test="meetingTheme != null and meetingTheme != ''"> and meeting_theme = #{meetingTheme}</if>
  31. <if test="meetingCode != null and meetingCode != ''"> and meeting_code = #{meetingCode}</if>
  32. <if test="meetingType != null and meetingType != ''"> and meeting_type = #{meetingType}</if>
  33. <if test="startTime != null "> and start_time = #{startTime}</if>
  34. <if test="endTime != null "> and end_time = #{endTime}</if>
  35. </where>
  36. </select>
  37. <select id="selectTProjectMeetingById" parameterType="String" resultMap="TProjectMeetingResult">
  38. <include refid="selectTProjectMeetingVo"/>
  39. where id = #{id}
  40. </select>
  41. <insert id="insertTProjectMeeting" parameterType="TProjectMeeting">
  42. insert into t_project_meeting
  43. <trim prefix="(" suffix=")" suffixOverrides=",">
  44. <if test="id != null">id,</if>
  45. <if test="meetingTheme != null">meeting_theme,</if>
  46. <if test="meetingCode != null">meeting_code,</if>
  47. <if test="meetingType != null">meeting_type,</if>
  48. <if test="projectPoolId != null">project_pool_id,</if>
  49. <if test="startTime != null">start_time,</if>
  50. <if test="endTime != null">end_time,</if>
  51. <if test="place != null">place,</if>
  52. <if test="promoter != null">promoter,</if>
  53. <if test="participants != null">participants,</if>
  54. <if test="delFlag != null">del_flag,</if>
  55. <if test="createBy != null">create_by,</if>
  56. <if test="createTime != null">create_time,</if>
  57. <if test="updateBy != null">update_by,</if>
  58. <if test="updateTime != null">update_time,</if>
  59. </trim>
  60. <trim prefix="values (" suffix=")" suffixOverrides=",">
  61. <if test="id != null">#{id},</if>
  62. <if test="meetingTheme != null">#{meetingTheme},</if>
  63. <if test="meetingCode != null">#{meetingCode},</if>
  64. <if test="meetingType != null">#{meetingType},</if>
  65. <if test="projectPoolId != null">#{projectPoolId},</if>
  66. <if test="startTime != null">#{startTime},</if>
  67. <if test="endTime != null">#{endTime},</if>
  68. <if test="place != null">#{place},</if>
  69. <if test="promoter != null">#{promoter},</if>
  70. <if test="participants != null">#{participants},</if>
  71. <if test="delFlag != null">#{delFlag},</if>
  72. <if test="createBy != null">#{createBy},</if>
  73. <if test="createTime != null">#{createTime},</if>
  74. <if test="updateBy != null">#{updateBy},</if>
  75. <if test="updateTime != null">#{updateTime},</if>
  76. </trim>
  77. </insert>
  78. <update id="updateTProjectMeeting" parameterType="TProjectMeeting">
  79. update t_project_meeting
  80. <trim prefix="SET" suffixOverrides=",">
  81. <if test="meetingTheme != null">meeting_theme = #{meetingTheme},</if>
  82. <if test="meetingCode != null">meeting_code = #{meetingCode},</if>
  83. <if test="meetingType != null">meeting_type = #{meetingType},</if>
  84. <if test="projectPoolId != null">project_pool_id = #{projectPoolId},</if>
  85. <if test="startTime != null">start_time = #{startTime},</if>
  86. <if test="endTime != null">end_time = #{endTime},</if>
  87. <if test="place != null">place = #{place},</if>
  88. <if test="promoter != null">promoter = #{promoter},</if>
  89. <if test="participants != null">participants = #{participants},</if>
  90. <if test="delFlag != null">del_flag = #{delFlag},</if>
  91. <if test="createBy != null">create_by = #{createBy},</if>
  92. <if test="createTime != null">create_time = #{createTime},</if>
  93. <if test="updateBy != null">update_by = #{updateBy},</if>
  94. <if test="updateTime != null">update_time = #{updateTime},</if>
  95. </trim>
  96. where id = #{id}
  97. </update>
  98. <delete id="deleteTProjectMeetingById" parameterType="String">
  99. delete from t_project_meeting where id = #{id}
  100. </delete>
  101. <delete id="deleteTProjectMeetingByIds" parameterType="String">
  102. delete from t_project_meeting where id in
  103. <foreach item="id" collection="array" open="(" separator="," close=")">
  104. #{id}
  105. </foreach>
  106. </delete>
  107. <update id="updateTProjectMeetingByIds" parameterType="String">
  108. update t_project_meeting
  109. set del_flag = 1
  110. where id in
  111. <foreach item="id" collection="array" open="(" separator="," close=")">
  112. #{id}
  113. </foreach>
  114. </update>
  115. </mapper>