87 lines
4.2 KiB
XML
87 lines
4.2 KiB
XML
<?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.app.mapper.AppDynamicLikeMapper">
|
|
|
|
<resultMap type="AppDynamicLike" id="AppDynamicLikeResult">
|
|
<result property="id" column="id" />
|
|
<result property="userId" column="user_id" />
|
|
<result property="dynamicId" column="dynamic_id" />
|
|
<result property="dynamicUserId" column="dynamic_user_id" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="updateBy" column="updateBy" />
|
|
<result property="remark" column="remark" />
|
|
</resultMap>
|
|
|
|
<sql id="selectAppDynamicLikeVo">
|
|
select id, user_id, dynamic_id,dynamic_user_id, create_time, update_time, create_by, updateBy, remark from app_dynamic_like
|
|
</sql>
|
|
|
|
<select id="selectAppDynamicLikeList" parameterType="AppDynamicLike" resultMap="AppDynamicLikeResult">
|
|
<include refid="selectAppDynamicLikeVo"/>
|
|
<where>
|
|
<if test="userId != null "> and user_id = #{userId}</if>
|
|
<if test="dynamicId != null "> and dynamic_id = #{dynamicId}</if>
|
|
<if test="dynamicUserId != null "> and dynamic_user_id = #{dynamicUserId}</if>
|
|
<if test="updateBy != null and updateBy != ''"> and updateBy = #{updateBy}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectAppDynamicLikeById" parameterType="Long" resultMap="AppDynamicLikeResult">
|
|
<include refid="selectAppDynamicLikeVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertAppDynamicLike" parameterType="AppDynamicLike" useGeneratedKeys="true" keyProperty="id">
|
|
insert into app_dynamic_like
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="userId != null">user_id,</if>
|
|
<if test="dynamicId != null">dynamic_id,</if>
|
|
<if test="dynamicUserId != null">dynamic_user_id,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="updateBy != null">updateBy,</if>
|
|
<if test="remark != null">remark,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="userId != null">#{userId},</if>
|
|
<if test="dynamicId != null">#{dynamicId},</if>
|
|
<if test="dynamicUserId != null">#{dynamicUserId},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateAppDynamicLike" parameterType="AppDynamicLike">
|
|
update app_dynamic_like
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="userId != null">user_id = #{userId},</if>
|
|
<if test="dynamicId != null">dynamic_id = #{dynamicId},</if>
|
|
<if test="dynamicUserId != null">dynamic_user_id = #{dynamicUserId},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="updateBy != null">updateBy = #{updateBy},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteAppDynamicLikeById" parameterType="Long">
|
|
delete from app_dynamic_like where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteAppDynamicLikeByIds" parameterType="String">
|
|
delete from app_dynamic_like where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |