ThoughtWeekjobFuMapper.xml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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.supervision.thought.mapper.ThoughtWeekjobFuMapper">
  6. <resultMap type="ThoughtWeekjobFu" id="ThoughtWeekjobFuResult">
  7. <result property="id" column="id" />
  8. <result property="week" column="week" />
  9. <result property="time" column="time" />
  10. <result property="dateline" column="dateline" />
  11. <result property="contents" column="contents" />
  12. <result property="unitId1" column="unit_id1" />
  13. <result property="peopleIds" column="people_ids" />
  14. <result property="address" column="address" />
  15. <result property="startTime" column="start_time" />
  16. <result property="endTime" column="end_time" />
  17. <result property="weekjobId" column="weekjob_id" />
  18. <result property="shouldArrive" column="should_arrive" />
  19. <result property="realTo" column="real_to" />
  20. <result property="percentage" column="percentage" />
  21. <result property="organizer" column="organizer" />
  22. </resultMap>
  23. <sql id="selectThoughtWeekjobFuVo">
  24. select id, week, time, dateline, contents, unit_id1, people_ids, address, start_time, end_time, weekjob_id, should_arrive, real_to, percentage, organizer from thought_weekjob_fu
  25. </sql>
  26. <select id="selectThoughtWeekjobFuList" parameterType="ThoughtWeekjobFu" resultMap="ThoughtWeekjobFuResult">
  27. <include refid="selectThoughtWeekjobFuVo"/>
  28. <where>
  29. <if test="week != null and week != ''"> and week = #{week}</if>
  30. <if test="time != null "> and time = #{time}</if>
  31. <if test="dateline != null and dateline != ''"> and dateline = #{dateline}</if>
  32. <if test="contents != null and contents != ''"> and contents = #{contents}</if>
  33. <if test="unitId1 != null and unitId1 != ''"> and unit_id1 = #{unitId1}</if>
  34. <if test="peopleIds != null and peopleIds != ''"> and people_ids = #{peopleIds}</if>
  35. <if test="address != null and address != ''"> and address = #{address}</if>
  36. <if test="startTime != null and startTime != ''"> and start_time = #{startTime}</if>
  37. <if test="endTime != null and endTime != ''"> and end_time = #{endTime}</if>
  38. <if test="weekjobId != null "> and weekjob_id = #{weekjobId}</if>
  39. <if test="shouldArrive != null "> and should_arrive = #{shouldArrive}</if>
  40. <if test="realTo != null "> and real_to = #{realTo}</if>
  41. <if test="percentage != null and percentage != ''"> and percentage = #{percentage}</if>
  42. <if test="organizer != null and organizer != ''"> and organizer = #{organizer}</if>
  43. </where>
  44. </select>
  45. <select id="selectThoughtWeekjobFuById" parameterType="Long" resultMap="ThoughtWeekjobFuResult">
  46. <include refid="selectThoughtWeekjobFuVo"/>
  47. where id = #{id}
  48. </select>
  49. <insert id="insertThoughtWeekjobFu" parameterType="ThoughtWeekjobFu" useGeneratedKeys="true" keyProperty="id">
  50. insert into thought_weekjob_fu
  51. <trim prefix="(" suffix=")" suffixOverrides=",">
  52. <if test="week != null">week,</if>
  53. <if test="time != null">time,</if>
  54. <if test="dateline != null">dateline,</if>
  55. <if test="contents != null">contents,</if>
  56. <if test="unitId1 != null">unit_id1,</if>
  57. <if test="peopleIds != null">people_ids,</if>
  58. <if test="address != null">address,</if>
  59. <if test="startTime != null">start_time,</if>
  60. <if test="endTime != null">end_time,</if>
  61. <if test="weekjobId != null">weekjob_id,</if>
  62. <if test="shouldArrive != null">should_arrive,</if>
  63. <if test="realTo != null">real_to,</if>
  64. <if test="percentage != null">percentage,</if>
  65. <if test="organizer != null">organizer,</if>
  66. </trim>
  67. <trim prefix="values (" suffix=")" suffixOverrides=",">
  68. <if test="week != null">#{week},</if>
  69. <if test="time != null">#{time},</if>
  70. <if test="dateline != null">#{dateline},</if>
  71. <if test="contents != null">#{contents},</if>
  72. <if test="unitId1 != null">#{unitId1},</if>
  73. <if test="peopleIds != null">#{peopleIds},</if>
  74. <if test="address != null">#{address},</if>
  75. <if test="startTime != null">#{startTime},</if>
  76. <if test="endTime != null">#{endTime},</if>
  77. <if test="weekjobId != null">#{weekjobId},</if>
  78. <if test="shouldArrive != null">#{shouldArrive},</if>
  79. <if test="realTo != null">#{realTo},</if>
  80. <if test="percentage != null">#{percentage},</if>
  81. <if test="organizer != null">#{organizer},</if>
  82. </trim>
  83. </insert>
  84. <update id="updateThoughtWeekjobFu" parameterType="ThoughtWeekjobFu">
  85. update thought_weekjob_fu
  86. <trim prefix="SET" suffixOverrides=",">
  87. <if test="week != null">week = #{week},</if>
  88. <if test="time != null">time = #{time},</if>
  89. <if test="dateline != null">dateline = #{dateline},</if>
  90. <if test="contents != null">contents = #{contents},</if>
  91. <if test="unitId1 != null">unit_id1 = #{unitId1},</if>
  92. <if test="peopleIds != null">people_ids = #{peopleIds},</if>
  93. <if test="address != null">address = #{address},</if>
  94. <if test="startTime != null">start_time = #{startTime},</if>
  95. <if test="endTime != null">end_time = #{endTime},</if>
  96. <if test="weekjobId != null">weekjob_id = #{weekjobId},</if>
  97. <if test="shouldArrive != null">should_arrive = #{shouldArrive},</if>
  98. <if test="realTo != null">real_to = #{realTo},</if>
  99. <if test="percentage != null">percentage = #{percentage},</if>
  100. <if test="organizer != null">organizer = #{organizer},</if>
  101. </trim>
  102. where id = #{id}
  103. </update>
  104. <delete id="deleteThoughtWeekjobFuById" parameterType="Long">
  105. delete from thought_weekjob_fu where id = #{id}
  106. </delete>
  107. <delete id="deleteThoughtWeekjobFuByIds" parameterType="String">
  108. delete from thought_weekjob_fu where id in
  109. <foreach item="id" collection="array" open="(" separator="," close=")">
  110. #{id}
  111. </foreach>
  112. </delete>
  113. </mapper>