TBillingRuleConfigSMapper.xml 2.45 KB
<?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.zteits.bill.mapper.smapper.TBillingRuleConfigSMapper">
    <resultMap id="BaseResultMap" type="com.zteits.bill.domain.TBillingRuleConfig" >
        <id column="id" property="id" jdbcType="BIGINT" />
        <result column="rule_no" property="ruleNo" jdbcType="VARCHAR" />
        <result column="rule_config_no" property="ruleConfigNo" jdbcType="VARCHAR" />
        <result column="billing_config_type" property="billingConfigType" jdbcType="INTEGER" />
        <result column="isDay" property="isday" jdbcType="INTEGER" />
        <result column="start_time" property="startTime" jdbcType="TIME" />
        <result column="end_time" property="endTime" jdbcType="TIME" />
        <result column="start_billing_time" property="startBillingTime" jdbcType="INTEGER" />
        <result column="end_billing_time" property="endBillingTime" jdbcType="INTEGER" />
        <result column="unit" property="unit" jdbcType="INTEGER" />
        <result column="unit_rate" property="unitRate" jdbcType="INTEGER" />
        <result column="sort" property="sort" jdbcType="INTEGER" />
        <result column="unit_free_time" property="unitFreeTime" jdbcType="INTEGER" />
        <result column="create_op" property="createOp" jdbcType="BIGINT" />
        <result column="create_op_name" property="createOpName" jdbcType="VARCHAR" />
        <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
        <result column="modify_op" property="modifyOp" jdbcType="BIGINT" />
        <result column="modify_op_name" property="modifyOpName" jdbcType="VARCHAR" />
        <result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
    </resultMap>
    <sql id="Base_Column_List" >
    id, rule_no, rule_config_no, billing_config_type, isDay, start_time, end_time, start_billing_time,
    end_billing_time, unit, unit_rate, sort, unit_free_time, create_op, create_op_name,
    create_time, modify_op, modify_op_name, modify_time
  </sql>

    <select id="queryBillingRuleConfigByRuleNos" resultMap="BaseResultMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_billing_rule_config t WHERE t.rule_no IN
        <foreach collection="ruleNos" open="(" close=")" separator="," item="ruleNo" index="index">
            #{ruleNo}
        </foreach>
        ORDER BY sort ASC
    </select>

</mapper>