| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.SvyLibTopicCategoryMapper"> |
| | | <mapper namespace="com.smartor.mapper.SvyLibScriptCategoryMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.SvyLibTopicCategory" id="SvyLibTopicCategoryResult"> |
| | | <resultMap type="com.smartor.domain.SvyLibScriptCategory" id="SvyLibScriptCategoryResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="topicid" column="topicid"/> |
| | |
| | | <result property="seqno" column="seqno"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyLibTopicCategoryVo"> |
| | | <sql id="selectSvyLibScriptCategoryVo"> |
| | | select id, |
| | | name, |
| | | topicid, |
| | |
| | | update_time, |
| | | seqno, |
| | | orgid |
| | | from svy_lib_topic_category |
| | | from svy_lib_script_category |
| | | </sql> |
| | | |
| | | <select id="selectSvyLibTopicCategoryList" parameterType="com.smartor.domain.SvyLibTopicCategory" |
| | | resultMap="SvyLibTopicCategoryResult"> |
| | | <include refid="selectSvyLibTopicCategoryVo"/> |
| | | <select id="selectSvyLibScriptCategoryList" parameterType="com.smartor.domain.SvyLibScriptCategory" |
| | | resultMap="SvyLibScriptCategoryResult"> |
| | | <include refid="selectSvyLibScriptCategoryVo"/> |
| | | <where> |
| | | del_flat=0 |
| | | del_flag=0 |
| | | <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> |
| | | <if test="topicid != null ">and topicid = #{topicid}</if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | |
| | | order by seqno asc |
| | | </select> |
| | | |
| | | <select id="selectSvyLibTopicCategoryById" parameterType="Long" resultMap="SvyLibTopicCategoryResult"> |
| | | <include refid="selectSvyLibTopicCategoryVo"/> |
| | | <select id="selectSvyLibScriptCategoryById" parameterType="Long" resultMap="SvyLibScriptCategoryResult"> |
| | | <include refid="selectSvyLibScriptCategoryVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertSvyLibTopicCategory" parameterType="com.smartor.domain.SvyLibTopicCategory" |
| | | <insert id="insertSvyLibScriptCategory" parameterType="com.smartor.domain.SvyLibScriptCategory" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into svy_lib_topic_category |
| | | insert into svy_lib_script_category |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="name != null">name,</if> |
| | | <if test="seqno != null">seqno,</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateSvyLibTopicCategory" parameterType="com.smartor.domain.SvyLibTopicCategory"> |
| | | update svy_lib_topic_category |
| | | <update id="updateSvyLibScriptCategory" parameterType="com.smartor.domain.SvyLibScriptCategory"> |
| | | update svy_lib_script_category |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="name != null">name = #{name},</if> |
| | | <if test="seqno != null">seqno = #{seqno},</if> |
| | |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteSvyLibTopicCategoryByIds" parameterType="String"> |
| | | <delete id="deleteSvyLibScriptCategoryByIds" parameterType="String"> |
| | | delete |
| | | from svy_lib_topic_category |
| | | from svy_lib_script_category |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <update id="deleteSvyLibTopicCategoryById" parameterType="Long"> |
| | | update svy_lib_topic_category |
| | | <update id="deleteSvyLibScriptCategoryById" parameterType="Long"> |
| | | update svy_lib_script_category |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="delFlag != null">del_flag = ,</if> |
| | | <if test="delFlag != null">del_flag = 1,</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | |
| | | <select id="selectSeqMax" resultType="integer"> |
| | | select max(seqno) seqno |
| | | from iivr_liba_template_assort |
| | | from ivr_liba_template_assort |
| | | |
| | | </select> |
| | | </mapper> |
| | | </mapper> |