<?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.bonus.canteen.core.notice.print.v2.mapper.NoticePrintTemplateMapper">
    <select id="getPrintTemplateListByDeviceType" resultType="com.bonus.canteen.core.notice.print.v2.vo.NoticePrintTemplateVO">
        SELECT template_id,
               template_name,
               if_default,
               print_type,
               uptime
        FROM notice_print_template
        WHERE device_type = #{deviceType}
          AND del_flag = #{delFlag}
    </select>

    <select id="getNoticePrintTemplateListByScene" resultType="com.bonus.canteen.core.notice.print.v2.vo.NoticePrintTemplateVO">
        SELECT template_id,
               template_name,
               device_type,
               if_default,
               print_scene,
               print_type,
               template_model,
               template_size,
               uptime
        FROM notice_print_template
        WHERE device_type = #{content.deviceType}
          AND del_flag = #{delFlag}
    </select>

    <select id="getNoticePrintTemplateByTemplateId" resultType="com.bonus.canteen.core.notice.print.v2.vo.NoticePrintTemplateVO">
        SELECT template_id,
               template_name,
               device_type,
               if_default,
               print_scene,
               print_type,
               template_model,
               template_size,
               uptime
        FROM notice_print_template
        WHERE template_id = #{templateId}
    </select>
</mapper>
