添加新版收银系统支付
This commit is contained in:
157
src/main/resources/mapper/TbQuickPayMapper.xml
Normal file
157
src/main/resources/mapper/TbQuickPayMapper.xml
Normal file
@@ -0,0 +1,157 @@
|
||||
<?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.chaozhanggui.system.cashierservice.dao.TbQuickPayMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbQuickPay">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="staff_id" jdbcType="INTEGER" property="staffId" />
|
||||
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
|
||||
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
||||
<result column="pay_type" jdbcType="VARCHAR" property="payType" />
|
||||
<result column="amount" jdbcType="DECIMAL" property="amount" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="trade_no" jdbcType="VARCHAR" property="tradeNo" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, staff_id, shop_id, order_no, pay_type, amount, status, trade_no, create_time,
|
||||
update_time
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_quick_pay
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_quick_pay
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbQuickPay" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into tb_quick_pay (id, staff_id, shop_id,
|
||||
order_no, pay_type, amount,
|
||||
status, trade_no, create_time,
|
||||
update_time)
|
||||
values (#{id,jdbcType=INTEGER}, #{staffId,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER},
|
||||
#{orderNo,jdbcType=VARCHAR}, #{payType,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL},
|
||||
#{status,jdbcType=VARCHAR}, #{tradeNo,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{updateTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbQuickPay">
|
||||
insert into tb_quick_pay
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="staffId != null">
|
||||
staff_id,
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id,
|
||||
</if>
|
||||
<if test="orderNo != null">
|
||||
order_no,
|
||||
</if>
|
||||
<if test="payType != null">
|
||||
pay_type,
|
||||
</if>
|
||||
<if test="amount != null">
|
||||
amount,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="tradeNo != null">
|
||||
trade_no,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="staffId != null">
|
||||
#{staffId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
#{shopId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="orderNo != null">
|
||||
#{orderNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="payType != null">
|
||||
#{payType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="amount != null">
|
||||
#{amount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tradeNo != null">
|
||||
#{tradeNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbQuickPay">
|
||||
update tb_quick_pay
|
||||
<set>
|
||||
<if test="staffId != null">
|
||||
staff_id = #{staffId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="orderNo != null">
|
||||
order_no = #{orderNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="payType != null">
|
||||
pay_type = #{payType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="amount != null">
|
||||
amount = #{amount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tradeNo != null">
|
||||
trade_no = #{tradeNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbQuickPay">
|
||||
update tb_quick_pay
|
||||
set staff_id = #{staffId,jdbcType=INTEGER},
|
||||
shop_id = #{shopId,jdbcType=INTEGER},
|
||||
order_no = #{orderNo,jdbcType=VARCHAR},
|
||||
pay_type = #{payType,jdbcType=VARCHAR},
|
||||
amount = #{amount,jdbcType=DECIMAL},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
trade_no = #{tradeNo,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<select id="selectByShopIdAndStaffId" resultMap="BaseResultMap">
|
||||
select * from tb_quick_pay where shop_id=#{shopId} and staff_id=#{staffId} and `status`='0' order by id desc
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user