<?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.kym.mapper.DeviceConfigMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.kym.entity.DeviceConfig">
        <result column="name" property="name" />
        <result column="remark" property="remark" />
        <result column="user_message_1" property="userMessage1" />
        <result column="user_message_2" property="userMessage2" />
        <!-- 价格字段（修复：属性名与实体字段对齐） -->
        <result column="water_price" property="priceWater" />
        <result column="foam_price" property="priceFoam" />
        <result column="cleaner_price" property="priceCleaner" />
        <result column="tap_price" property="priceTap" />
        <result column="user_ext_price" property="priceUserExt" />
        <result column="space_price" property="priceSpace" />
        <result column="coat_price" property="priceCoat" />
        <result column="blow_price" property="priceBlow" />
        <result column="quick_open_money" property="quickOpenMoney" />
        <!-- 收费扩展 -->
        <result column="space_timeout_seconds" property="spaceTimeoutSeconds" />
        <result column="space_timeout_mode" property="spaceTimeoutMode" />
        <result column="amount_min_limit" property="amountMinLimit" />
        <result column="prepay_money" property="prepayMoney" />
        <result column="price_countdown" property="priceCountdown" />
        <!-- 其他扩展 -->
        <result column="idle_timeout_strategy" property="idleTimeoutStrategy" />
        <result column="timezone" property="timezone" />
        <result column="user_input_mode" property="userInputMode" />
        <result column="login_timeout" property="loginTimeout" />
        <!-- 电机扩展 -->
        <result column="foam_link_mode" property="foamLinkMode" />
        <result column="motor_fee_flow" property="motorFeeFlow" />
        <!-- 功能模式 -->
        <result column="coat_mode" property="coatMode" />
        <result column="blow_mode" property="blowMode" />
        <result column="sensor_water" property="sensorWater" />
        <result column="light_alt_mode" property="lightAltMode" />
        <!-- 现有字段 -->
        <result column="maintenance_mode" property="maintenanceMode" />
        <result column="sound_volume" property="soundVolume" />
        <result column="screen_type" property="screenType" />
        <result column="video_source" property="videoSource" />
        <result column="video_play_delay" property="videoPlayDelay" />
        <result column="work_light_delay" property="workLightDelay" />
        <result column="bill_delay" property="billDelay" />
        <result column="tap_on_delay" property="tapOnDelay" />
        <result column="idle_timeout" property="idleTimeout" />
        <result column="notice_threshold_idle" property="noticeThresholdIdle" />
        <result column="operation_timeout" property="operationTimeout" />
        <result column="notice_threshold_operation" property="noticeThresholdOperation" />
        <result column="motor_on_delay" property="motorOnDelay" />
        <result column="motor_off_delay" property="motorOffDelay" />
        <result column="motor_on_interval" property="motorOnInterval" />
        <result column="motor_flow_on" property="motorFlowOn" />
        <result column="motor_flow_off" property="motorFlowOff" />
        <result column="work_mode" property="workMode" />
        <result column="work_time_period_1" property="workTimePeriod1" />
        <result column="work_time_period_2" property="workTimePeriod2" />
        <result column="light_mode" property="lightMode" />
        <result column="light_time_period_1" property="lightTimePeriod1" />
        <result column="light_time_period_2" property="lightTimePeriod2" />
        <!-- 语音 TTS -->
        <result column="tts_open_by_button" property="ttsOpenByButton" />
        <result column="tts_open_by_network" property="ttsOpenByNetwork" />
        <result column="tts_open_by_card" property="ttsOpenByCard" />
        <result column="tts_open_by_coin" property="ttsOpenByCoin" />
        <result column="tts_close_by_button" property="ttsCloseByButton" />
        <result column="tts_close_by_card" property="ttsCloseByCard" />
        <result column="tts_close_by_network" property="ttsCloseByNetwork" />
        <result column="tts_close_by_idle_timeout" property="ttsCloseByIdleTimeout" />
        <result column="tts_close_by_operation_timeout" property="ttsCloseByOperationTimeout" />
        <result column="tts_close_by_no_balance" property="ttsCloseByNoBalance" />
        <result column="tts_close_by_sys_error" property="ttsCloseBySysError" />
        <result column="tts_water_on" property="ttsWaterOn" />
        <result column="tts_water_off" property="ttsWaterOff" />
        <result column="tts_foam_on" property="ttsFoamOn" />
        <result column="tts_foam_off" property="ttsFoamOff" />
        <result column="tts_cleaner_on" property="ttsCleanerOn" />
        <result column="tts_cleaner_off" property="ttsCleanerOff" />
        <result column="tts_tap_on" property="ttsTapOn" />
        <result column="tts_tap_off" property="ttsTapOff" />
        <result column="tts_user_ext_on" property="ttsUserExtOn" />
        <result column="tts_user_ext_off" property="ttsUserExtOff" />
        <result column="tts_alert_user_login" property="ttsAlertUserLogin" />
        <result column="tts_alert_user_login_timeout" property="ttsAlertUserLoginTimeout" />
        <result column="tts_alert_account_required" property="ttsAlertAccountRequired" />
        <result column="tts_alert_password_required" property="ttsAlertPasswordRequired" />
        <result column="tts_alert_account_len_error" property="ttsAlertAccountLenError" />
        <result column="tts_alert_password_len_error" property="ttsAlertPasswordLenError" />
        <result column="tts_alert_sys_boot" property="ttsAlertSysBoot" />
        <result column="tts_alert_idle_mode" property="ttsAlertIdleMode" />
        <result column="tts_alert_sleep_mode" property="ttsAlertSleepMode" />
        <result column="tts_alert_config_mode" property="ttsAlertConfigMode" />
        <result column="tts_alert_maintenance_mode" property="ttsAlertMaintenanceMode" />
        <result column="tts_alert_no_water" property="ttsAlertNoWater" />
        <result column="tts_alert_no_foam" property="ttsAlertNoFoam" />
        <result column="tts_alert_motor_error" property="ttsAlertMotorError" />
        <result column="tts_alert_idle_remain_time" property="ttsAlertIdleRemainTime" />
        <result column="tts_alert_operation_remain_time" property="ttsAlertOperationRemainTime" />
        <result column="tts_alert_insert_coin" property="ttsAlertInsertCoin" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        name, remark,
        user_message_1, user_message_2,
        water_price, foam_price, cleaner_price, tap_price, user_ext_price,
        space_price, coat_price, blow_price, quick_open_money,
        space_timeout_seconds, space_timeout_mode, amount_min_limit, prepay_money, price_countdown,
        idle_timeout_strategy, timezone, user_input_mode, login_timeout,
        foam_link_mode, motor_fee_flow,
        coat_mode, blow_mode, sensor_water, light_alt_mode,
        maintenance_mode, sound_volume, screen_type, video_source, video_play_delay,
        work_light_delay, bill_delay, tap_on_delay,
        idle_timeout, notice_threshold_idle, operation_timeout, notice_threshold_operation,
        motor_on_delay, motor_off_delay, motor_on_interval, motor_flow_on, motor_flow_off,
        work_mode, work_time_period_1, work_time_period_2,
        light_mode, light_time_period_1, light_time_period_2,
        tts_open_by_button, tts_open_by_network, tts_open_by_card, tts_open_by_coin,
        tts_close_by_button, tts_close_by_card, tts_close_by_network,
        tts_close_by_idle_timeout, tts_close_by_operation_timeout, tts_close_by_no_balance, tts_close_by_sys_error,
        tts_water_on, tts_water_off, tts_foam_on, tts_foam_off,
        tts_cleaner_on, tts_cleaner_off, tts_tap_on, tts_tap_off, tts_user_ext_on, tts_user_ext_off,
        tts_alert_user_login, tts_alert_user_login_timeout,
        tts_alert_account_required, tts_alert_password_required,
        tts_alert_account_len_error, tts_alert_password_len_error,
        tts_alert_sys_boot, tts_alert_idle_mode, tts_alert_sleep_mode,
        tts_alert_config_mode, tts_alert_maintenance_mode,
        tts_alert_no_water, tts_alert_no_foam, tts_alert_motor_error,
        tts_alert_idle_remain_time, tts_alert_operation_remain_time, tts_alert_insert_coin
    </sql>

</mapper>
