liusheng
2024-06-12 6d51501ca93f5bf46759f851988650477cf32e6c
smartor/src/main/resources/mapper/smartor/SvyLibTemplageCategoryMapper.xml
文件名从 smartor/src/main/resources/mapper/smartor/SvyLibTitleCategoryMapper.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.SvyLibTitleCategoryMapper">
<mapper namespace="com.smartor.mapper.SvyLibTemplateCategoryMapper">
    <resultMap type="com.smartor.domain.SvyLibTitleCategory" id="SvyLibTitleCategoryResult">
    <resultMap type="com.smartor.domain.SvyLibTemplateCategory" id="SvyLibTemplateCategoryResult">
        <result property="id" column="id"/>
        <result property="name" column="name"/>
        <result property="pid" column="pid"/>
@@ -18,7 +18,7 @@
        <result property="seqno" column="seqno"/>
    </resultMap>
    <sql id="selectSvyLibTitleCategoryVo">
    <sql id="selectSvyLibTemplateCategoryVo">
        select id,
               name,
               pid,
@@ -30,12 +30,12 @@
               update_time,
               orgid,
               seqno
        from svy_lib_title_category
        from svy_lib_template_category
    </sql>
    <select id="selectSvyLibTitleCategoryList" parameterType="com.smartor.domain.SvyLibTitleCategory"
            resultMap="SvyLibTitleCategoryResult">
        <include refid="selectSvyLibTitleCategoryVo"/>
    <select id="selectSvyLibTemplateCategoryList" parameterType="com.smartor.domain.SvyLibTemplateCategory"
            resultMap="SvyLibTemplateCategoryResult">
        <include refid="selectSvyLibTemplateCategoryVo"/>
        <where>
            del_flag=0
            <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
@@ -47,14 +47,14 @@
        </where>
    </select>
    <select id="selectSvyLibTitleCategoryById" parameterType="Long" resultMap="SvyLibTitleCategoryResult">
        <include refid="selectSvyLibTitleCategoryVo"/>
    <select id="selectSvyLibTemplateCategoryById" parameterType="Long" resultMap="SvyLibTemplateCategoryResult">
        <include refid="selectSvyLibTemplateCategoryVo"/>
        where id = #{id}
    </select>
    <insert id="insertSvyLibTitleCategory" parameterType="com.smartor.domain.SvyLibTitleCategory"
    <insert id="insertSvyLibTemplateCategory" parameterType="com.smartor.domain.SvyLibTemplateCategory"
            useGeneratedKeys="true" keyProperty="id">
        insert into svy_lib_title_category
        insert into svy_lib_template_category
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="name != null">name,</if>
            <if test="pid != null">pid,</if>
@@ -81,8 +81,8 @@
        </trim>
    </insert>
    <update id="updateSvyLibTitleCategory" parameterType="com.smartor.domain.SvyLibTitleCategory">
        update svy_lib_title_category
    <update id="updateSvyLibTemplateCategory" parameterType="com.smartor.domain.SvyLibTemplateCategory">
        update svy_lib_template_category
        <trim prefix="SET" suffixOverrides=",">
            <if test="name != null">name = #{name},</if>
            <if test="pid != null">pid = #{pid},</if>
@@ -98,16 +98,16 @@
        where id = #{id}
    </update>
    <update id="deleteSvyLibTitleCategoryById" parameterType="Long">
        update svy_lib_title_category
    <update id="deleteSvyLibTemplateCategoryById" parameterType="Long">
        update svy_lib_template_category
        <trim prefix="SET" suffixOverrides=",">
           del_flag = 1
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteSvyLibTitleCategoryByIds" parameterType="String">
        delete from svy_lib_title_category where id in
    <delete id="deleteSvyLibTemplateCategoryByIds" parameterType="String">
        delete from svy_lib_template_category where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>