任务同步会员心得
This commit is contained in:
@ -19,10 +19,11 @@
|
||||
<result property="ischeck" column="ischeck"/>
|
||||
<result property="checkuserid" column="checkuserid"/>
|
||||
<result property="checkTime" column="check_time"/>
|
||||
<result property="istb" column="istb"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBySchoolNewsVo">
|
||||
select d.id, d.title, d.imgurl, d.abstractcontent, d.type, d.content, d.isdel, d.createuserid, d.create_time, d.dept_id, d.istop, d.ischeck, d.checkuserid, d.check_time from by_school_news d
|
||||
select d.id, d.title, d.imgurl, d.abstractcontent, d.type, d.content, d.isdel, d.createuserid, d.create_time, d.dept_id, d.istop, d.ischeck, d.checkuserid, d.check_time, d.istb from by_school_news d
|
||||
</sql>
|
||||
|
||||
<select id="selectBySchoolNewsList" parameterType="BySchoolNews" resultMap="BySchoolNewsResult">
|
||||
@ -40,11 +41,31 @@
|
||||
<if test="ischeck != null and ischeck != ''">and d.ischeck = #{ischeck}</if>
|
||||
<if test="checkuserid != null ">and d.checkuserid = #{checkuserid}</if>
|
||||
<if test="checkTime != null ">and d.check_time = #{checkTime}</if>
|
||||
<if test="istb != null and istb != ''">and d.istb = #{istb}</if>
|
||||
</where>
|
||||
<!-- 数据范围过滤 -->
|
||||
${dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectAllBySchoolNewsList" parameterType="BySchoolNews" resultMap="BySchoolNewsResult">
|
||||
<include refid="selectBySchoolNewsVo"/>
|
||||
<where>
|
||||
d.isdel = 'N'
|
||||
<if test="title != null and title != ''">and d.title like concat('%', #{title}, '%')</if>
|
||||
<if test="imgurl != null and imgurl != ''">and d.imgurl = #{imgurl}</if>
|
||||
<if test="abstractcontent != null and abstractcontent != ''">and d.abstractcontent = #{abstractcontent}</if>
|
||||
<if test="type != null and type != ''">and d.type = #{type}</if>
|
||||
<if test="content != null and content != ''">and d.content = #{content}</if>
|
||||
<if test="createuserid != null ">and d.createuserid = #{createuserid}</if>
|
||||
<if test="deptId != null ">and d.dept_id = #{deptId}</if>
|
||||
<if test="istop != null and istop != ''">and d.istop = #{istop}</if>
|
||||
<if test="ischeck != null and ischeck != ''">and d.ischeck = #{ischeck}</if>
|
||||
<if test="checkuserid != null ">and d.checkuserid = #{checkuserid}</if>
|
||||
<if test="checkTime != null ">and d.check_time = #{checkTime}</if>
|
||||
<if test="istb != null and istb != ''">and d.istb = #{istb}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBySchoolNewsById" parameterType="Long" resultMap="BySchoolNewsResult">
|
||||
<include refid="selectBySchoolNewsVo"/>
|
||||
where d.id = #{id}
|
||||
@ -100,6 +121,7 @@
|
||||
<if test="ischeck != null and ischeck != ''">ischeck = #{ischeck},</if>
|
||||
<if test="checkuserid != null ">checkuserid = #{checkuserid},</if>
|
||||
<if test="checkTime != null ">check_time = #{checkTime},</if>
|
||||
<if test="istb != null and istb != ''">istb = #{istb},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
111
ruoyi/src/main/resources/mybatis/bysite/ByNewsMapper.xml
Normal file
111
ruoyi/src/main/resources/mybatis/bysite/ByNewsMapper.xml
Normal file
@ -0,0 +1,111 @@
|
||||
<?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.project.bysite.mapper.ByNewsMapper">
|
||||
|
||||
<resultMap type="ByNews" id="ByNewsResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="title" column="title"/>
|
||||
<result property="imgurl" column="imgurl"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="createuserid" column="createuserid"/>
|
||||
<result property="isthirdparty" column="isthirdparty"/>
|
||||
<result property="url" column="url"/>
|
||||
<result property="isrelease" column="isrelease"/>
|
||||
<result property="isdel" column="isdel"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="abstractcontent" column="abstractcontent"/>
|
||||
<result property="schoolid" column="schoolid"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByNewsVo">
|
||||
select id, title, imgurl, type, content, createuserid, isthirdparty, url, isrelease, isdel, create_time, abstractcontent, schoolid from by_news
|
||||
</sql>
|
||||
|
||||
<select id="selectByNewsList" parameterType="ByNews" resultMap="ByNewsResult">
|
||||
<include refid="selectByNewsVo"/>
|
||||
<where>
|
||||
<if test="title != null and title != ''">and title = #{title}</if>
|
||||
<if test="imgurl != null and imgurl != ''">and imgurl = #{imgurl}</if>
|
||||
<if test="type != null and type != ''">and type = #{type}</if>
|
||||
<if test="content != null and content != ''">and content = #{content}</if>
|
||||
<if test="createuserid != null ">and createuserid = #{createuserid}</if>
|
||||
<if test="isthirdparty != null and isthirdparty != ''">and isthirdparty = #{isthirdparty}</if>
|
||||
<if test="url != null and url != ''">and url = #{url}</if>
|
||||
<if test="isrelease != null and isrelease != ''">and isrelease = #{isrelease}</if>
|
||||
<if test="isdel != null and isdel != ''">and isdel = #{isdel}</if>
|
||||
<if test="abstractcontent != null and abstractcontent != ''">and abstractcontent = #{abstractcontent}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectByNewsById" parameterType="Long" resultMap="ByNewsResult">
|
||||
<include refid="selectByNewsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertByNews" parameterType="ByNews" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into by_news
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">title,</if>
|
||||
<if test="imgurl != null and imgurl != ''">imgurl,</if>
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
<if test="content != null and content != ''">content,</if>
|
||||
<if test="createuserid != null ">createuserid,</if>
|
||||
<if test="isthirdparty != null and isthirdparty != ''">isthirdparty,</if>
|
||||
<if test="url != null and url != ''">url,</if>
|
||||
<if test="isrelease != null and isrelease != ''">isrelease,</if>
|
||||
<if test="isdel != null and isdel != ''">isdel,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="abstractcontent != null and abstractcontent != ''">abstractcontent,</if>
|
||||
<if test="schoolid != null ">schoolid,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">#{title},</if>
|
||||
<if test="imgurl != null and imgurl != ''">#{imgurl},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="content != null and content != ''">#{content},</if>
|
||||
<if test="createuserid != null ">#{createuserid},</if>
|
||||
<if test="isthirdparty != null and isthirdparty != ''">#{isthirdparty},</if>
|
||||
<if test="url != null and url != ''">#{url},</if>
|
||||
<if test="isrelease != null and isrelease != ''">#{isrelease},</if>
|
||||
<if test="isdel != null and isdel != ''">#{isdel},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="abstractcontent != null and abstractcontent != ''">#{abstractcontent},</if>
|
||||
<if test="schoolid != null ">#{schoolid},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByNews" parameterType="ByNews">
|
||||
update by_news
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">title = #{title},</if>
|
||||
<if test="imgurl != null and imgurl != ''">imgurl = #{imgurl},</if>
|
||||
<if test="type != null and type != ''">type = #{type},</if>
|
||||
<if test="content != null and content != ''">content = #{content},</if>
|
||||
<if test="createuserid != null ">createuserid = #{createuserid},</if>
|
||||
<if test="isthirdparty != null and isthirdparty != ''">isthirdparty = #{isthirdparty},</if>
|
||||
<if test="url != null and url != ''">url = #{url},</if>
|
||||
<if test="isrelease != null and isrelease != ''">isrelease = #{isrelease},</if>
|
||||
<if test="isdel != null and isdel != ''">isdel = #{isdel},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="abstractcontent != null and abstractcontent != ''">abstractcontent = #{abstractcontent},</if>
|
||||
<if test="schoolid != null ">schoolid = #{schoolid},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByNewsById" parameterType="Long">
|
||||
delete from by_news where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByNewsByIds" parameterType="String">
|
||||
delete from by_news where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user