123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <?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.AskaCashrequestMapper">
- <resultMap id="BaseResultMap" type="com.mofangchuxing.aska.dao.domain.AskaCashrequest">
- <id property="id" column="id" jdbcType="INTEGER"/>
- <result property="partnerId" column="partnerId" jdbcType="INTEGER"/>
- <result property="partnerType" column="partnerType" jdbcType="CHAR"/>
- <result property="partnerName" column="partnerName" jdbcType="VARCHAR"/>
- <result property="requestAmount" column="requestAmount" jdbcType="INTEGER"/>
- <result property="requestTime" column="requestTime" jdbcType="TIMESTAMP"/>
- <result property="status" column="status" jdbcType="CHAR"/>
- <result property="amount" column="amount" jdbcType="INTEGER"/>
- <result property="payTime" column="payTime" jdbcType="TIMESTAMP"/>
- <result property="note" column="note" jdbcType="VARCHAR"/>
- <result property="userId" column="userId" jdbcType="INTEGER"/>
- <result property="userName" column="userName" jdbcType="VARCHAR"/>
- </resultMap>
- <sql id="Base_Column_List">
- id,partnerId,partnerType,
- partnerName,requestAmount,requestTime,
- status,amount,payTime,
- note,userId,userName
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from aska_cashrequest
- where id = #{id,jdbcType=INTEGER}
- </select>
- <select id="getCashHistory" resultType="com.mofangchuxing.aska.dao.domain.AskaCashrequest">
- select <include refid="Base_Column_List" />
- from aska_cashrequest
- where 1=1
- <if test="channelId != null and channelId != ''">
- and partnerType = 'channel' and partnerId = #{channelId}
- </if>
- <if test="retailId != null and retailId != ''">
- and partnerType = 'retail' and partnerId = #{retailId}
- </if>
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete from aska_cashrequest
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaCashrequest" useGeneratedKeys="true">
- insert into aska_cashrequest
- ( id,partnerId,partnerType
- ,partnerName,requestAmount,requestTime
- ,status,amount,payTime
- ,note,userId,userName
- )
- values (#{id,jdbcType=INTEGER},#{partnerId,jdbcType=INTEGER},#{partnerType,jdbcType=CHAR}
- ,#{partnerName,jdbcType=VARCHAR},#{requestAmount,jdbcType=INTEGER},#{requestTime,jdbcType=TIMESTAMP}
- ,#{status,jdbcType=CHAR},#{amount,jdbcType=INTEGER},#{payTime,jdbcType=TIMESTAMP}
- ,#{note,jdbcType=VARCHAR},#{userId,jdbcType=INTEGER},#{userName,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaCashrequest" useGeneratedKeys="true">
- insert into aska_cashrequest
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="partnerId != null">partnerId,</if>
- <if test="partnerType != null">partnerType,</if>
- <if test="partnerName != null">partnerName,</if>
- <if test="requestAmount != null">requestAmount,</if>
- <if test="requestTime != null">requestTime,</if>
- <if test="status != null">status,</if>
- <if test="amount != null">amount,</if>
- <if test="payTime != null">payTime,</if>
- <if test="note != null">note,</if>
- <if test="userId != null">userId,</if>
- <if test="userName != null">userName,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id,jdbcType=INTEGER},</if>
- <if test="partnerId != null">#{partnerId,jdbcType=INTEGER},</if>
- <if test="partnerType != null">#{partnerType,jdbcType=CHAR},</if>
- <if test="partnerName != null">#{partnerName,jdbcType=VARCHAR},</if>
- <if test="requestAmount != null">#{requestAmount,jdbcType=INTEGER},</if>
- <if test="requestTime != null">#{requestTime,jdbcType=TIMESTAMP},</if>
- <if test="status != null">#{status,jdbcType=CHAR},</if>
- <if test="amount != null">#{amount,jdbcType=INTEGER},</if>
- <if test="payTime != null">#{payTime,jdbcType=TIMESTAMP},</if>
- <if test="note != null">#{note,jdbcType=VARCHAR},</if>
- <if test="userId != null">#{userId,jdbcType=INTEGER},</if>
- <if test="userName != null">#{userName,jdbcType=VARCHAR},</if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.mofangchuxing.aska.dao.domain.AskaCashrequest">
- update aska_cashrequest
- <set>
- <if test="partnerId != null">
- partnerId = #{partnerId,jdbcType=INTEGER},
- </if>
- <if test="partnerType != null">
- partnerType = #{partnerType,jdbcType=CHAR},
- </if>
- <if test="partnerName != null">
- partnerName = #{partnerName,jdbcType=VARCHAR},
- </if>
- <if test="requestAmount != null">
- requestAmount = #{requestAmount,jdbcType=INTEGER},
- </if>
- <if test="requestTime != null">
- requestTime = #{requestTime,jdbcType=TIMESTAMP},
- </if>
- <if test="status != null">
- status = #{status,jdbcType=CHAR},
- </if>
- <if test="amount != null">
- amount = #{amount,jdbcType=INTEGER},
- </if>
- <if test="payTime != null">
- payTime = #{payTime,jdbcType=TIMESTAMP},
- </if>
- <if test="note != null">
- note = #{note,jdbcType=VARCHAR},
- </if>
- <if test="userId != null">
- userId = #{userId,jdbcType=INTEGER},
- </if>
- <if test="userName != null">
- userName = #{userName,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.mofangchuxing.aska.dao.domain.AskaCashrequest">
- update aska_cashrequest
- set
- partnerId = #{partnerId,jdbcType=INTEGER},
- partnerType = #{partnerType,jdbcType=CHAR},
- partnerName = #{partnerName,jdbcType=VARCHAR},
- requestAmount = #{requestAmount,jdbcType=INTEGER},
- requestTime = #{requestTime,jdbcType=TIMESTAMP},
- status = #{status,jdbcType=CHAR},
- amount = #{amount,jdbcType=INTEGER},
- payTime = #{payTime,jdbcType=TIMESTAMP},
- note = #{note,jdbcType=VARCHAR},
- userId = #{userId,jdbcType=INTEGER},
- userName = #{userName,jdbcType=VARCHAR}
- where id = #{id,jdbcType=INTEGER}
- </update>
- </mapper>
|