猫妈狗爸伴宠师小程序后端代码
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.AppletAmountLogMapper">
  6. <resultMap type="AppletAmountLog" id="AppletAmountLogResult">
  7. <result property="id" column="id" />
  8. <result property="title" column="title" />
  9. <result property="amount" column="amount" />
  10. <result property="type" column="type" />
  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="selectAppletAmountLogVo">
  18. select id, title, amount, type, del_flag, create_by, create_time, update_by, update_time from applet_amount_log
  19. </sql>
  20. <select id="selectAppletAmountLogList" parameterType="AppletAmountLog" resultMap="AppletAmountLogResult">
  21. <include refid="selectAppletAmountLogVo"/>
  22. <where>
  23. <if test="title != null and title != ''"> and title = #{title}</if>
  24. <if test="amount != null "> and amount = #{amount}</if>
  25. <if test="type != null and type != ''"> and type = #{type}</if>
  26. </where>
  27. </select>
  28. <select id="selectAppletAmountLogById" parameterType="Long" resultMap="AppletAmountLogResult">
  29. <include refid="selectAppletAmountLogVo"/>
  30. where id = #{id}
  31. </select>
  32. <insert id="insertAppletAmountLog" parameterType="AppletAmountLog" useGeneratedKeys="true" keyProperty="id">
  33. insert into applet_amount_log
  34. <trim prefix="(" suffix=")" suffixOverrides=",">
  35. <if test="title != null and title != ''">title,</if>
  36. <if test="amount != null">amount,</if>
  37. <if test="type != null and type != ''">type,</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="title != null and title != ''">#{title},</if>
  46. <if test="amount != null">#{amount},</if>
  47. <if test="type != null and type != ''">#{type},</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="updateAppletAmountLog" parameterType="AppletAmountLog">
  56. update applet_amount_log
  57. <trim prefix="SET" suffixOverrides=",">
  58. <if test="title != null and title != ''">title = #{title},</if>
  59. <if test="amount != null">amount = #{amount},</if>
  60. <if test="type != null and type != ''">type = #{type},</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="deleteAppletAmountLogById" parameterType="Long">
  70. delete from applet_amount_log where id = #{id}
  71. </delete>
  72. <delete id="deleteAppletAmountLogByIds" parameterType="String">
  73. delete from applet_amount_log where id in
  74. <foreach item="id" collection="array" open="(" separator="," close=")">
  75. #{id}
  76. </foreach>
  77. </delete>
  78. </mapper>