123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- <?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.mofangchuxing.aska.dao.mapper.AskaChannelsMapper">
- <resultMap id="BaseResultMap" type="com.mofangchuxing.aska.dao.domain.AskaChannels">
- <id property="id" column="id" jdbcType="INTEGER"/>
- <result property="name" column="name" jdbcType="CHAR"/>
- <result property="prefix" column="prefix" jdbcType="CHAR"/>
- <result property="ownerId" column="ownerId" jdbcType="INTEGER"/>
- <result property="phone" column="phone" jdbcType="CHAR"/>
- <result property="note" column="note" jdbcType="VARCHAR"/>
- <result property="account" column="account" jdbcType="VARCHAR"/>
- <result property="accountName" column="accountName" jdbcType="VARCHAR"/>
- <result property="accountType" column="accountType" jdbcType="CHAR"/>
- <result property="relation" column="relation" jdbcType="CHAR"/>
- <result property="apiv3" column="apiv3" jdbcType="VARCHAR"/>
- <result property="certPath" column="certPath" jdbcType="VARCHAR"/>
- <result property="tripartite" column="tripartite" jdbcType="CHAR"/>
- <result property="tripvalue" column="tripvalue" jdbcType="INTEGER"/>
- <result property="realtimeSplit" column="realtimeSplit" jdbcType="INTEGER"/>
- <result property="cashSplit" column="cashSplit" jdbcType="INTEGER"/>
- <result property="status" column="status" jdbcType="CHAR"/>
- <result property="accountingIncome" column="accountingIncome" jdbcType="INTEGER"/>
- <result property="splitIncome" column="splitIncome" jdbcType="INTEGER"/>
- <result property="accountingRefund" column="accountingRefund" jdbcType="INTEGER"/>
- <result property="splitRefund" column="splitRefund" jdbcType="INTEGER"/>
- <result property="cashOut" column="cashOut" jdbcType="INTEGER"/>
- <result property="balance" column="balance" jdbcType="INTEGER"/>
- </resultMap>
- <sql id="Base_Column_List">
- id,name,prefix,
- ownerId,phone,note,
- account,accountName,accountType,
- relation,apiv3,certPath,
- tripartite,tripvalue,realtimeSplit,cashSplit
- status,accountingIncome,splitIncome,
- accountingRefund,splitRefund,cashOut,balance
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from aska_channels
- where id = #{id,jdbcType=INTEGER}
- </select>
- <select id="getAllChannels" resultType="com.mofangchuxing.aska.domain.vo.AskaChannelsVo">
- select ac.*,aa.name as username
- from aska_channels ac left join aska_accounts aa on ac.ownerId = aa.id
- where 1=1
- <if test="channelName != null and channelName != ''">
- and ac.name = #{channelName,jdbcType=VARCHAR}
- </if>
- </select>
- <select id="selectByOwnerId" resultType="com.mofangchuxing.aska.domain.vo.AskaChannelsVo">
- select id as channelId,name as channelName from aska_channels where ownerId = #{ownerId} limit 1
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete from aska_channels
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannels" useGeneratedKeys="true">
- insert into aska_channels
- ( id,name,prefix
- ,ownerId,phone,note
- ,account,accountName,accountType
- ,relation,apiv3,certPath
- ,tripartite,tripvalue,realtimeSplit
- ,status,accountingIncome,splitIncome
- ,accountingRefund,splitRefund,cashOut,balance
- )
- values (#{id,jdbcType=INTEGER},#{name,jdbcType=CHAR},#{prefix,jdbcType=CHAR}
- ,#{ownerId,jdbcType=INTEGER},#{phone,jdbcType=CHAR},#{note,jdbcType=VARCHAR}
- ,#{account,jdbcType=VARCHAR},#{accountName,jdbcType=VARCHAR},#{accountType,jdbcType=CHAR}
- ,#{relation,jdbcType=CHAR},#{apiv3,jdbcType=VARCHAR},#{certPath,jdbcType=VARCHAR}
- ,#{tripartite,jdbcType=CHAR},#{tripvalue,jdbcType=INTEGER},#{realtimeSplit,jdbcType=INTEGER}
- ,#{status,jdbcType=CHAR},#{accountingIncome,jdbcType=INTEGER},#{splitIncome,jdbcType=INTEGER}
- ,#{accountingRefund,jdbcType=INTEGER},#{splitRefund,jdbcType=INTEGER},#{cashOut,jdbcType=INTEGER},#{balance,jdbcType=INTEGER}
- )
- </insert>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannels" useGeneratedKeys="true">
- insert into aska_channels
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="name != null">name,</if>
- <if test="prefix != null">prefix,</if>
- <if test="ownerId != null">ownerId,</if>
- <if test="phone != null">phone,</if>
- <if test="note != null">note,</if>
- <if test="account != null">account,</if>
- <if test="accountName != null">accountName,</if>
- <if test="accountType != null">accountType,</if>
- <if test="relation != null">relation,</if>
- <if test="apiv3 != null">apiv3,</if>
- <if test="certPath != null">certPath,</if>
- <if test="tripartite != null">tripartite,</if>
- <if test="tripvalue != null">tripvalue,</if>
- <if test="realtimeSplit != null">realtimeSplit,</if>
- <if test="status != null">status,</if>
- <if test="balance != null">balance,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id,jdbcType=INTEGER},</if>
- <if test="name != null">#{name,jdbcType=CHAR},</if>
- <if test="prefix != null">#{prefix,jdbcType=CHAR},</if>
- <if test="ownerId != null">#{ownerId,jdbcType=INTEGER},</if>
- <if test="phone != null">#{phone,jdbcType=CHAR},</if>
- <if test="note != null">#{note,jdbcType=VARCHAR},</if>
- <if test="account != null">#{account,jdbcType=VARCHAR},</if>
- <if test="accountName != null">#{accountName,jdbcType=VARCHAR},</if>
- <if test="accountType != null">#{accountType,jdbcType=CHAR},</if>
- <if test="relation != null">#{relation,jdbcType=CHAR},</if>
- <if test="apiv3 != null">#{apiv3,jdbcType=VARCHAR},</if>
- <if test="certPath != null">#{certPath,jdbcType=VARCHAR},</if>
- <if test="tripartite != null">#{tripartite,jdbcType=CHAR},</if>
- <if test="tripvalue != null">#{tripvalue,jdbcType=INTEGER},</if>
- <if test="realtimeSplit != null">#{realtimeSplit,jdbcType=INTEGER},</if>
- <if test="status != null">#{status,jdbcType=CHAR},</if>
- <if test="balance != null">#{balance,jdbcType=INTEGER},</if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannels">
- update aska_channels
- <set>
- <if test="name != null">
- name = #{name,jdbcType=CHAR},
- </if>
- <if test="prefix != null">
- prefix = #{prefix,jdbcType=CHAR},
- </if>
- <if test="ownerId != null">
- ownerId = #{ownerId,jdbcType=INTEGER},
- </if>
- <if test="phone != null">
- phone = #{phone,jdbcType=CHAR},
- </if>
- <if test="note != null">
- note = #{note,jdbcType=VARCHAR},
- </if>
- <if test="account != null">
- account = #{account,jdbcType=VARCHAR},
- </if>
- <if test="accountName != null">
- accountName = #{accountName,jdbcType=VARCHAR},
- </if>
- <if test="accountType != null">
- accountType = #{accountType,jdbcType=CHAR},
- </if>
- <if test="relation != null">
- relation = #{relation,jdbcType=CHAR},
- </if>
- <if test="apiv3 != null">
- apiv3 = #{apiv3,jdbcType=VARCHAR},
- </if>
- <if test="certPath != null">
- certPath = #{certPath,jdbcType=VARCHAR},
- </if>
- <if test="tripartite != null">
- tripartite = #{tripartite,jdbcType=CHAR},
- </if>
- <if test="tripvalue != null">
- tripvalue = #{tripvalue,jdbcType=INTEGER},
- </if>
- <if test="realtimeSplit != null">
- realtimeSplit = #{realtimeSplit,jdbcType=INTEGER},
- </if>
- <if test="status != null">
- status = #{status,jdbcType=CHAR},
- </if>
- <if test="accountingIncome != null">
- accountingIncome = #{accountingIncome,jdbcType=INTEGER},
- </if>
- <if test="splitIncome != null">
- splitIncome = #{splitIncome,jdbcType=INTEGER},
- </if>
- <if test="accountingRefund != null">
- accountingRefund = #{accountingRefund,jdbcType=INTEGER},
- </if>
- <if test="splitRefund != null">
- splitRefund = #{splitRefund,jdbcType=INTEGER},
- </if>
- <if test="cashOut != null">
- cashOut = #{cashOut,jdbcType=INTEGER},
- </if>
- <if test="balance != null">
- balance = #{balance,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.mofangchuxing.aska.dao.domain.AskaChannels">
- update aska_channels
- set
- name = #{name,jdbcType=CHAR},
- prefix = #{prefix,jdbcType=CHAR},
- ownerId = #{ownerId,jdbcType=INTEGER},
- phone = #{phone,jdbcType=CHAR},
- note = #{note,jdbcType=VARCHAR},
- account = #{account,jdbcType=VARCHAR},
- accountName = #{accountName,jdbcType=VARCHAR},
- accountType = #{accountType,jdbcType=CHAR},
- relation = #{relation,jdbcType=CHAR},
- apiv3 = #{apiv3,jdbcType=VARCHAR},
- certPath = #{certPath,jdbcType=VARCHAR},
- tripartite = #{tripartite,jdbcType=CHAR},
- tripvalue = #{tripvalue,jdbcType=INTEGER},
- realtimeSplit = #{realtimeSplit,jdbcType=INTEGER},
- status = #{status,jdbcType=CHAR},
- accountingIncome = #{accountingIncome,jdbcType=INTEGER},
- splitIncome = #{splitIncome,jdbcType=INTEGER},
- accountingRefund = #{accountingRefund,jdbcType=INTEGER},
- splitRefund = #{splitRefund,jdbcType=INTEGER},
- cashOut = #{cashOut,jdbcType=INTEGER},
- balance = #{balance,jdbcType=INTEGER}
- where id = #{id,jdbcType=INTEGER}
- </update>
- </mapper>
|