liusheng
2024-09-18 907641e56c2085aaa81f267946dc3e3e9fca73e7
smartor/src/main/resources/mapper/smartor/SvyLibTopicCategoryMapper.xml
@@ -2,9 +2,9 @@
<!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"/>
@@ -19,7 +19,7 @@
        <result property="seqno" column="seqno"/>
    </resultMap>
    <sql id="selectSvyLibTopicCategoryVo">
    <sql id="selectSvyLibScriptCategoryVo">
        select id,
               name,
               topicid,
@@ -32,14 +32,14 @@
               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>
@@ -50,14 +50,14 @@
        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>
@@ -86,8 +86,8 @@
        </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>
@@ -104,16 +104,16 @@
        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>
@@ -121,7 +121,7 @@
    <select id="selectSeqMax" resultType="integer">
        select max(seqno) seqno
        from iivr_liba_template_assort
        from ivr_liba_template_assort
    </select>
</mapper>
</mapper>