<?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.tofly.watermeter.mapper.QfcbarithmeticMapper">

    <resultMap id="qfcbarithmeticMap" type="com.tofly.watermeter.entity.Qfcbarithmetic">
        <id property="id" column="ID"/>
        <result property="arithType" column="ARITH_TYPE"/>
        <result property="startKjcode" column="START_KJCODE"/>
        <result property="endKjcode" column="END_KJCODE"/>
        <result property="arithCount" column="ARITH_COUNT"/>
        <result property="isForbidden" column="IS_FORBIDDEN"/>
        <result property="iscomment" column="ISCOMMENT"/>
        <association property="isForbiddenName" column="IS_FORBIDDEN"
                     select="getIsForbiddenName"/>
    </resultMap>

    <select id="getIsForbiddenName" resultType="string">
        select decode(#{isForbidden}, '0', '禁用', '1', '启用')
        from dual
    </select>


</mapper>
