139 lines
4.7 KiB
XML
139 lines
4.7 KiB
XML
<?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.cool.store.mapper.HyContentInfoMapper">
|
|
<resultMap id="BaseResultMap" type="com.cool.store.model.entity.HyContentInfoDO">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="content_title" jdbcType="VARCHAR" property="contentTitle" />
|
|
<result column="subject" jdbcType="VARCHAR" property="subject" />
|
|
<result column="content_type" jdbcType="VARCHAR" property="contentType" />
|
|
<result column="cover" jdbcType="VARCHAR" property="cover" />
|
|
<result column="status" jdbcType="TINYINT" property="status" />
|
|
<result column="deleted" jdbcType="TINYINT" property="deleted" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
|
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
|
</resultMap>
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.cool.store.model.entity.HyContentInfoDO">
|
|
<result column="content" jdbcType="LONGVARCHAR" property="content" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
id, content_title, subject, content_type, cover, status, deleted, create_time, update_time,
|
|
create_user_id, update_user_id
|
|
</sql>
|
|
<sql id="Blob_Column_List">
|
|
content
|
|
</sql>
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
|
insert into hy_content_info_${enterpriseId}
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="record.contentTitle != null">
|
|
content_title,
|
|
</if>
|
|
<if test="record.subject != null">
|
|
subject,
|
|
</if>
|
|
<if test="record.contentType != null">
|
|
content_type,
|
|
</if>
|
|
<if test="record.cover != null">
|
|
cover,
|
|
</if>
|
|
<if test="record.status != null">
|
|
status,
|
|
</if>
|
|
<if test="record.deleted != null">
|
|
deleted,
|
|
</if>
|
|
<if test="record.createTime != null">
|
|
create_time,
|
|
</if>
|
|
<if test="record.updateTime != null">
|
|
update_time,
|
|
</if>
|
|
<if test="record.createUserId != null">
|
|
create_user_id,
|
|
</if>
|
|
<if test="record.updateUserId != null">
|
|
update_user_id,
|
|
</if>
|
|
<if test="record.content != null">
|
|
content,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="record.contentTitle != null">
|
|
#{record.contentTitle},
|
|
</if>
|
|
<if test="record.subject != null">
|
|
#{record.subject},
|
|
</if>
|
|
<if test="record.contentType != null">
|
|
#{record.contentType},
|
|
</if>
|
|
<if test="record.cover != null">
|
|
#{record.cover},
|
|
</if>
|
|
<if test="record.status != null">
|
|
#{record.status},
|
|
</if>
|
|
<if test="record.deleted != null">
|
|
#{record.deleted},
|
|
</if>
|
|
<if test="record.createTime != null">
|
|
#{record.createTime},
|
|
</if>
|
|
<if test="record.updateTime != null">
|
|
#{record.updateTime},
|
|
</if>
|
|
<if test="record.createUserId != null">
|
|
#{record.createUserId},
|
|
</if>
|
|
<if test="record.updateUserId != null">
|
|
#{record.updateUserId},
|
|
</if>
|
|
<if test="record.content != null">
|
|
#{record.content},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective">
|
|
update hy_content_info_${enterpriseId}
|
|
<set>
|
|
<if test="record.contentTitle != null">
|
|
content_title = #{record.contentTitle},
|
|
</if>
|
|
<if test="record.subject != null">
|
|
subject = #{record.subject},
|
|
</if>
|
|
<if test="record.contentType != null">
|
|
content_type = #{record.contentType},
|
|
</if>
|
|
<if test="record.cover != null">
|
|
cover = #{record.cover},
|
|
</if>
|
|
<if test="record.status != null">
|
|
status = #{record.status},
|
|
</if>
|
|
<if test="record.deleted != null">
|
|
deleted = #{record.deleted},
|
|
</if>
|
|
<if test="record.createTime != null">
|
|
create_time = #{record.createTime},
|
|
</if>
|
|
<if test="record.updateTime != null">
|
|
update_time = #{record.updateTime},
|
|
</if>
|
|
<if test="record.createUserId != null">
|
|
create_user_id = #{record.createUserId},
|
|
</if>
|
|
<if test="record.updateUserId != null">
|
|
update_user_id = #{record.updateUserId},
|
|
</if>
|
|
<if test="record.content != null">
|
|
content = #{record.content},
|
|
</if>
|
|
</set>
|
|
where id = #{record.id}
|
|
</update>
|
|
</mapper> |