章节表新增字段

master
xiaoCJ 4 months ago
parent be9a377957
commit fefdceb650

@ -267,251 +267,4 @@
families = #{families,jdbcType=VARCHAR}
where chapter_id = #{chapterId,jdbcType=VARCHAR}
</update>
<resultMap id="BaseResultMap" type="com.sztzjy.money_management.entity.Chapter">
<id column="chapter_id" jdbcType="VARCHAR" property="chapterId" />
<result column="chapter_name" jdbcType="VARCHAR" property="chapterName" />
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
<result column="source" jdbcType="VARCHAR" property="source" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.money_management.entity.Chapter">
<result column="knowledge" jdbcType="LONGVARCHAR" property="knowledge" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
chapter_id, chapter_name, add_time, source
</sql>
<sql id="Blob_Column_List">
knowledge
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.money_management.entity.ChapterExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from chapter
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.sztzjy.money_management.entity.ChapterExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from chapter
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from chapter
where chapter_id = #{chapterId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from chapter
where chapter_id = #{chapterId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.money_management.entity.ChapterExample">
delete from chapter
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.money_management.entity.Chapter">
insert into chapter (chapter_id, chapter_name, add_time,
source, knowledge)
values (#{chapterId,jdbcType=VARCHAR}, #{chapterName,jdbcType=VARCHAR}, #{addTime,jdbcType=TIMESTAMP},
#{source,jdbcType=VARCHAR}, #{knowledge,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.money_management.entity.Chapter">
insert into chapter
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="chapterId != null">
chapter_id,
</if>
<if test="chapterName != null">
chapter_name,
</if>
<if test="addTime != null">
add_time,
</if>
<if test="source != null">
source,
</if>
<if test="knowledge != null">
knowledge,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="chapterId != null">
#{chapterId,jdbcType=VARCHAR},
</if>
<if test="chapterName != null">
#{chapterName,jdbcType=VARCHAR},
</if>
<if test="addTime != null">
#{addTime,jdbcType=TIMESTAMP},
</if>
<if test="source != null">
#{source,jdbcType=VARCHAR},
</if>
<if test="knowledge != null">
#{knowledge,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.money_management.entity.ChapterExample" resultType="java.lang.Long">
select count(*) from chapter
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update chapter
<set>
<if test="record.chapterId != null">
chapter_id = #{record.chapterId,jdbcType=VARCHAR},
</if>
<if test="record.chapterName != null">
chapter_name = #{record.chapterName,jdbcType=VARCHAR},
</if>
<if test="record.addTime != null">
add_time = #{record.addTime,jdbcType=TIMESTAMP},
</if>
<if test="record.source != null">
source = #{record.source,jdbcType=VARCHAR},
</if>
<if test="record.knowledge != null">
knowledge = #{record.knowledge,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update chapter
set chapter_id = #{record.chapterId,jdbcType=VARCHAR},
chapter_name = #{record.chapterName,jdbcType=VARCHAR},
add_time = #{record.addTime,jdbcType=TIMESTAMP},
source = #{record.source,jdbcType=VARCHAR},
knowledge = #{record.knowledge,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update chapter
set chapter_id = #{record.chapterId,jdbcType=VARCHAR},
chapter_name = #{record.chapterName,jdbcType=VARCHAR},
add_time = #{record.addTime,jdbcType=TIMESTAMP},
source = #{record.source,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.money_management.entity.Chapter">
update chapter
<set>
<if test="chapterName != null">
chapter_name = #{chapterName,jdbcType=VARCHAR},
</if>
<if test="addTime != null">
add_time = #{addTime,jdbcType=TIMESTAMP},
</if>
<if test="source != null">
source = #{source,jdbcType=VARCHAR},
</if>
<if test="knowledge != null">
knowledge = #{knowledge,jdbcType=LONGVARCHAR},
</if>
</set>
where chapter_id = #{chapterId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sztzjy.money_management.entity.Chapter">
update chapter
set chapter_name = #{chapterName,jdbcType=VARCHAR},
add_time = #{addTime,jdbcType=TIMESTAMP},
source = #{source,jdbcType=VARCHAR},
knowledge = #{knowledge,jdbcType=LONGVARCHAR}
where chapter_id = #{chapterId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.money_management.entity.Chapter">
update chapter
set chapter_name = #{chapterName,jdbcType=VARCHAR},
add_time = #{addTime,jdbcType=TIMESTAMP},
source = #{source,jdbcType=VARCHAR}
where chapter_id = #{chapterId,jdbcType=VARCHAR}
</update>
</mapper>
Loading…
Cancel
Save