<?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.smartor.mapper.SvyLibTopicdirectionMapper">
|
|
<resultMap type="com.smartor.domain.SvyLibTopicdirection" id="SvyLibTopicdirectionResult">
|
<result property="id" column="id" />
|
<result property="topicid" column="topicid" />
|
<result property="transverse" column="transverse" />
|
<result property="direction" column="direction" />
|
<result property="guid" column="guid" />
|
<result property="orgid" column="orgid" />
|
</resultMap>
|
|
<sql id="selectSvyLibTopicdirectionVo">
|
select id, topicid, transverse, orgid, guid, direction from svy_lib_topicdirection
|
</sql>
|
|
<select id="selectSvyLibTopicdirectionList" parameterType="com.smartor.domain.SvyLibTopicdirection" resultMap="SvyLibTopicdirectionResult">
|
<include refid="selectSvyLibTopicdirectionVo"/>
|
<where>
|
<if test="topicid != null "> and topicid = #{topicid}</if>
|
<if test="transverse != null and transverse != ''"> and transverse = #{transverse}</if>
|
<if test="direction != null and direction != ''"> and direction = #{direction}</if>
|
</where>
|
</select>
|
|
<select id="selectSvyLibTopicdirectionById" parameterType="Long" resultMap="SvyLibTopicdirectionResult">
|
<include refid="selectSvyLibTopicdirectionVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertSvyLibTopicdirection" parameterType="com.smartor.domain.SvyLibTopicdirection" useGeneratedKeys="true" keyProperty="id">
|
insert into svy_lib_topicdirection
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="topicid != null">topicid,</if>
|
<if test="transverse != null">transverse,</if>
|
<if test="direction != null">direction,</if>
|
<if test="guid != null">guid,</if>
|
<if test="orgid != null">orgid,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="topicid != null">#{topicid},</if>
|
<if test="transverse != null">#{transverse},</if>
|
<if test="direction != null">#{direction},</if>
|
<if test="guid != null">#{guid},</if>
|
<if test="orgid != null">#{orgid},</if>
|
</trim>
|
</insert>
|
|
<update id="updateSvyLibTopicdirection" parameterType="com.smartor.domain.SvyLibTopicdirection">
|
update svy_lib_topicdirection
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="topicid != null">topicid = #{topicid},</if>
|
<if test="transverse != null">transverse = #{transverse},</if>
|
<if test="direction != null">direction = #{direction},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteSvyLibTopicdirectionById" parameterType="Long">
|
delete from svy_lib_topicdirection where id = #{id}
|
</delete>
|
|
<delete id="deleteSvyLibTopicdirectionByIds" parameterType="String">
|
delete from svy_lib_topicdirection where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|