TUDispatchMapper.xml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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.business.slfh.manager.dispatchmanager.mapper.TUDispatchMapper">
  6. <resultMap type="TUDispatch" id="TUDispatchResult">
  7. <result property="id" column="id" />
  8. <result property="status" column="status" />
  9. <result property="remark" column="remark" />
  10. <result property="delFlag" column="del_flag" />
  11. <result property="createBy" column="create_by" />
  12. <result property="createTime" column="create_time" />
  13. <result property="updateBy" column="update_by" />
  14. <result property="updateTime" column="update_time" />
  15. <result property="eventdispatchType" column="eventdispatch_type" />
  16. <result property="sender" column="sender" />
  17. <result property="senderTime" column="sender_time" />
  18. <result property="dispatchDescription" column="dispatch_description" />
  19. <result property="isApproval" column="is_approval" />
  20. <result property="approvalPerson" column="approval_person" />
  21. <result property="approvalTime" column="approval_time" />
  22. <result property="eventId" column="event_id" />
  23. <result property="reserveplanType" column="reserveplan_type" />
  24. </resultMap>
  25. <sql id="selectTUDispatchVo">
  26. select id, status, remark, del_flag, create_by, create_time, update_by, update_time, eventdispatch_type, sender, sender_time, dispatch_description, is_approval, approval_person, approval_time, event_id, reserveplan_type from t_u_dispatch
  27. </sql>
  28. <select id="selectTUDispatchList" parameterType="TUDispatch" resultMap="TUDispatchResult">
  29. <include refid="selectTUDispatchVo"/>
  30. <where>
  31. <if test="status != null and status != ''"> and status = #{status}</if>
  32. <if test="eventdispatchType != null and eventdispatchType != ''"> and eventdispatch_type = #{eventdispatchType}</if>
  33. <if test="sender != null and sender != ''"> and sender = #{sender}</if>
  34. <if test="senderTime != null "> and sender_time = #{senderTime}</if>
  35. <if test="dispatchDescription != null and dispatchDescription != ''"> and dispatch_description = #{dispatchDescription}</if>
  36. <if test="isApproval != null "> and is_approval = #{isApproval}</if>
  37. <if test="approvalPerson != null and approvalPerson != ''"> and approval_person = #{approvalPerson}</if>
  38. <if test="approvalTime != null "> and approval_time = #{approvalTime}</if>
  39. <if test="eventId != null and eventId != ''"> and event_id = #{eventId}</if>
  40. <if test="reserveplanType != null and reserveplanType != ''"> and reserveplan_type = #{reserveplanType}</if>
  41. </where>
  42. </select>
  43. <select id="selectTUDispatchById" parameterType="String" resultMap="TUDispatchResult">
  44. <include refid="selectTUDispatchVo"/>
  45. where id = #{id}
  46. </select>
  47. <insert id="insertTUDispatch" parameterType="TUDispatch">
  48. insert into t_u_dispatch
  49. <trim prefix="(" suffix=")" suffixOverrides=",">
  50. <if test="id != null">id,</if>
  51. <if test="status != null">status,</if>
  52. <if test="remark != null">remark,</if>
  53. <if test="delFlag != null">del_flag,</if>
  54. <if test="createBy != null">create_by,</if>
  55. <if test="createTime != null">create_time,</if>
  56. <if test="updateBy != null">update_by,</if>
  57. <if test="updateTime != null">update_time,</if>
  58. <if test="eventdispatchType != null">eventdispatch_type,</if>
  59. <if test="sender != null">sender,</if>
  60. <if test="senderTime != null">sender_time,</if>
  61. <if test="dispatchDescription != null">dispatch_description,</if>
  62. <if test="isApproval != null">is_approval,</if>
  63. <if test="approvalPerson != null">approval_person,</if>
  64. <if test="approvalTime != null">approval_time,</if>
  65. <if test="eventId != null">event_id,</if>
  66. <if test="reserveplanType != null">reserveplan_type,</if>
  67. </trim>
  68. <trim prefix="values (" suffix=")" suffixOverrides=",">
  69. <if test="id != null">#{id},</if>
  70. <if test="status != null">#{status},</if>
  71. <if test="remark != null">#{remark},</if>
  72. <if test="delFlag != null">#{delFlag},</if>
  73. <if test="createBy != null">#{createBy},</if>
  74. <if test="createTime != null">#{createTime},</if>
  75. <if test="updateBy != null">#{updateBy},</if>
  76. <if test="updateTime != null">#{updateTime},</if>
  77. <if test="eventdispatchType != null">#{eventdispatchType},</if>
  78. <if test="sender != null">#{sender},</if>
  79. <if test="senderTime != null">#{senderTime},</if>
  80. <if test="dispatchDescription != null">#{dispatchDescription},</if>
  81. <if test="isApproval != null">#{isApproval},</if>
  82. <if test="approvalPerson != null">#{approvalPerson},</if>
  83. <if test="approvalTime != null">#{approvalTime},</if>
  84. <if test="eventId != null">#{eventId},</if>
  85. <if test="reserveplanType != null">#{reserveplanType},</if>
  86. </trim>
  87. </insert>
  88. <update id="updateTUDispatch" parameterType="TUDispatch">
  89. update t_u_dispatch
  90. <trim prefix="SET" suffixOverrides=",">
  91. <if test="status != null">status = #{status},</if>
  92. <if test="remark != null">remark = #{remark},</if>
  93. <if test="delFlag != null">del_flag = #{delFlag},</if>
  94. <if test="createBy != null">create_by = #{createBy},</if>
  95. <if test="createTime != null">create_time = #{createTime},</if>
  96. <if test="updateBy != null">update_by = #{updateBy},</if>
  97. <if test="updateTime != null">update_time = #{updateTime},</if>
  98. <if test="eventdispatchType != null">eventdispatch_type = #{eventdispatchType},</if>
  99. <if test="sender != null">sender = #{sender},</if>
  100. <if test="senderTime != null">sender_time = #{senderTime},</if>
  101. <if test="dispatchDescription != null">dispatch_description = #{dispatchDescription},</if>
  102. <if test="isApproval != null">is_approval = #{isApproval},</if>
  103. <if test="approvalPerson != null">approval_person = #{approvalPerson},</if>
  104. <if test="approvalTime != null">approval_time = #{approvalTime},</if>
  105. <if test="eventId != null">event_id = #{eventId},</if>
  106. <if test="reserveplanType != null">reserveplan_type = #{reserveplanType},</if>
  107. </trim>
  108. where id = #{id}
  109. </update>
  110. <delete id="deleteTUDispatchById" parameterType="String">
  111. delete from t_u_dispatch where id = #{id}
  112. </delete>
  113. <delete id="deleteTUDispatchByIds" parameterType="String">
  114. delete from t_u_dispatch where id in
  115. <foreach item="id" collection="array" open="(" separator="," close=")">
  116. #{id}
  117. </foreach>
  118. </delete>
  119. </mapper>