<?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.dhcc.finance.main.dao.CwBdScenarioMapper">
  <resultMap id="BaseResultMap" type="com.dhcc.finance.main.domain.CwBdScenario">
    <id column="ID" jdbcType="VARCHAR" property="id" />
    <result column="YWLX" jdbcType="VARCHAR" property="ywlx" />
    <result column="JYM" jdbcType="VARCHAR" property="jym" />
    <result column="JYCJMC" jdbcType="VARCHAR" property="jycjmc" />
    <result column="XTCCLX" jdbcType="VARCHAR" property="xtcclx" />
    <result column="DYJHBZ" jdbcType="VARCHAR" property="dyjhbz" />
    <result column="YXFS" jdbcType="VARCHAR" property="yxfs" />
    <result column="SYQFJ" jdbcType="VARCHAR" property="syqfj" />
    <result column="CCLB" jdbcType="VARCHAR" property="cclb" />
    <result column="SGLX" jdbcType="VARCHAR" property="sglx" />
    <result column="HTFL" jdbcType="VARCHAR" property="htfl" />
    <result column="TZLB" jdbcType="VARCHAR" property="tzlb" />
    <result column="SFHG" jdbcType="VARCHAR" property="sfhg" />
    <result column="SFZSZZS" jdbcType="VARCHAR" property="sfzszzs" />
    <result column="JGLX" jdbcType="VARCHAR" property="jglx" />
    <result column="SFGZ" jdbcType="VARCHAR" property="sfgz" />
    <result column="FYLX" jdbcType="VARCHAR" property="fylx" />
    <result column="RECORD_ACCOUNT" jdbcType="VARCHAR" property="recordAccount" />
    <result column="RECORD_BENEFIT" jdbcType="VARCHAR" property="recordBenefit" />
    <result column="RECORD_SEQ" jdbcType="VARCHAR" property="recordSeq" />
    <result column="ACCOUNT_MODEL" jdbcType="VARCHAR" property="accountModel" />
    <result column="FLOW_TYPE" jdbcType="VARCHAR" property="flowType" />
    <result column="USE_STATE" jdbcType="VARCHAR" property="useState" />
    <result column="CREATE_USER" jdbcType="VARCHAR" property="createUser" />
    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
    <result column="UPDATE_USER" jdbcType="VARCHAR" property="updateUser" />
    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="REMARK" jdbcType="VARCHAR" property="remark" />
    <result column="JZXTLX" jdbcType="VARCHAR" property="jzxtlx" />
    <result column="VOUCHER_TYPE" jdbcType="VARCHAR" property="voucherType" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    ID, YWLX, JYM, JYCJMC, XTCCLX, DYJHBZ, YXFS, SYQFJ, CCLB, SGLX, HTFL, TZLB, SFHG, 
    SFZSZZS, JGLX, SFGZ, FYLX, RECORD_ACCOUNT, RECORD_BENEFIT, RECORD_SEQ, ACCOUNT_MODEL,
    FLOW_TYPE, USE_STATE, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, REMARK,JZXTLX,VOUCHER_TYPE
  </sql>
  <select id="selectByExample" parameterType="com.dhcc.finance.main.domain.CwBdScenarioExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from cw_bd_scenario
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from cw_bd_scenario
    where ID = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from cw_bd_scenario
    where ID = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.dhcc.finance.main.domain.CwBdScenarioExample">
    delete from cw_bd_scenario
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.dhcc.finance.main.domain.CwBdScenario">
   insert into cw_bd_scenario (ID, YWLX, JYM, 
      JYCJMC, XTCCLX, DYJHBZ, 
      YXFS, SYQFJ, CCLB, 
      SGLX, HTFL, TZLB, SFHG, 
      SFZSZZS, JGLX, SFGZ, 
      FYLX, RECORD_ACCOUNT, RECORD_BENEFIT, 
      RECORD_SEQ, ACCOUNT_MODEL, FLOW_TYPE, 
      USE_STATE, CREATE_USER, CREATE_TIME, 
      UPDATE_USER, UPDATE_TIME, REMARK
      )
    values (#{id,jdbcType=VARCHAR}, #{ywlx,jdbcType=VARCHAR}, #{jym,jdbcType=VARCHAR}, 
      #{jycjmc,jdbcType=VARCHAR}, #{xtcclx,jdbcType=VARCHAR}, #{dyjhbz,jdbcType=VARCHAR}, 
      #{yxfs,jdbcType=VARCHAR}, #{syqfj,jdbcType=VARCHAR}, #{cclb,jdbcType=VARCHAR}, 
      #{sglx,jdbcType=VARCHAR}, #{htfl,jdbcType=VARCHAR}, #{tzlb,jdbcType=VARCHAR}, #{sfhg,jdbcType=VARCHAR}, 
      #{sfzszzs,jdbcType=VARCHAR}, #{jglx,jdbcType=VARCHAR}, #{sfgz,jdbcType=VARCHAR}, 
      #{fylx,jdbcType=VARCHAR}, #{recordAccount,jdbcType=VARCHAR}, #{recordBenefit,jdbcType=VARCHAR}, 
      #{recordSeq,jdbcType=VARCHAR}, #{accountModel,jdbcType=VARCHAR}, #{flowType,jdbcType=VARCHAR}, 
      #{useState,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{updateUser,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.dhcc.finance.main.domain.CwBdScenario">
    insert into cw_bd_scenario
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        ID,
      </if>
      <if test="ywlx != null">
        YWLX,
      </if>
      <if test="jym != null">
        JYM,
      </if>
      <if test="jycjmc != null">
        JYCJMC,
      </if>
      <if test="xtcclx != null">
        XTCCLX,
      </if>
      <if test="dyjhbz != null">
        DYJHBZ,
      </if>
      <if test="yxfs != null">
        YXFS,
      </if>
      <if test="syqfj != null">
        SYQFJ,
      </if>
      <if test="cclb != null">
        CCLB,
      </if>
      <if test="sglx != null">
        SGLX,
      </if>
      <if test="htfl != null">
        HTFL,
      </if>
      <if test="tzlb != null">
        TZLB,
      </if>
      <if test="sfhg != null">
        SFHG,
      </if>
      <if test="sfzszzs != null">
        SFZSZZS,
      </if>
      <if test="recordAccount != null">
        RECORD_ACCOUNT,
      </if>
      <if test="recordBenefit != null">
        RECORD_BENEFIT,
      </if>
      <if test="recordSeq != null">
        RECORD_SEQ,
      </if>
      <if test="accountModel != null">
        ACCOUNT_MODEL,
      </if>
      <if test="flowType != null">
        FLOW_TYPE,
      </if>
      <if test="useState != null">
        USE_STATE,
      </if>
      <if test="createUser != null">
        CREATE_USER,
      </if>
      <if test="createTime != null">
        CREATE_TIME,
      </if>
      <if test="updateUser != null">
        UPDATE_USER,
      </if>
      <if test="updateTime != null">
        UPDATE_TIME,
      </if>
      <if test="remark != null">
        REMARK,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="ywlx != null">
        #{ywlx,jdbcType=VARCHAR},
      </if>
      <if test="jym != null">
        #{jym,jdbcType=VARCHAR},
      </if>
      <if test="jycjmc != null">
        #{jycjmc,jdbcType=VARCHAR},
      </if>
      <if test="xtcclx != null">
        #{xtcclx,jdbcType=VARCHAR},
      </if>
      <if test="dyjhbz != null">
        #{dyjhbz,jdbcType=VARCHAR},
      </if>
      <if test="yxfs != null">
        #{yxfs,jdbcType=VARCHAR},
      </if>
      <if test="syqfj != null">
        #{syqfj,jdbcType=VARCHAR},
      </if>
      <if test="cclb != null">
        #{cclb,jdbcType=VARCHAR},
      </if>
      <if test="sglx != null">
        #{sglx,jdbcType=VARCHAR},
      </if>
      <if test="htfl != null">
        #{htfl,jdbcType=VARCHAR},
      </if>
      <if test="tzlb != null">
        #{tzlb,jdbcType=VARCHAR},
      </if>
      <if test="sfhg != null">
        #{sfhg,jdbcType=VARCHAR},
      </if>
      <if test="sfzszzs != null">
        #{sfzszzs,jdbcType=VARCHAR},
      </if>
      <if test="recordAccount != null">
        #{recordAccount,jdbcType=VARCHAR},
      </if>
      <if test="recordBenefit != null">
        #{recordBenefit,jdbcType=VARCHAR},
      </if>
      <if test="recordSeq != null">
        #{recordSeq,jdbcType=VARCHAR},
      </if>
      <if test="accountModel != null">
        #{accountModel,jdbcType=VARCHAR},
      </if>
      <if test="flowType != null">
        #{flowType,jdbcType=VARCHAR},
      </if>
      <if test="useState != null">
        #{useState,jdbcType=VARCHAR},
      </if>
      <if test="createUser != null">
        #{createUser,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUser != null">
        #{updateUser,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.dhcc.finance.main.domain.CwBdScenarioExample" resultType="java.lang.Long">
    select count(*) from cw_bd_scenario
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
     update cw_bd_scenario
    <set>
      <if test="record.id != null">
        ID = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.ywlx != null">
        YWLX = #{record.ywlx,jdbcType=VARCHAR},
      </if>
      <if test="record.jym != null">
        JYM = #{record.jym,jdbcType=VARCHAR},
      </if>
      <if test="record.jycjmc != null">
        JYCJMC = #{record.jycjmc,jdbcType=VARCHAR},
      </if>
      <if test="record.xtcclx != null">
        XTCCLX = #{record.xtcclx,jdbcType=VARCHAR},
      </if>
      <if test="record.dyjhbz != null">
        DYJHBZ = #{record.dyjhbz,jdbcType=VARCHAR},
      </if>
      <if test="record.yxfs != null">
        YXFS = #{record.yxfs,jdbcType=VARCHAR},
      </if>
      <if test="record.syqfj != null">
        SYQFJ = #{record.syqfj,jdbcType=VARCHAR},
      </if>
      <if test="record.cclb != null">
        CCLB = #{record.cclb,jdbcType=VARCHAR},
      </if>
      <if test="record.sglx != null">
        SGLX = #{record.sglx,jdbcType=VARCHAR},
      </if>
      <if test="record.htfl != null">
        HTFL = #{record.htfl,jdbcType=VARCHAR},
      </if>
      <if test="record.tzlb != null">
        TZLB = #{record.tzlb,jdbcType=VARCHAR},
      </if>
      <if test="record.sfhg != null">
        SFHG = #{record.sfhg,jdbcType=VARCHAR},
      </if>
      <if test="record.sfzszzs != null">
        SFZSZZS = #{record.sfzszzs,jdbcType=VARCHAR},
      </if>
      <if test="record.jglx != null">
        JGLX = #{record.jglx,jdbcType=VARCHAR},
      </if>
      <if test="record.sfgz != null">
        SFGZ = #{record.sfgz,jdbcType=VARCHAR},
      </if>
      <if test="record.fylx != null">
        FYLX = #{record.fylx,jdbcType=VARCHAR},
      </if>
      <if test="record.recordAccount != null">
        RECORD_ACCOUNT = #{record.recordAccount,jdbcType=VARCHAR},
      </if>
      <if test="record.recordBenefit != null">
        RECORD_BENEFIT = #{record.recordBenefit,jdbcType=VARCHAR},
      </if>
      <if test="record.recordSeq != null">
        RECORD_SEQ = #{record.recordSeq,jdbcType=VARCHAR},
      </if>
      <if test="record.accountModel != null">
        ACCOUNT_MODEL = #{record.accountModel,jdbcType=VARCHAR},
      </if>
      <if test="record.flowType != null">
        FLOW_TYPE = #{record.flowType,jdbcType=VARCHAR},
      </if>
      <if test="record.useState != null">
        USE_STATE = #{record.useState,jdbcType=VARCHAR},
      </if>
      <if test="record.createUser != null">
        CREATE_USER = #{record.createUser,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updateUser != null">
        UPDATE_USER = #{record.updateUser,jdbcType=VARCHAR},
      </if>
      <if test="record.updateTime != null">
        UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.remark != null">
        REMARK = #{record.remark,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update cw_bd_scenario
    set ID = #{record.id,jdbcType=VARCHAR},
      YWLX = #{record.ywlx,jdbcType=VARCHAR},
      JYM = #{record.jym,jdbcType=VARCHAR},
      JYCJMC = #{record.jycjmc,jdbcType=VARCHAR},
      XTCCLX = #{record.xtcclx,jdbcType=VARCHAR},
      DYJHBZ = #{record.dyjhbz,jdbcType=VARCHAR},
      YXFS = #{record.yxfs,jdbcType=VARCHAR},
      SYQFJ = #{record.syqfj,jdbcType=VARCHAR},
      CCLB = #{record.cclb,jdbcType=VARCHAR},
      SGLX = #{record.sglx,jdbcType=VARCHAR},
      HTFL = #{record.htfl,jdbcType=VARCHAR},
      TZLB = #{record.tzlb,jdbcType=VARCHAR},
      SFHG = #{record.sfhg,jdbcType=VARCHAR},
      SFZSZZS = #{record.sfzszzs,jdbcType=VARCHAR},
      JGLX = #{record.jglx,jdbcType=VARCHAR},
      SFGZ = #{record.sfgz,jdbcType=VARCHAR},
      FYLX = #{record.fylx,jdbcType=VARCHAR},
      RECORD_ACCOUNT = #{record.recordAccount,jdbcType=VARCHAR},
      RECORD_BENEFIT = #{record.recordBenefit,jdbcType=VARCHAR},
      RECORD_SEQ = #{record.recordSeq,jdbcType=VARCHAR},
      ACCOUNT_MODEL = #{record.accountModel,jdbcType=VARCHAR},
      FLOW_TYPE = #{record.flowType,jdbcType=VARCHAR},
      USE_STATE = #{record.useState,jdbcType=VARCHAR},
      CREATE_USER = #{record.createUser,jdbcType=VARCHAR},
      CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
      UPDATE_USER = #{record.updateUser,jdbcType=VARCHAR},
      UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
      REMARK = #{record.remark,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.dhcc.finance.main.domain.CwBdScenario">
     update cw_bd_scenario
    <set>
      <if test="ywlx != null">
        YWLX = #{ywlx,jdbcType=VARCHAR},
      </if>
      <if test="jym != null">
        JYM = #{jym,jdbcType=VARCHAR},
      </if>
      <if test="jycjmc != null">
        JYCJMC = #{jycjmc,jdbcType=VARCHAR},
      </if>
      <if test="xtcclx != null">
        XTCCLX = #{xtcclx,jdbcType=VARCHAR},
      </if>
      <if test="dyjhbz != null">
        DYJHBZ = #{dyjhbz,jdbcType=VARCHAR},
      </if>
      <if test="yxfs != null">
        YXFS = #{yxfs,jdbcType=VARCHAR},
      </if>
      <if test="syqfj != null">
        SYQFJ = #{syqfj,jdbcType=VARCHAR},
      </if>
      <if test="cclb != null">
        CCLB = #{cclb,jdbcType=VARCHAR},
      </if>
      <if test="sglx != null">
        SGLX = #{sglx,jdbcType=VARCHAR},
      </if>
      <if test="htfl != null">
        HTFL = #{htfl,jdbcType=VARCHAR},
      </if>
      <if test="tzlb != null">
        TZLB = #{tzlb,jdbcType=VARCHAR},
      </if>
      <if test="sfhg != null">
        SFHG = #{sfhg,jdbcType=VARCHAR},
      </if>
      <if test="sfzszzs != null">
        SFZSZZS = #{sfzszzs,jdbcType=VARCHAR},
      </if>
      <if test="jglx != null">
        JGLX = #{jglx,jdbcType=VARCHAR},
      </if>
      <if test="sfgz != null">
        SFGZ = #{sfgz,jdbcType=VARCHAR},
      </if>
      <if test="fylx != null">
        FYLX = #{fylx,jdbcType=VARCHAR},
      </if>
      <if test="recordAccount != null">
        RECORD_ACCOUNT = #{recordAccount,jdbcType=VARCHAR},
      </if>
      <if test="recordBenefit != null">
        RECORD_BENEFIT = #{recordBenefit,jdbcType=VARCHAR},
      </if>
      <if test="recordSeq != null">
        RECORD_SEQ = #{recordSeq,jdbcType=VARCHAR},
      </if>
      <if test="accountModel != null">
        ACCOUNT_MODEL = #{accountModel,jdbcType=VARCHAR},
      </if>
      <if test="flowType != null">
        FLOW_TYPE = #{flowType,jdbcType=VARCHAR},
      </if>
      <if test="useState != null">
        USE_STATE = #{useState,jdbcType=VARCHAR},
      </if>
      <if test="createUser != null">
        CREATE_USER = #{createUser,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUser != null">
        UPDATE_USER = #{updateUser,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null">
        REMARK = #{remark,jdbcType=VARCHAR},
      </if>
    </set>
    where ID = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.dhcc.finance.main.domain.CwBdScenario">
    update cw_bd_scenario
    set YWLX = #{ywlx,jdbcType=VARCHAR},
      JYM = #{jym,jdbcType=VARCHAR},
      JYCJMC = #{jycjmc,jdbcType=VARCHAR},
      XTCCLX = #{xtcclx,jdbcType=VARCHAR},
      DYJHBZ = #{dyjhbz,jdbcType=VARCHAR},
      YXFS = #{yxfs,jdbcType=VARCHAR},
      SYQFJ = #{syqfj,jdbcType=VARCHAR},
      CCLB = #{cclb,jdbcType=VARCHAR},
      SGLX = #{sglx,jdbcType=VARCHAR},
      HTFL = #{htfl,jdbcType=VARCHAR},
      TZLB = #{tzlb,jdbcType=VARCHAR},
      SFHG = #{sfhg,jdbcType=VARCHAR},
      SFZSZZS = #{sfzszzs,jdbcType=VARCHAR},
      JGLX = #{jglx,jdbcType=VARCHAR},
      SFGZ = #{sfgz,jdbcType=VARCHAR},
      FYLX = #{fylx,jdbcType=VARCHAR},
      RECORD_ACCOUNT = #{recordAccount,jdbcType=VARCHAR},
      RECORD_BENEFIT = #{recordBenefit,jdbcType=VARCHAR},
      RECORD_SEQ = #{recordSeq,jdbcType=VARCHAR},
      ACCOUNT_MODEL = #{accountModel,jdbcType=VARCHAR},
      FLOW_TYPE = #{flowType,jdbcType=VARCHAR},
      USE_STATE = #{useState,jdbcType=VARCHAR},
      CREATE_USER = #{createUser,jdbcType=VARCHAR},
      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      UPDATE_USER = #{updateUser,jdbcType=VARCHAR},
      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      REMARK = #{remark,jdbcType=VARCHAR}
    where ID = #{id,jdbcType=VARCHAR}
  </update>
  <!-- 根据交易码查询配置信息 -->
  <select id="selectByJym" parameterType="java.lang.String" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from cw_bd_scenario
    where JYM = #{jym,jdbcType=VARCHAR} and USE_STATE='1'
  </select>
  <select id="selectScenarioreJyM" resultType="string">
       SELECT  DISTINCT  JYM  from cw_bd_scenario  WHERE    USE_STATE='1'  ORDER BY  JYM
  </select>
  <select id="selectIsExistsOfTradeCode" resultType="java.lang.Long">
  	select count(1) from cw_bd_scenario where JYM = #{tradeCode,jdbcType=VARCHAR} and USE_STATE='1'
  </select>
<!--   批量逻辑删除 -->
  <update id="deleteCwBdScenarioById" parameterType="java.util.List">
  	  update cw_bd_scenario 
    set 
      USE_STATE = "0"
    where 
       ID in
    <foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
       #{item,jdbcType=VARCHAR}
   </foreach>	
  </update>
  <!-- 校验当前交易码是否需要记账 -->
    <select id="selectIsRecorded" resultType="java.lang.Long">
    select count(1) from cw_bd_scenario where jym=#{tradeCode,jdbcType=VARCHAR}  and  use_state='1'
  </select>
  
</mapper>