济菏高速数据中心代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.4 KiB

<?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.zc.business.mapper.DcInfoBoardVocabularyMapper">
<resultMap type="DcInfoBoardVocabulary" id="DcInfoBoardVocabularyResult">
<result property="id" column="id" />
<result property="word" column="word" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectDcInfoBoardVocabularyVo">
select id, word, create_time from dc_info_board_vocabulary
</sql>
<select id="selectDcInfoBoardVocabularyList" parameterType="DcInfoBoardVocabulary" resultMap="DcInfoBoardVocabularyResult">
<include refid="selectDcInfoBoardVocabularyVo"/>
<where>
<if test="word != null and word != ''"> and word = #{word}</if>
</where>
</select>
<select id="selectDcInfoBoardVocabularyById" parameterType="Long" resultMap="DcInfoBoardVocabularyResult">
<include refid="selectDcInfoBoardVocabularyVo"/>
where id = #{id}
</select>
<insert id="insertDcInfoBoardVocabulary" parameterType="DcInfoBoardVocabulary" useGeneratedKeys="true" keyProperty="id">
insert into dc_info_board_vocabulary
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="word != null">word,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="word != null">#{word},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateDcInfoBoardVocabulary" parameterType="DcInfoBoardVocabulary">
update dc_info_board_vocabulary
<trim prefix="SET" suffixOverrides=",">
<if test="word != null">word = #{word},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDcInfoBoardVocabularyById" parameterType="Long">
delete from dc_info_board_vocabulary where id = #{id}
</delete>
<delete id="deleteDcInfoBoardVocabularyByIds" parameterType="String">
delete from dc_info_board_vocabulary where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>