<?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.ruoyi.ems.mapper.OpEnergyStrategyParamMapper">
    
    <resultMap type="com.ruoyi.ems.domain.OpEnergyStrategyParam" id="opEnergyStrategyParamResult">
        <result property="id"    column="id"    />
        <result property="strategyCode"    column="strategy_code"    />
        <result property="paramGroup"    column="param_group"    />
        <result property="paramKey"    column="param_key"    />
        <result property="paramName"    column="param_name"    />
        <result property="paramValue"    column="param_value"    />
        <result property="paramValueFormat"    column="param_value_format"    />
        <result property="editEnable"    column="edit_enable"    />
    </resultMap>

    <sql id="selectAdmOpEnergyStrategyParamVo">
        select id, strategy_code, param_group, param_key, param_name, param_value, param_value_format, edit_enable from adm_op_energy_strategy_param
    </sql>

    <select id="selectParamByStrategyCode" parameterType="java.lang.String" resultMap="opEnergyStrategyParamResult">
        <include refid="selectAdmOpEnergyStrategyParamVo"/>
        where strategy_code = #{strategyCode}
    </select>

    <update id="updateParamValue">
        update adm_op_energy_strategy_param
        set param_value = #{paramValue}
        where strategy_code = #{strategyCode} and param_group = #{paramGroup} and param_key = #{paramKey}
    </update>
</mapper>