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

85 lines
4.0 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 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.AppletServiceDateMapper">
  6. <resultMap type="AppletServiceDate" id="AppletServiceDateResult">
  7. <result property="id" column="id" />
  8. <result property="date" column="date" />
  9. <result property="details" column="details" />
  10. <result property="orderId" column="order_id" />
  11. <result property="delFlag" column="del_flag" />
  12. <result property="createBy" column="create_by" />
  13. <result property="createTime" column="create_time" />
  14. <result property="updateBy" column="update_by" />
  15. <result property="updateTime" column="update_time" />
  16. </resultMap>
  17. <sql id="selectAppletServiceDateVo">
  18. select id, date, details, order_id, del_flag, create_by, create_time, update_by, update_time from applet_service_date
  19. </sql>
  20. <select id="selectAppletServiceDateList" parameterType="AppletServiceDate" resultMap="AppletServiceDateResult">
  21. <include refid="selectAppletServiceDateVo"/>
  22. <where>
  23. <if test="date != null "> and date = #{date}</if>
  24. <if test="details != null and details != ''"> and details = #{details}</if>
  25. <if test="orderId != null "> and order_id = #{orderId}</if>
  26. </where>
  27. </select>
  28. <select id="selectAppletServiceDateById" parameterType="Long" resultMap="AppletServiceDateResult">
  29. <include refid="selectAppletServiceDateVo"/>
  30. where id = #{id}
  31. </select>
  32. <insert id="insertAppletServiceDate" parameterType="AppletServiceDate" useGeneratedKeys="true" keyProperty="id">
  33. insert into applet_service_date
  34. <trim prefix="(" suffix=")" suffixOverrides=",">
  35. <if test="date != null">date,</if>
  36. <if test="details != null and details != ''">details,</if>
  37. <if test="orderId != null">order_id,</if>
  38. <if test="delFlag != null">del_flag,</if>
  39. <if test="createBy != null">create_by,</if>
  40. <if test="createTime != null">create_time,</if>
  41. <if test="updateBy != null">update_by,</if>
  42. <if test="updateTime != null">update_time,</if>
  43. </trim>
  44. <trim prefix="values (" suffix=")" suffixOverrides=",">
  45. <if test="date != null">#{date},</if>
  46. <if test="details != null and details != ''">#{details},</if>
  47. <if test="orderId != null">#{orderId},</if>
  48. <if test="delFlag != null">#{delFlag},</if>
  49. <if test="createBy != null">#{createBy},</if>
  50. <if test="createTime != null">#{createTime},</if>
  51. <if test="updateBy != null">#{updateBy},</if>
  52. <if test="updateTime != null">#{updateTime},</if>
  53. </trim>
  54. </insert>
  55. <update id="updateAppletServiceDate" parameterType="AppletServiceDate">
  56. update applet_service_date
  57. <trim prefix="SET" suffixOverrides=",">
  58. <if test="date != null">date = #{date},</if>
  59. <if test="details != null and details != ''">details = #{details},</if>
  60. <if test="orderId != null">order_id = #{orderId},</if>
  61. <if test="delFlag != null">del_flag = #{delFlag},</if>
  62. <if test="createBy != null">create_by = #{createBy},</if>
  63. <if test="createTime != null">create_time = #{createTime},</if>
  64. <if test="updateBy != null">update_by = #{updateBy},</if>
  65. <if test="updateTime != null">update_time = #{updateTime},</if>
  66. </trim>
  67. where id = #{id}
  68. </update>
  69. <delete id="deleteAppletServiceDateById" parameterType="Long">
  70. delete from applet_service_date where id = #{id}
  71. </delete>
  72. <delete id="deleteAppletServiceDateByIds" parameterType="String">
  73. delete from applet_service_date where id in
  74. <foreach item="id" collection="array" open="(" separator="," close=")">
  75. #{id}
  76. </foreach>
  77. </delete>
  78. </mapper>