文件名从 smartor/src/main/resources/mapper/smartor/SvyLibTitleCategoryMapper.xml 修改 |
| | |
| | | <!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"/> |
| | |
| | | <result property="seqno" column="seqno"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyLibTitleCategoryVo"> |
| | | <sql id="selectSvyLibTemplateCategoryVo"> |
| | | select id, |
| | | name, |
| | | pid, |
| | |
| | | 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> |
| | |
| | | </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> |
| | |
| | | </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> |
| | |
| | | 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> |
| | |
| | | from ivr_liba_extemplate_category |
| | | |
| | | </select> |
| | | </mapper> |
| | | </mapper> |