123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230 |
- <?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.xc.dao.SitePayMapper" >
- <resultMap id="BaseResultMap" type="com.xc.pojo.SitePay" >
- <constructor >
- <idArg column="id" jdbcType="INTEGER" javaType="java.lang.Integer" />
- <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" />
- </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
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from site_pay
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from site_pay
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xc.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)
- 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})
- </insert>
- <insert id="insertSelective" parameterType="com.xc.pojo.SitePay" >
- insert into site_pay
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="cType != null" >
- c_type,
- </if>
- <if test="formUrl != null" >
- form_url,
- </if>
- <if test="formCode != null" >
- form_code,
- </if>
- <if test="channelType != null" >
- channel_type,
- </if>
- <if test="channelName != null" >
- channel_name,
- </if>
- <if test="channelDesc != null" >
- channel_desc,
- </if>
- <if test="channelAccount != null" >
- channel_account,
- </if>
- <if test="channelImg != null" >
- channel_img,
- </if>
- <if test="channelMinLimit != null" >
- channel_min_limit,
- </if>
- <if test="channelMaxLimit != null" >
- channel_max_limit,
- </if>
- <if test="isShow != null" >
- is_show,
- </if>
- <if test="isLock != null" >
- is_lock,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- #{id,jdbcType=INTEGER},
- </if>
- <if test="cType != null" >
- #{cType,jdbcType=INTEGER},
- </if>
- <if test="formUrl != null" >
- #{formUrl,jdbcType=VARCHAR},
- </if>
- <if test="formCode != null" >
- #{formCode,jdbcType=VARCHAR},
- </if>
- <if test="channelType != null" >
- #{channelType,jdbcType=VARCHAR},
- </if>
- <if test="channelName != null" >
- #{channelName,jdbcType=VARCHAR},
- </if>
- <if test="channelDesc != null" >
- #{channelDesc,jdbcType=VARCHAR},
- </if>
- <if test="channelAccount != null" >
- #{channelAccount,jdbcType=VARCHAR},
- </if>
- <if test="channelImg != null" >
- #{channelImg,jdbcType=VARCHAR},
- </if>
- <if test="channelMinLimit != null" >
- #{channelMinLimit,jdbcType=INTEGER},
- </if>
- <if test="channelMaxLimit != null" >
- #{channelMaxLimit,jdbcType=INTEGER},
- </if>
- <if test="isShow != null" >
- #{isShow,jdbcType=INTEGER},
- </if>
- <if test="isLock != null" >
- #{isLock,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xc.pojo.SitePay" >
- update site_pay
- <set >
- <if test="cType != null" >
- c_type = #{cType,jdbcType=INTEGER},
- </if>
- <if test="formUrl != null" >
- form_url = #{formUrl,jdbcType=VARCHAR},
- </if>
- <if test="formCode != null" >
- form_code = #{formCode,jdbcType=VARCHAR},
- </if>
- <if test="channelType != null" >
- channel_type = #{channelType,jdbcType=VARCHAR},
- </if>
- <if test="channelName != null" >
- channel_name = #{channelName,jdbcType=VARCHAR},
- </if>
- <if test="channelDesc != null" >
- channel_desc = #{channelDesc,jdbcType=VARCHAR},
- </if>
- <if test="channelAccount != null" >
- channel_account = #{channelAccount,jdbcType=VARCHAR},
- </if>
- <if test="channelImg != null" >
- channel_img = #{channelImg,jdbcType=VARCHAR},
- </if>
- <if test="channelMinLimit != null" >
- channel_min_limit = #{channelMinLimit,jdbcType=INTEGER},
- </if>
- <if test="channelMaxLimit != null" >
- channel_max_limit = #{channelMaxLimit,jdbcType=INTEGER},
- </if>
- <if test="isShow != null" >
- is_show = #{isShow,jdbcType=INTEGER},
- </if>
- <if test="isLock != null" >
- is_lock = #{isLock,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xc.pojo.SitePay" >
- update site_pay
- set c_type = #{cType,jdbcType=INTEGER},
- form_url = #{formUrl,jdbcType=VARCHAR},
- form_code = #{formCode,jdbcType=VARCHAR},
- channel_type = #{channelType,jdbcType=VARCHAR},
- channel_name = #{channelName,jdbcType=VARCHAR},
- channel_desc = #{channelDesc,jdbcType=VARCHAR},
- channel_account = #{channelAccount,jdbcType=VARCHAR},
- channel_img = #{channelImg,jdbcType=VARCHAR},
- channel_min_limit = #{channelMinLimit,jdbcType=INTEGER},
- channel_max_limit = #{channelMaxLimit,jdbcType=INTEGER},
- is_show = #{isShow,jdbcType=INTEGER},
- is_lock = #{isLock,jdbcType=INTEGER}
- where id = #{id,jdbcType=INTEGER}
- </update>
- <select id="findByChannelType" parameterType="string" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM site_pay WHERE channel_type = #{channelType}
- </select>
- <select id="listByAdmin" parameterType="string" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM site_pay
- <where>
- <if test="channelType != null and channelType != '' ">
- channel_type = #{channelType}
- </if>
- </where>
- order by id desc
- </select>
- <select id="getPayInfo" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM site_pay WHERE is_show = 0
- </select>
- <select id="selectServerUrl" resultType="String">
- select url from t_k_server_url order by rand() limit 1
- </select>
- </mapper>
|