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.
105 lines
4.8 KiB
105 lines
4.8 KiB
|
5 days ago
|
<?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.colums.YjAppreciateMapper">
|
||
|
|
|
||
|
|
<resultMap type="YjAppreciate" id="YjAppreciateResult">
|
||
|
|
<result property="id" column="id" />
|
||
|
|
<result property="title" column="title" />
|
||
|
|
<result property="image" column="image" />
|
||
|
|
<result property="readNum" column="read_num" />
|
||
|
|
<result property="startTime" column="start_time" />
|
||
|
|
<result property="content" column="content" />
|
||
|
|
<result property="status" column="status" />
|
||
|
|
<result property="modifyTime" column="modify_time" />
|
||
|
|
<result property="deptId" column="dept_id" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="selectYjAppreciateVo">
|
||
|
|
select
|
||
|
|
yj_appreciate.id,
|
||
|
|
yj_appreciate.title,
|
||
|
|
yj_appreciate.image,
|
||
|
|
yj_appreciate.read_num,
|
||
|
|
yj_appreciate.start_time,
|
||
|
|
yj_appreciate.content,
|
||
|
|
yj_appreciate.status,
|
||
|
|
yj_appreciate.modify_time,
|
||
|
|
yj_appreciate.dept_id
|
||
|
|
from yj_appreciate
|
||
|
|
left join sys_dept on yj_appreciate.dept_id = sys_dept.dept_id
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectYjAppreciateList" parameterType="YjAppreciate" resultMap="YjAppreciateResult">
|
||
|
|
<include refid="selectYjAppreciateVo"/>
|
||
|
|
<where>
|
||
|
|
<if test="title != null and title != ''"> and yj_appreciate.title = #{title}</if>
|
||
|
|
<if test="image != null and image != ''"> and yj_appreciate.image = #{image}</if>
|
||
|
|
<if test="readNum != null "> and yj_appreciate.read_num = #{readNum}</if>
|
||
|
|
<if test="startTime != null "> and yj_appreciate.start_time = #{startTime}</if>
|
||
|
|
<if test="content != null and content != ''"> and yj_appreciate.content = #{content}</if>
|
||
|
|
<if test="status != null "> and yj_appreciate.status = #{status}</if>
|
||
|
|
<if test="modifyTime != null "> and yj_appreciate.modify_time = #{modifyTime}</if>
|
||
|
|
<if test="deptId != null "> and yj_appreciate.dept_id = #{deptId}</if>
|
||
|
|
<if test="tenantId != null "> and sys_dept.tenant_id = #{tenantId}</if>
|
||
|
|
</where>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectYjAppreciateById" parameterType="String" resultMap="YjAppreciateResult">
|
||
|
|
<include refid="selectYjAppreciateVo"/>
|
||
|
|
where yj_appreciate.id = #{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insertYjAppreciate" parameterType="YjAppreciate">
|
||
|
|
insert into yj_appreciate
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="id != null">id,</if>
|
||
|
|
<if test="title != null">title,</if>
|
||
|
|
<if test="image != null">image,</if>
|
||
|
|
<if test="readNum != null">read_num,</if>
|
||
|
|
<if test="startTime != null">start_time,</if>
|
||
|
|
<if test="content != null">content,</if>
|
||
|
|
<if test="status != null">status,</if>
|
||
|
|
<if test="modifyTime != null">modify_time,</if>
|
||
|
|
<if test="deptId != null">dept_id,</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="id != null">#{id},</if>
|
||
|
|
<if test="title != null">#{title},</if>
|
||
|
|
<if test="image != null">#{image},</if>
|
||
|
|
<if test="readNum != null">#{readNum},</if>
|
||
|
|
<if test="startTime != null">#{startTime},</if>
|
||
|
|
<if test="content != null">#{content},</if>
|
||
|
|
<if test="status != null">#{status},</if>
|
||
|
|
<if test="modifyTime != null">#{modifyTime},</if>
|
||
|
|
<if test="deptId != null">#{deptId},</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateYjAppreciate" parameterType="YjAppreciate">
|
||
|
|
update yj_appreciate
|
||
|
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
|
<if test="title != null">title = #{title},</if>
|
||
|
|
<if test="image != null">image = #{image},</if>
|
||
|
|
<if test="readNum != null">read_num = #{readNum},</if>
|
||
|
|
<if test="startTime != null">start_time = #{startTime},</if>
|
||
|
|
<if test="content != null">content = #{content},</if>
|
||
|
|
<if test="status != null">status = #{status},</if>
|
||
|
|
<if test="modifyTime != null">modify_time = #{modifyTime},</if>
|
||
|
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
||
|
|
</trim>
|
||
|
|
where id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<delete id="deleteYjAppreciateById" parameterType="String">
|
||
|
|
delete from yj_appreciate where id = #{id}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
<delete id="deleteYjAppreciateByIds" parameterType="String">
|
||
|
|
delete from yj_appreciate where id in
|
||
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
|
#{id}
|
||
|
|
</foreach>
|
||
|
|
</delete>
|
||
|
|
</mapper>
|