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

80 lines
3.7 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.AppletIncreaseMapper">
  6. <resultMap type="AppletIncrease" id="AppletIncreaseResult">
  7. <result property="id" column="id" />
  8. <result property="title" column="title" />
  9. <result property="detail" column="detail" />
  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. </resultMap>
  16. <sql id="selectAppletIncreaseVo">
  17. select id, title, detail, del_flag, create_by, create_time, update_by, update_time from applet_increase
  18. </sql>
  19. <select id="selectAppletIncreaseList" parameterType="AppletIncrease" resultMap="AppletIncreaseResult">
  20. <include refid="selectAppletIncreaseVo"/>
  21. <where>
  22. <if test="title != null and title != ''"> and title = #{title}</if>
  23. <if test="detail != null and detail != ''"> and detail = #{detail}</if>
  24. </where>
  25. </select>
  26. <select id="selectAppletIncreaseById" parameterType="Long" resultMap="AppletIncreaseResult">
  27. <include refid="selectAppletIncreaseVo"/>
  28. where id = #{id}
  29. </select>
  30. <insert id="insertAppletIncrease" parameterType="AppletIncrease" useGeneratedKeys="true" keyProperty="id">
  31. insert into applet_increase
  32. <trim prefix="(" suffix=")" suffixOverrides=",">
  33. <if test="title != null and title != ''">title,</if>
  34. <if test="detail != null">detail,</if>
  35. <if test="delFlag != null">del_flag,</if>
  36. <if test="createBy != null">create_by,</if>
  37. <if test="createTime != null">create_time,</if>
  38. <if test="updateBy != null">update_by,</if>
  39. <if test="updateTime != null">update_time,</if>
  40. </trim>
  41. <trim prefix="values (" suffix=")" suffixOverrides=",">
  42. <if test="title != null and title != ''">#{title},</if>
  43. <if test="detail != null">#{detail},</if>
  44. <if test="delFlag != null">#{delFlag},</if>
  45. <if test="createBy != null">#{createBy},</if>
  46. <if test="createTime != null">#{createTime},</if>
  47. <if test="updateBy != null">#{updateBy},</if>
  48. <if test="updateTime != null">#{updateTime},</if>
  49. </trim>
  50. </insert>
  51. <update id="updateAppletIncrease" parameterType="AppletIncrease">
  52. update applet_increase
  53. <trim prefix="SET" suffixOverrides=",">
  54. <if test="title != null and title != ''">title = #{title},</if>
  55. <if test="detail != null">detail = #{detail},</if>
  56. <if test="delFlag != null">del_flag = #{delFlag},</if>
  57. <if test="createBy != null">create_by = #{createBy},</if>
  58. <if test="createTime != null">create_time = #{createTime},</if>
  59. <if test="updateBy != null">update_by = #{updateBy},</if>
  60. <if test="updateTime != null">update_time = #{updateTime},</if>
  61. </trim>
  62. where id = #{id}
  63. </update>
  64. <delete id="deleteAppletIncreaseById" parameterType="Long">
  65. delete from applet_increase where id = #{id}
  66. </delete>
  67. <delete id="deleteAppletIncreaseByIds" parameterType="String">
  68. delete from applet_increase where id in
  69. <foreach item="id" collection="array" open="(" separator="," close=")">
  70. #{id}
  71. </foreach>
  72. </delete>
  73. </mapper>