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

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 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.AppletLicenseMapper">
  6. <resultMap type="AppletLicense" id="AppletLicenseResult">
  7. <result property="id" column="id" />
  8. <result property="title" column="title" />
  9. <result property="image" column="image" />
  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="selectAppletLicenseVo">
  17. select id, title, image, del_flag, create_by, create_time, update_by, update_time from applet_license
  18. </sql>
  19. <select id="selectAppletLicenseList" parameterType="AppletLicense" resultMap="AppletLicenseResult">
  20. <include refid="selectAppletLicenseVo"/>
  21. <where>
  22. <if test="title != null and title != ''"> and title = #{title}</if>
  23. <if test="image != null and image != ''"> and image = #{image}</if>
  24. </where>
  25. </select>
  26. <select id="selectAppletLicenseById" parameterType="AppletLicense" resultMap="AppletLicenseResult">
  27. <include refid="selectAppletLicenseVo"/>
  28. where id = #{id}
  29. </select>
  30. <insert id="insertAppletLicense" parameterType="AppletLicense" useGeneratedKeys="true" keyProperty="id">
  31. insert into applet_license
  32. <trim prefix="(" suffix=")" suffixOverrides=",">
  33. <if test="title != null and title != ''">title,</if>
  34. <if test="image != null">image,</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="image != null">#{image},</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="updateAppletLicense" parameterType="AppletLicense">
  52. update applet_license
  53. <trim prefix="SET" suffixOverrides=",">
  54. <if test="title != null and title != ''">title = #{title},</if>
  55. <if test="image != null">image = #{image},</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="deleteAppletLicenseById" parameterType="Long">
  65. delete from applet_license where id = #{id}
  66. </delete>
  67. <delete id="deleteAppletLicenseByIds" parameterType="String">
  68. delete from applet_license where id in
  69. <foreach item="id" collection="array" open="(" separator="," close=")">
  70. #{id}
  71. </foreach>
  72. </delete>
  73. </mapper>