支付
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,209 @@
|
||||
<?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.zhwl.prepaidCard.mapper.PrepaidCardLogMapper">
|
||||
|
||||
<resultMap type="PrepaidCardLog" id="PrepaidCardLogResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="cardId" column="card_id"/>
|
||||
<result property="accountNo" column="account_no"/>
|
||||
<result property="accountType" column="account_type"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="balance" column="balance"/>
|
||||
<result property="orderNo" column="order_no"/>
|
||||
<result property="tradeType" column="trade_type"/>
|
||||
<result property="amount" column="amount"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="title" column="title"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="transactionId" column="transaction_id"/>
|
||||
<result property="payNo" column="pay_no"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPrepaidCardLogVo">
|
||||
select id, card_id,account_no, account_type, name, balance, order_no, trade_type, amount, create_time,title,create_by,status,transaction_id,pay_no
|
||||
from zdy_prepaid_card_log
|
||||
</sql>
|
||||
|
||||
<select id="selectPrepaidCardLogList" parameterType="PrepaidCardLog" resultMap="PrepaidCardLogResult">
|
||||
<include refid="selectPrepaidCardLogVo"/>
|
||||
<where>
|
||||
<if test="accountNo != null and accountNo != ''">
|
||||
and account_no = #{accountNo}
|
||||
</if>
|
||||
<if test="cardId != null and cardId != ''">
|
||||
and card_id = #{cardId}
|
||||
</if>
|
||||
<if test="accountType != null and accountType != ''">
|
||||
and account_type = #{accountType}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="orderNo != null and orderNo != ''">
|
||||
and order_no = #{orderNo}
|
||||
</if>
|
||||
<if test="tradeType != null and tradeType != ''">
|
||||
and trade_type = #{tradeType}
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
and create_by = #{createBy}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectPrepaidCardLogById" parameterType="Long"
|
||||
resultMap="PrepaidCardLogResult">
|
||||
<include refid="selectPrepaidCardLogVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertPrepaidCardLog" parameterType="PrepaidCardLog" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_prepaid_card_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cardId !=null">
|
||||
card_id,
|
||||
</if>
|
||||
<if test="accountNo != null and accountNo != ''">account_no,
|
||||
</if>
|
||||
<if test="accountType != null and accountType != ''">account_type,
|
||||
</if>
|
||||
<if test="name != null">name,
|
||||
</if>
|
||||
<if test="balance != null">balance,
|
||||
</if>
|
||||
<if test="orderNo != null">order_no,
|
||||
</if>
|
||||
<if test="tradeType != null and tradeType != ''">trade_type,
|
||||
</if>
|
||||
<if test="amount != null">amount,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="title != null">title,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="status != null">status,
|
||||
</if>
|
||||
<if test="payNo != null">pay_no,
|
||||
</if>
|
||||
<if test="refundCode != null">refund_code,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cardId !=null">
|
||||
#{cardId},
|
||||
</if>
|
||||
<if test="accountNo != null and accountNo != ''">#{accountNo},
|
||||
</if>
|
||||
<if test="accountType != null and accountType != ''">#{accountType},
|
||||
</if>
|
||||
<if test="name != null">#{name},
|
||||
</if>
|
||||
<if test="balance != null">#{balance},
|
||||
</if>
|
||||
<if test="orderNo != null">#{orderNo},
|
||||
</if>
|
||||
<if test="tradeType != null and tradeType != ''">#{tradeType},
|
||||
</if>
|
||||
<if test="amount != null">#{amount},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="title != null">#{title},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="status != null">#{status},
|
||||
</if>
|
||||
<if test="payNo != null">#{payNo},
|
||||
</if>
|
||||
<if test="refundCode != null">#{refundCode},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePrepaidCardLog" parameterType="PrepaidCardLog">
|
||||
update zdy_prepaid_card_log
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cardId !=null">
|
||||
card_id = #{cardId},
|
||||
</if>
|
||||
<if test="accountNo != null and accountNo != ''">account_no =
|
||||
#{accountNo},
|
||||
</if>
|
||||
<if test="accountType != null and accountType != ''">account_type =
|
||||
#{accountType},
|
||||
</if>
|
||||
<if test="name != null">name =
|
||||
#{name},
|
||||
</if>
|
||||
<if test="balance != null">balance =
|
||||
#{balance},
|
||||
</if>
|
||||
<if test="orderNo != null">order_no =
|
||||
#{orderNo},
|
||||
</if>
|
||||
<if test="tradeType != null and tradeType != ''">trade_type =
|
||||
#{tradeType},
|
||||
</if>
|
||||
<if test="amount != null">amount =
|
||||
#{amount},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="title != null">title =
|
||||
#{title},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="status != null">status =
|
||||
#{status},
|
||||
</if>
|
||||
<if test="transactionId != null">transaction_id =
|
||||
#{transactionId},
|
||||
</if>
|
||||
<if test="payNo != null">pay_no =
|
||||
#{payNo},
|
||||
</if>
|
||||
<if test="refundCode != null">refund_code =
|
||||
#{refundCode},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deletePrepaidCardLogById" parameterType="Long">
|
||||
delete from zdy_prepaid_card_log where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePrepaidCardLogByIds" parameterType="String">
|
||||
delete from zdy_prepaid_card_log where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectPrepaidCardLogByPayNo" parameterType="String" resultMap="PrepaidCardLogResult">
|
||||
<include refid="selectPrepaidCardLogVo"/>
|
||||
where pay_no = #{payNo}
|
||||
</select>
|
||||
|
||||
<select id="selectFinishedLogByOrderNo" parameterType="PrepaidCardLog" resultMap="PrepaidCardLogResult">
|
||||
<include refid="selectPrepaidCardLogVo"/>
|
||||
where order_no = #{orderNo} and `status` = #{status} and trade_type=#{tradeType}
|
||||
</select>
|
||||
</mapper>
|
@@ -0,0 +1,163 @@
|
||||
<?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.zhwl.prepaidCard.mapper.PrepaidCardMapper">
|
||||
|
||||
<resultMap type="PrepaidCard" id="PrepaidCardResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="accountNo" column="account_no"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="balance" column="balance"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPrepaidCardVo">
|
||||
select id, account_no, type, name, phone, balance, status, create_time, create_by,update_by, update_time
|
||||
from zdy_prepaid_card
|
||||
</sql>
|
||||
|
||||
<select id="selectPrepaidCardList" parameterType="PrepaidCard" resultMap="PrepaidCardResult">
|
||||
<include refid="selectPrepaidCardVo"/>
|
||||
<where>
|
||||
<if test="accountNo != null and accountNo != ''">
|
||||
and account_no like concat('%', #{accountNo}, '%')
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
and type = #{type}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">
|
||||
and phone = #{phone}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="selectPrepaidCardById" parameterType="Long"
|
||||
resultMap="PrepaidCardResult">
|
||||
<include refid="selectPrepaidCardVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectPrepaidCardByAccountNo" parameterType="String"
|
||||
resultMap="PrepaidCardResult">
|
||||
<include refid="selectPrepaidCardVo"/>
|
||||
where account_no = #{accountNo} and (status = '1' or status='2') limit 1
|
||||
</select>
|
||||
<select id="selectPrepaidCardByCreateBy" parameterType="String"
|
||||
resultMap="PrepaidCardResult">
|
||||
<include refid="selectPrepaidCardVo"/>
|
||||
where create_by = #{createBy} and `type` = #{type} and `status` = '1'
|
||||
</select>
|
||||
<select id="selectPrepaidCardByPhone" parameterType="String"
|
||||
resultMap="PrepaidCardResult">
|
||||
<include refid="selectPrepaidCardVo"/>
|
||||
where phone = #{phone} and (status = '1' or status='2') limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertPrepaidCard" parameterType="PrepaidCard" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_prepaid_card
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="accountNo != null and accountNo != ''">account_no,
|
||||
</if>
|
||||
<if test="type != null">type,
|
||||
</if>
|
||||
<if test="name != null and name != ''">name,
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">phone,
|
||||
</if>
|
||||
<if test="balance != null">balance,
|
||||
</if>
|
||||
<if test="status != null">status,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="accountNo != null and accountNo != ''">#{accountNo},
|
||||
</if>
|
||||
<if test="type != null">#{type},
|
||||
</if>
|
||||
<if test="name != null and name != ''">#{name},
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">#{phone},
|
||||
</if>
|
||||
<if test="balance != null">#{balance},
|
||||
</if>
|
||||
<if test="status != null">#{status},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePrepaidCard" parameterType="PrepaidCard">
|
||||
update zdy_prepaid_card
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="accountNo != null and accountNo != ''">account_no =
|
||||
#{accountNo},
|
||||
</if>
|
||||
<if test="type != null">type =
|
||||
#{type},
|
||||
</if>
|
||||
<if test="name != null and name != ''">name =
|
||||
#{name},
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">phone =
|
||||
#{phone},
|
||||
</if>
|
||||
<if test="balance != null">balance =
|
||||
#{balance},
|
||||
</if>
|
||||
<if test="status != null">status =
|
||||
#{status},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updatePrepaidCardBalance">
|
||||
update zdy_prepaid_card set balance = balance + #{amount} where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deletePrepaidCardById" parameterType="Long">
|
||||
delete from zdy_prepaid_card where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePrepaidCardByIds" parameterType="String">
|
||||
delete from zdy_prepaid_card where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user