SellerServiceFeeRuleMapper.xml 1.49 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.yoho.ufo.dal.SellerServiceFeeRuleMapper">
  <resultMap id="BaseResultMap" type="com.yoho.ufo.dal.model.SellerServiceFeeRule">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="stats_code" jdbcType="VARCHAR" property="statsCode" />
    <result column="enter_type" jdbcType="INTEGER" property="enterType" />
    <result column="status" jdbcType="CHAR" property="status" />
    <result column="rule_param" jdbcType="VARCHAR" property="ruleParam" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
  </resultMap>
  <sql id="Base_Column_List">
    id, stats_code, enter_type, status, rule_param, remark
  </sql>
  <select id="selectByEnterType" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from seller_service_fee_rule
    where enter_type = #{enterType,jdbcType=BIGINT}
  </select>

  <select id="selectAllEnabledRules" resultMap="BaseResultMap" >
    select
    <include refid="Base_Column_List" />
    from seller_service_fee_rule
    where status = 'Y'
  </select>

  <update id="updateByEnterType" parameterType="com.yoho.ufo.dal.model.SellerServiceFeeRule">
        update seller_service_fee_rule
        set rule_param = #{ruleParam,jdbcType=VARCHAR}
        where enter_type = #{enterType,jdbcType=INTEGER}
      </update>
</mapper>