猫妈狗爸伴宠师小程序后端代码
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.

199 lines
12 KiB

8 months ago
8 months ago
8 months ago
  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.model.mapper.AppletOrderItemDateLogMapper">
  6. <resultMap type="AppletOrderItemDateLog" id="AppletOrderItemDateLogResult">
  7. <result property="id" column="id"/>
  8. <result property="createTime" column="create_time"/>
  9. <result property="createBy" column="create_by"/>
  10. <result property="updateTime" column="update_time"/>
  11. <result property="updateBy" column="update_by"/>
  12. <result property="glovePhoto" column="glove_photo"/>
  13. <result property="shoeCoverPhoto" column="shoe_cover_photo"/>
  14. <result property="petPhoto" column="pet_photo"/>
  15. <result property="teacherPhoto" column="teacher_photo"/>
  16. <result property="grainBowlFront" column="grain_bowl_front"/>
  17. <result property="grainBowlAfter" column="grain_bowl_after"/>
  18. <result property="waterBowlFront" column="water_bowl_front"/>
  19. <result property="waterBowlAfter" column="water_bowl_after"/>
  20. <result property="basinFront" column="basin_front"/>
  21. <result property="basinAfter" column="basin_after"/>
  22. <result property="workDogImage" column="work_dog_image"/>
  23. <result property="workPalyImage" column="work_paly_image"/>
  24. <result property="notes" column="notes"/>
  25. <result property="itemDateId" column="item_date_id"/>
  26. <result property="itemOrderId" column="item_order_id"/>
  27. <result property="orderId" column="order_id"/>
  28. </resultMap>
  29. <sql id="selectAppletOrderItemDateLogVo">
  30. select id, create_time, create_by, update_time, update_by, glove_photo, shoe_cover_photo, pet_photo, teacher_photo, grain_bowl_front, grain_bowl_after, water_bowl_front, water_bowl_after, basin_front, basin_after, work_dog_image, work_paly_image, notes, item_date_id, item_order_id, order_id from applet_order_item_date_log
  31. </sql>
  32. <select id="selectList" parameterType="AppletOrderItemDateLog" resultMap="AppletOrderItemDateLogResult">
  33. <include refid="selectAppletOrderItemDateLogVo"/>
  34. <where>
  35. <if test="glovePhoto != null and glovePhoto != ''"> and glove_photo = #{glovePhoto}</if>
  36. <if test="shoeCoverPhoto != null and shoeCoverPhoto != ''"> and shoe_cover_photo = #{shoeCoverPhoto}</if>
  37. <if test="petPhoto != null and petPhoto != ''"> and pet_photo = #{petPhoto}</if>
  38. <if test="teacherPhoto != null and teacherPhoto != ''"> and teacher_photo = #{teacherPhoto}</if>
  39. <if test="grainBowlFront != null and grainBowlFront != ''"> and grain_bowl_front = #{grainBowlFront}</if>
  40. <if test="grainBowlAfter != null and grainBowlAfter != ''"> and grain_bowl_after = #{grainBowlAfter}</if>
  41. <if test="waterBowlFront != null and waterBowlFront != ''"> and water_bowl_front = #{waterBowlFront}</if>
  42. <if test="waterBowlAfter != null and waterBowlAfter != ''"> and water_bowl_after = #{waterBowlAfter}</if>
  43. <if test="basinFront != null and basinFront != ''"> and basin_front = #{basinFront}</if>
  44. <if test="basinAfter != null and basinAfter != ''"> and basin_after = #{basinAfter}</if>
  45. <if test="workDogImage != null and workDogImage != ''"> and work_dog_image = #{workDogImage}</if>
  46. <if test="workPalyImage != null and workPalyImage != ''"> and work_paly_image = #{workPalyImage}</if>
  47. <if test="notes != null and notes != ''"> and notes = #{notes}</if>
  48. <if test="itemDateId != null "> and item_date_id = #{itemDateId}</if>
  49. <if test="itemOrderId != null "> and item_order_id = #{itemOrderId}</if>
  50. <if test="orderId != null "> and order_id = #{orderId}</if>
  51. </where>
  52. </select>
  53. <select id="selectById" parameterType="Long" resultMap="AppletOrderItemDateLogResult">
  54. <include refid="selectAppletOrderItemDateLogVo"/>
  55. where id = #{id}
  56. </select>
  57. <select id="selectAppletOrderItemDateLogByItemDateId" parameterType="AppletOrderItemDateLog" resultMap="AppletOrderItemDateLogResult">
  58. <include refid="selectAppletOrderItemDateLogVo"/>
  59. where item_date_id = #{itemDateId}
  60. </select>
  61. <insert id="insert" parameterType="AppletOrderItemDateLog" useGeneratedKeys="true" keyProperty="id">
  62. insert into applet_order_item_date_log
  63. <trim prefix="(" suffix=")" suffixOverrides=",">
  64. <if test="id != null">id,</if>
  65. <if test="createTime != null">create_time,</if>
  66. <if test="createBy != null">create_by,</if>
  67. <if test="updateTime != null">update_time,</if>
  68. <if test="updateBy != null">update_by,</if>
  69. <if test="glovePhoto != null">glove_photo,</if>
  70. <if test="shoeCoverPhoto != null">shoe_cover_photo,</if>
  71. <if test="petPhoto != null">pet_photo,</if>
  72. <if test="teacherPhoto != null">teacher_photo,</if>
  73. <if test="grainBowlFront != null">grain_bowl_front,</if>
  74. <if test="grainBowlAfter != null">grain_bowl_after,</if>
  75. <if test="waterBowlFront != null">water_bowl_front,</if>
  76. <if test="waterBowlAfter != null">water_bowl_after,</if>
  77. <if test="basinFront != null">basin_front,</if>
  78. <if test="basinAfter != null">basin_after,</if>
  79. <if test="workDogImage != null">work_dog_image,</if>
  80. <if test="workPalyImage != null">work_paly_image,</if>
  81. <if test="notes != null">notes,</if>
  82. <if test="itemDateId != null">item_date_id,</if>
  83. <if test="itemOrderId != null">item_order_id,</if>
  84. <if test="orderId != null">order_id,</if>
  85. </trim>
  86. <trim prefix="values (" suffix=")" suffixOverrides=",">
  87. <if test="id != null">#{id},</if>
  88. <if test="createTime != null">#{createTime},</if>
  89. <if test="createBy != null">#{createBy},</if>
  90. <if test="updateTime != null">#{updateTime},</if>
  91. <if test="updateBy != null">#{updateBy},</if>
  92. <if test="glovePhoto != null">#{glovePhoto},</if>
  93. <if test="shoeCoverPhoto != null">#{shoeCoverPhoto},</if>
  94. <if test="petPhoto != null">#{petPhoto},</if>
  95. <if test="teacherPhoto != null">#{teacherPhoto},</if>
  96. <if test="grainBowlFront != null">#{grainBowlFront},</if>
  97. <if test="grainBowlAfter != null">#{grainBowlAfter},</if>
  98. <if test="waterBowlFront != null">#{waterBowlFront},</if>
  99. <if test="waterBowlAfter != null">#{waterBowlAfter},</if>
  100. <if test="basinFront != null">#{basinFront},</if>
  101. <if test="basinAfter != null">#{basinAfter},</if>
  102. <if test="workDogImage != null">#{workDogImage},</if>
  103. <if test="workPalyImage != null">#{workPalyImage},</if>
  104. <if test="notes != null">#{notes},</if>
  105. <if test="itemDateId != null">#{itemDateId},</if>
  106. <if test="itemOrderId != null">#{itemOrderId},</if>
  107. <if test="orderId != null">#{orderId},</if>
  108. </trim>
  109. </insert>
  110. <update id="update" parameterType="AppletOrderItemDateLog">
  111. update applet_order_item_date_log
  112. <trim prefix="SET" suffixOverrides=",">
  113. <if test="createTime != null">create_time = #{createTime},</if>
  114. <if test="createBy != null">create_by = #{createBy},</if>
  115. <if test="updateTime != null">update_time = #{updateTime},</if>
  116. <if test="updateBy != null">update_by = #{updateBy},</if>
  117. <if test="glovePhoto != null">glove_photo = #{glovePhoto},</if>
  118. <if test="shoeCoverPhoto != null">shoe_cover_photo = #{shoeCoverPhoto},</if>
  119. <if test="petPhoto != null">pet_photo = #{petPhoto},</if>
  120. <if test="teacherPhoto != null">teacher_photo = #{teacherPhoto},</if>
  121. <if test="grainBowlFront != null">grain_bowl_front = #{grainBowlFront},</if>
  122. <if test="grainBowlAfter != null">grain_bowl_after = #{grainBowlAfter},</if>
  123. <if test="waterBowlFront != null">water_bowl_front = #{waterBowlFront},</if>
  124. <if test="waterBowlAfter != null">water_bowl_after = #{waterBowlAfter},</if>
  125. <if test="basinFront != null">basin_front = #{basinFront},</if>
  126. <if test="basinAfter != null">basin_after = #{basinAfter},</if>
  127. <if test="workDogImage != null">work_dog_image = #{workDogImage},</if>
  128. <if test="workPalyImage != null">work_paly_image = #{workPalyImage},</if>
  129. <if test="notes != null">notes = #{notes},</if>
  130. <if test="itemDateId != null">item_date_id = #{itemDateId},</if>
  131. <if test="itemOrderId != null">item_order_id = #{itemOrderId},</if>
  132. <if test="orderId != null">order_id = #{orderId},</if>
  133. </trim>
  134. where id = #{id}
  135. </update>
  136. <delete id="deleteById" parameterType="Long">
  137. delete from applet_order_item_date_log where id = #{id}
  138. </delete>
  139. <delete id="deleteByIds" parameterType="String">
  140. delete from applet_order_item_date_log where id in
  141. <foreach item="id" collection="array" open="(" separator="," close=")">
  142. #{id}
  143. </foreach>
  144. </delete>
  145. <insert id="insertOrUpdate" parameterType="AppletOrderItemDateLog" useGeneratedKeys="true" keyProperty="id">
  146. insert into applet_order_item_date_log
  147. <trim prefix="(" suffix=")" suffixOverrides=",">
  148. <if test="id != null">
  149. id,
  150. </if>
  151. create_time, create_by, update_time, update_by, glove_photo, shoe_cover_photo, pet_photo, teacher_photo, grain_bowl_front, grain_bowl_after, water_bowl_front, water_bowl_after, basin_front, basin_after, work_dog_image, work_paly_image, notes, item_date_id, item_order_id, order_id,
  152. </trim>
  153. values
  154. <trim prefix="(" suffix=")" suffixOverrides=",">
  155. <if test="id != null">
  156. #{id, jdbcType=BIGINT},
  157. </if>
  158. #{createTime, jdbcType=TIMESTAMP},#{createBy, jdbcType=INTEGER},#{updateTime, jdbcType=TIMESTAMP},#{updateBy, jdbcType=INTEGER},#{glovePhoto, jdbcType=VARCHAR},#{shoeCoverPhoto, jdbcType=VARCHAR},#{petPhoto, jdbcType=VARCHAR},#{teacherPhoto, jdbcType=VARCHAR},#{grainBowlFront, jdbcType=VARCHAR},#{grainBowlAfter, jdbcType=VARCHAR},#{waterBowlFront, jdbcType=VARCHAR},#{waterBowlAfter, jdbcType=VARCHAR},#{basinFront, jdbcType=VARCHAR},#{basinAfter, jdbcType=VARCHAR},#{workDogImage, jdbcType=VARCHAR},#{workPalyImage, jdbcType=VARCHAR},#{notes, jdbcType=VARCHAR},#{itemDateId, jdbcType=BIGINT},#{itemOrderId, jdbcType=BIGINT},#{orderId, jdbcType=BIGINT},
  159. </trim>
  160. on duplicate key update
  161. <trim suffixOverrides=",">
  162. <if test="id != null">
  163. id = #{id,jdbcType=BIGINT},
  164. </if>
  165. create_time = #{createTime, jdbcType=TIMESTAMP},
  166. create_by = #{createBy, jdbcType=INTEGER},
  167. update_time = #{updateTime, jdbcType=TIMESTAMP},
  168. update_by = #{updateBy, jdbcType=INTEGER},
  169. glove_photo = #{glovePhoto, jdbcType=VARCHAR},
  170. shoe_cover_photo = #{shoeCoverPhoto, jdbcType=VARCHAR},
  171. pet_photo = #{petPhoto, jdbcType=VARCHAR},
  172. teacher_photo = #{teacherPhoto, jdbcType=VARCHAR},
  173. grain_bowl_front = #{grainBowlFront, jdbcType=VARCHAR},
  174. grain_bowl_after = #{grainBowlAfter, jdbcType=VARCHAR},
  175. water_bowl_front = #{waterBowlFront, jdbcType=VARCHAR},
  176. water_bowl_after = #{waterBowlAfter, jdbcType=VARCHAR},
  177. basin_front = #{basinFront, jdbcType=VARCHAR},
  178. basin_after = #{basinAfter, jdbcType=VARCHAR},
  179. work_dog_image = #{workDogImage, jdbcType=VARCHAR},
  180. work_paly_image = #{workPalyImage, jdbcType=VARCHAR},
  181. notes = #{notes, jdbcType=VARCHAR},
  182. item_date_id = #{itemDateId, jdbcType=BIGINT},
  183. item_order_id = #{itemOrderId, jdbcType=BIGINT},
  184. order_id = #{orderId, jdbcType=BIGINT},
  185. </trim>
  186. </insert>
  187. </mapper>