1
zj
2024-10-08 6fb4fda8659d6202b34d2347fb0d481446e28ee3
src/main/resources/mapper/SitePayMapper.xml
@@ -2,31 +2,29 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nq.dao.SitePayMapper" >
  <resultMap id="BaseResultMap" type="com.nq.pojo.SitePay" >
    <constructor >
      <idArg column="id" jdbcType="INTEGER" javaType="java.lang.Integer" />
      <id column="id"   property="id"/>
      <result column="c_type" property="cType"/>
      <result column="form_url"  property="formUrl"/>
      <result column="form_code"  property="formCode"/>
      <arg column="c_type" jdbcType="INTEGER" javaType="java.lang.Integer" />
      <arg column="form_url" jdbcType="VARCHAR" javaType="java.lang.String" />
      <arg column="form_code" jdbcType="VARCHAR" javaType="java.lang.String" />
      <arg column="channel_type" jdbcType="VARCHAR" javaType="java.lang.String" />
      <arg column="channel_name" jdbcType="VARCHAR" javaType="java.lang.String" />
      <arg column="channel_desc" jdbcType="VARCHAR" javaType="java.lang.String" />
      <arg column="channel_account" jdbcType="VARCHAR" javaType="java.lang.String" />
      <arg column="channel_img" jdbcType="VARCHAR" javaType="java.lang.String" />
      <arg column="channel_min_limit" jdbcType="INTEGER" javaType="java.lang.Integer" />
      <arg column="channel_max_limit" jdbcType="INTEGER" javaType="java.lang.Integer" />
      <arg column="is_show" jdbcType="INTEGER" javaType="java.lang.Integer" />
      <arg column="is_lock" jdbcType="INTEGER" javaType="java.lang.Integer" />
      <arg column="totalPrice" jdbcType="DECIMAL" javaType="java.math.BigDecimal" />
      <result column="channel_type"  property="channelType"/>
      <result column="channel_name" property="channelName"/>
      <result column="channel_desc" property="channelDesc"/>
      <result column="channel_account"  property="channelAccount"/>
      <result column="channel_img"  property="channelImg"/>
      <result column="channel_min_limit"  property="channelMinLimit"/>
      <result column="channel_max_limit" property="channelMaxLimit"/>
      <result column="is_show"  property="isShow"/>
      <result column="is_lock"  property="isLock"/>
      <result column="total_price"  property="totalPrice"/>
      <result column="assets_type" property="assetsType"/>
    </constructor>
  </resultMap>
  <sql id="Base_Column_List" >
    id, c_type,form_url,form_code,channel_type, channel_name, channel_desc, channel_account, channel_img, channel_min_limit,
    channel_max_limit, is_show, is_lock, totalPrice
    channel_max_limit, is_show, is_lock, total_price,assets_type
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select
@@ -38,17 +36,17 @@
    delete from site_pay
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.nq.pojo.SitePay" >
    insert into site_pay (id, c_type,form_url,form_code,channel_type, channel_name,
      channel_desc, channel_account, channel_img,
      channel_min_limit, channel_max_limit, is_show,
      is_lock, totalPrice)
    values (#{id,jdbcType=INTEGER}, #{cType,jdbcType=INTEGER},#{formUrl,jdbcType=VARCHAR},#{formCode,jdbcType=VARCHAR},
      #{channelType,jdbcType=VARCHAR}, #{channelName,jdbcType=VARCHAR},
      #{channelDesc,jdbcType=VARCHAR}, #{channelAccount,jdbcType=VARCHAR}, #{channelImg,jdbcType=VARCHAR},
      #{channelMinLimit,jdbcType=INTEGER}, #{channelMaxLimit,jdbcType=INTEGER}, #{isShow,jdbcType=INTEGER},
      #{isLock,jdbcType=INTEGER},#{totalPrice,jdbcType=DECIMAL})
  </insert>
<!--  <insert id="insert" parameterType="com.nq.pojo.SitePay" >-->
<!--    insert into site_pay (id, c_type,form_url,form_code,channel_type, channel_name,-->
<!--      channel_desc, channel_account, channel_img,-->
<!--      channel_min_limit, channel_max_limit, is_show,-->
<!--      is_lock, total_price)-->
<!--    values (#{id,jdbcType=INTEGER}, #{cType,jdbcType=INTEGER},#{formUrl,jdbcType=VARCHAR},#{formCode,jdbcType=VARCHAR},-->
<!--      #{channelType,jdbcType=VARCHAR}, #{channelName,jdbcType=VARCHAR},-->
<!--      #{channelDesc,jdbcType=VARCHAR}, #{channelAccount,jdbcType=VARCHAR}, #{channelImg,jdbcType=VARCHAR},-->
<!--      #{channelMinLimit,jdbcType=INTEGER}, #{channelMaxLimit,jdbcType=INTEGER}, #{isShow,jdbcType=INTEGER},-->
<!--      #{isLock,jdbcType=INTEGER},#{totalPrice,jdbcType=DECIMAL})-->
<!--  </insert>-->
  <insert id="insertSelective" parameterType="com.nq.pojo.SitePay" >
    insert into site_pay
    <trim prefix="(" suffix=")" suffixOverrides="," >
@@ -235,10 +233,7 @@
  <select id="getPayInfo" resultMap="BaseResultMap">
    SELECT
    <include refid="Base_Column_List"/>
    FROM site_pay WHERE is_show = 0 and channel_max_limit>totalPrice
    <if test="payAmt != null and payAmt > 0">
      and channel_min_limit &lt;= #{payAmt} and channel_max_limit> #{payAmt}
    </if>
    FROM site_pay WHERE is_show = 0
  </select>