增加标题以及内容字段

master
elliott 2 years ago
parent 64cea52a0e
commit a7e014c169

@ -18,6 +18,14 @@ public class SysFiringInfo extends BaseEntity
/** 主键ID */
private Long id;
/** 标题 */
@Excel(name = "标题")
private String title;
/** 内容 */
@Excel(name = "内容")
private String content;
/** 文件路径 */
@Excel(name = "文件路径")
private String filePath;
@ -80,6 +88,22 @@ public class SysFiringInfo extends BaseEntity
return type;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -3,9 +3,11 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.flossom.system.mapper.SysFiringInfoMapper">
<resultMap type="SysFiringInfo" id="SysFiringInfoResult">
<result property="id" column="id" />
<result property="title" column="title" />
<result property="content" column="content" />
<result property="filePath" column="file_path" />
<result property="fileSuffix" column="file_suffix" />
<result property="delFlag" column="del_flag" />
@ -15,26 +17,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectSysFiringInfoVo">
select id, file_path, file_suffix, del_flag, type, create_time, create_by from sys_firing_info
select id, title,content, file_path, file_suffix, del_flag, type, create_time, create_by from sys_firing_info
</sql>
<select id="selectSysFiringInfoList" parameterType="SysFiringInfo" resultMap="SysFiringInfoResult">
<include refid="selectSysFiringInfoVo"/>
<where>
<where>
<if test="filePath != null and filePath != ''"> and file_path = #{filePath}</if>
<if test="fileSuffix != null and fileSuffix != ''"> and file_suffix = #{fileSuffix}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
</where>
</select>
<select id="selectSysFiringInfoById" parameterType="Long" resultMap="SysFiringInfoResult">
<include refid="selectSysFiringInfoVo"/>
where id = #{id}
</select>
<insert id="insertSysFiringInfo" parameterType="SysFiringInfo" useGeneratedKeys="true" keyProperty="id">
insert into sys_firing_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null">title,</if>
<if test="content != null">content,</if>
<if test="filePath != null">file_path,</if>
<if test="fileSuffix != null">file_suffix,</if>
<if test="delFlag != null">del_flag,</if>
@ -44,6 +48,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="filePath != null">#{filePath},</if>
<if test="title != null">#{title},</if>
<if test="content != null">#{content},</if>
<if test="fileSuffix != null">#{fileSuffix},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="type != null">#{type},</if>
@ -55,6 +61,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateSysFiringInfo" parameterType="SysFiringInfo">
update sys_firing_info
<trim prefix="SET" suffixOverrides=",">
<if test="title != null">title = #{title},</if>
<if test="content != null">content = #{content},</if>
<if test="filePath != null">file_path = #{filePath},</if>
<if test="fileSuffix != null">file_suffix = #{fileSuffix},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
@ -70,9 +78,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteSysFiringInfoByIds" parameterType="String">
delete from sys_firing_info where id in
delete from sys_firing_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
</mapper>

Loading…
Cancel
Save