20200701-zlp-1
主题整合管理
This commit is contained in:
111
ruoyi/src/main/resources/mybatis/benyi/ByThemeActivityMapper.xml
Normal file
111
ruoyi/src/main/resources/mybatis/benyi/ByThemeActivityMapper.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.benyi.mapper.ByThemeActivityMapper">
|
||||
|
||||
<resultMap type="ByThemeActivity" id="ByThemeActivityResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="themeid" column="themeid"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="field" column="field"/>
|
||||
<result property="target" column="target"/>
|
||||
<result property="data" column="data"/>
|
||||
<result property="process" column="process"/>
|
||||
<result property="proposal" column="proposal"/>
|
||||
<result property="reflect" column="reflect"/>
|
||||
<result property="appendix" column="appendix"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByThemeActivityVo">
|
||||
select id, themeid, name, type, field, target, data, process, proposal, reflect, appendix, sort, create_time from by_theme_activity
|
||||
</sql>
|
||||
|
||||
<select id="selectByThemeActivityList" parameterType="ByThemeActivity" resultMap="ByThemeActivityResult">
|
||||
<include refid="selectByThemeActivityVo"/>
|
||||
<where>
|
||||
<if test="themeid != null ">and themeid = #{themeid}</if>
|
||||
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||
<if test="type != null and type != ''">and type = #{type}</if>
|
||||
<if test="field != null and field != ''">and field = #{field}</if>
|
||||
<if test="target != null and target != ''">and target = #{target}</if>
|
||||
<if test="data != null and data != ''">and data = #{data}</if>
|
||||
<if test="process != null and process != ''">and process = #{process}</if>
|
||||
<if test="proposal != null and proposal != ''">and proposal = #{proposal}</if>
|
||||
<if test="reflect != null and reflect != ''">and reflect = #{reflect}</if>
|
||||
<if test="appendix != null and appendix != ''">and appendix = #{appendix}</if>
|
||||
<if test="sort != null ">and sort = #{sort}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByThemeActivityById" parameterType="Long" resultMap="ByThemeActivityResult">
|
||||
<include refid="selectByThemeActivityVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertByThemeActivity" parameterType="ByThemeActivity" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into by_theme_activity
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="themeid != null ">themeid,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
<if test="field != null and field != ''">field,</if>
|
||||
<if test="target != null and target != ''">target,</if>
|
||||
<if test="data != null and data != ''">data,</if>
|
||||
<if test="process != null and process != ''">process,</if>
|
||||
<if test="proposal != null and proposal != ''">proposal,</if>
|
||||
<if test="reflect != null and reflect != ''">reflect,</if>
|
||||
<if test="appendix != null and appendix != ''">appendix,</if>
|
||||
<if test="sort != null ">sort,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="themeid != null ">#{themeid},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="field != null and field != ''">#{field},</if>
|
||||
<if test="target != null and target != ''">#{target},</if>
|
||||
<if test="data != null and data != ''">#{data},</if>
|
||||
<if test="process != null and process != ''">#{process},</if>
|
||||
<if test="proposal != null and proposal != ''">#{proposal},</if>
|
||||
<if test="reflect != null and reflect != ''">#{reflect},</if>
|
||||
<if test="appendix != null and appendix != ''">#{appendix},</if>
|
||||
<if test="sort != null ">#{sort},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByThemeActivity" parameterType="ByThemeActivity">
|
||||
update by_theme_activity
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="themeid != null ">themeid = #{themeid},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="type != null and type != ''">type = #{type},</if>
|
||||
<if test="field != null and field != ''">field = #{field},</if>
|
||||
<if test="target != null and target != ''">target = #{target},</if>
|
||||
<if test="data != null and data != ''">data = #{data},</if>
|
||||
<if test="process != null and process != ''">process = #{process},</if>
|
||||
<if test="proposal != null and proposal != ''">proposal = #{proposal},</if>
|
||||
<if test="reflect != null and reflect != ''">reflect = #{reflect},</if>
|
||||
<if test="appendix != null and appendix != ''">appendix = #{appendix},</if>
|
||||
<if test="sort != null ">sort = #{sort},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByThemeActivityById" parameterType="Long">
|
||||
delete from by_theme_activity where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByThemeActivityByIds" parameterType="String">
|
||||
delete from by_theme_activity where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
83
ruoyi/src/main/resources/mybatis/benyi/ByThemeMapper.xml
Normal file
83
ruoyi/src/main/resources/mybatis/benyi/ByThemeMapper.xml
Normal file
@ -0,0 +1,83 @@
|
||||
<?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.benyi.mapper.ByThemeMapper">
|
||||
|
||||
<resultMap type="ByTheme" id="ByThemeResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="communicate" column="communicate"/>
|
||||
<result property="classid" column="classid"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByThemeVo">
|
||||
select id, name, content, communicate, classid, sort, create_time from by_theme
|
||||
</sql>
|
||||
|
||||
<select id="selectByThemeList" parameterType="ByTheme" resultMap="ByThemeResult">
|
||||
<include refid="selectByThemeVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||
<if test="content != null and content != ''">and content = #{content}</if>
|
||||
<if test="communicate != null and communicate != ''">and communicate = #{communicate}</if>
|
||||
<if test="classid != null and classid != ''">and classid = #{classid}</if>
|
||||
<if test="sort != null ">and sort = #{sort}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByThemeById" parameterType="Long" resultMap="ByThemeResult">
|
||||
<include refid="selectByThemeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertByTheme" parameterType="ByTheme">
|
||||
insert into by_theme
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null ">id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="content != null and content != ''">content,</if>
|
||||
<if test="communicate != null and communicate != ''">communicate,</if>
|
||||
<if test="classid != null and classid != ''">classid,</if>
|
||||
<if test="sort != null ">sort,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null ">#{id},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="content != null and content != ''">#{content},</if>
|
||||
<if test="communicate != null and communicate != ''">#{communicate},</if>
|
||||
<if test="classid != null and classid != ''">#{classid},</if>
|
||||
<if test="sort != null ">#{sort},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByTheme" parameterType="ByTheme">
|
||||
update by_theme
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="content != null and content != ''">content = #{content},</if>
|
||||
<if test="communicate != null and communicate != ''">communicate = #{communicate},</if>
|
||||
<if test="classid != null and classid != ''">classid = #{classid},</if>
|
||||
<if test="sort != null ">sort = #{sort},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByThemeById" parameterType="Long">
|
||||
delete from by_theme where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByThemeByIds" parameterType="String">
|
||||
delete from by_theme where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user