<?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.elephant.framework.galaxy.aroad.module.info.mapper.InfoTemplatesMapper">

  <resultMap id="infoTemplatesMap" type="com.elephant.framework.galaxy.aroad.module.info.entity.InfoTemplates">
        <id property="templateId" column="template_id"/>
        <result property="templateName" column="template_name"/>
        <result property="templateType" column="template_type"/>
        <result property="templateUse" column="template_use"/>
        <result property="createDeptId" column="create_dept_id"/>
        <result property="createrId" column="creater_id"/>
        <result property="createTime" column="create_time"/>
  </resultMap>

  <select id="getInfoTemplatePage" resultMap="infoTemplatesMap">
    select * from info_templates
    where create_dept_id = #{createDeptId}
    and is_del = '0'
  </select>

  <!--假删除信息模板-->
  <update id="del">
    update info_templates set is_del='1' where template_id = #{templateId}
  </update>
</mapper>
