| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.ruoyi.system.mapper.UserFootprintMapper">
-
- <resultMap type="UserFootprint" id="UserFootprintResult">
- <result property="id" column="id" />
- <result property="userId" column="user_id" />
- <result property="mdId" column="md_id" />
- <result property="cretim" column="cretim" />
- </resultMap>
- <sql id="selectUserFootprintVo">
- select id, user_id, md_id, cretim from user_footprint
- </sql>
- <select id="selectUserFootprintList" parameterType="UserFootprint" resultMap="UserFootprintResult">
- <include refid="selectUserFootprintVo"/>
- <where>
- <if test="userId != null "> and user_id = #{userId}</if>
- <if test="mdId != null "> and md_id = #{mdId}</if>
- <if test="cretim != null "> and cretim = #{cretim}</if>
- </where>
- order by id desc
- </select>
-
- <select id="selectUserFootprintById" parameterType="Long" resultMap="UserFootprintResult">
- <include refid="selectUserFootprintVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertUserFootprint" parameterType="UserFootprint" useGeneratedKeys="true" keyProperty="id">
- insert into user_footprint
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="userId != null">user_id,</if>
- <if test="mdId != null">md_id,</if>
- <if test="cretim != null">cretim,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="userId != null">#{userId},</if>
- <if test="mdId != null">#{mdId},</if>
- <if test="cretim != null">#{cretim},</if>
- </trim>
- </insert>
- <update id="updateUserFootprint" parameterType="UserFootprint">
- update user_footprint
- <trim prefix="SET" suffixOverrides=",">
- <if test="userId != null">user_id = #{userId},</if>
- <if test="mdId != null">md_id = #{mdId},</if>
- <if test="cretim != null">cretim = #{cretim},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteUserFootprintById" parameterType="Long">
- delete from user_footprint where id = #{id}
- </delete>
- <delete id="deleteUserFootprintByIds" parameterType="String">
- delete from user_footprint where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|