You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
4.6 KiB
101 lines
4.6 KiB
<?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.ruoyi.wxpayment.mapper.PayOrderMapper">
|
|
|
|
<resultMap type="PayOrder" id="PayOrderResult">
|
|
<result property="id" column="id" />
|
|
<result property="orderNo" column="order_no" />
|
|
<result property="body" column="body" />
|
|
<result property="type" column="type" />
|
|
<result property="money" column="money" />
|
|
<result property="status" column="status" />
|
|
<result property="payNo" column="pay_no" />
|
|
<result property="payTime" column="pay_time" />
|
|
<result property="addTime" column="add_time" />
|
|
</resultMap>
|
|
|
|
<sql id="selectPayOrderVo">
|
|
select id, order_no, body, type, money, status, pay_no, pay_time, add_time from athena_pay_order
|
|
</sql>
|
|
|
|
<select id="selectPayOrderList" parameterType="PayOrder" resultMap="PayOrderResult">
|
|
<include refid="selectPayOrderVo"/>
|
|
<where>
|
|
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
|
|
<if test="body != null and body != ''"> and body = #{body}</if>
|
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
|
<if test="money != null and money != ''"> and money = #{money}</if>
|
|
<if test="status != null "> and status = #{status}</if>
|
|
<if test="payNo != null and payNo != ''"> and pay_no = #{payNo}</if>
|
|
<if test="payTime != null and payTime != ''"> and pay_time = #{payTime}</if>
|
|
<if test="addTime != null "> and add_time = #{addTime}</if>
|
|
</where>
|
|
order by add_time desc
|
|
</select>
|
|
|
|
<select id="selectPayOrderById" parameterType="Integer" resultMap="PayOrderResult">
|
|
<include refid="selectPayOrderVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertPayOrder" parameterType="PayOrder" useGeneratedKeys="true" keyProperty="id">
|
|
insert into athena_pay_order
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="orderNo != null and orderNo != ''">order_no,</if>
|
|
<if test="body != null and body != ''">body,</if>
|
|
<if test="type != null and type != ''">type,</if>
|
|
<if test="money != null and money != ''">money,</if>
|
|
<if test="status != null">status,</if>
|
|
<if test="payNo != null">pay_no,</if>
|
|
<if test="payTime != null">pay_time,</if>
|
|
<if test="addTime != null">add_time,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="orderNo != null and orderNo != ''">#{orderNo},</if>
|
|
<if test="body != null and body != ''">#{body},</if>
|
|
<if test="type != null and type != ''">#{type},</if>
|
|
<if test="money != null and money != ''">#{money},</if>
|
|
<if test="status != null">#{status},</if>
|
|
<if test="payNo != null">#{payNo},</if>
|
|
<if test="payTime != null">#{payTime},</if>
|
|
<if test="addTime != null">#{addTime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updatePayOrder" parameterType="PayOrder">
|
|
update athena_pay_order
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="orderNo != null and orderNo != ''">order_no = #{orderNo},</if>
|
|
<if test="body != null and body != ''">body = #{body},</if>
|
|
<if test="type != null and type != ''">type = #{type},</if>
|
|
<if test="money != null and money != ''">money = #{money},</if>
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="payNo != null">pay_no = #{payNo},</if>
|
|
<if test="payTime != null">pay_time = #{payTime},</if>
|
|
<if test="addTime != null">add_time = #{addTime},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<update id="updatePayOrderWithOrderNo" parameterType="PayOrder">
|
|
update athena_pay_order
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="payTime != null">pay_time = #{payTime},</if>
|
|
</trim>
|
|
where order_no = #{orderNo}
|
|
</update>
|
|
|
|
<delete id="deletePayOrderById" parameterType="Integer">
|
|
delete from athena_pay_order where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deletePayOrderByIds" parameterType="String">
|
|
delete from athena_pay_order where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|