diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbQuickPayMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbQuickPayMapper.java new file mode 100644 index 0000000..8e05ed0 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbQuickPayMapper.java @@ -0,0 +1,26 @@ +package com.chaozhanggui.system.cashierservice.dao; + +import com.chaozhanggui.system.cashierservice.entity.TbQuickPay; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@Mapper +public interface TbQuickPayMapper { + int deleteByPrimaryKey(Integer id); + + int insert(TbQuickPay record); + + int insertSelective(TbQuickPay record); + + TbQuickPay selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(TbQuickPay record); + + int updateByPrimaryKey(TbQuickPay record); + + List selectByShopIdAndStaffId(@Param("shopId") Integer shopId,@Param("staffId") Integer staffId); +} \ No newline at end of file diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbQuickPay.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbQuickPay.java new file mode 100644 index 0000000..b831b95 --- /dev/null +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbQuickPay.java @@ -0,0 +1,123 @@ +package com.chaozhanggui.system.cashierservice.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +public class TbQuickPay implements Serializable { + private Integer id; + + private Integer staffId; + + private Integer shopId; + + private String orderNo; + + private String payType; + + private BigDecimal amount; + + private String status; + + private String tradeNo; + + private Date createTime; + + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getStaffId() { + return staffId; + } + + public void setStaffId(Integer staffId) { + this.staffId = staffId; + } + + public Integer getShopId() { + return shopId; + } + + public void setShopId(Integer shopId) { + this.shopId = shopId; + } + + public String getOrderNo() { + return orderNo; + } + + public void setOrderNo(String orderNo) { + this.orderNo = orderNo == null ? null : orderNo.trim(); + } + + public String getPayType() { + return payType; + } + + public void setPayType(String payType) { + this.payType = payType == null ? null : payType.trim(); + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status == null ? null : status.trim(); + } + + public String getTradeNo() { + return tradeNo; + } + + public void setTradeNo(String tradeNo) { + this.tradeNo = tradeNo == null ? null : tradeNo.trim(); + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + + public TbQuickPay(Integer id, Integer staffId, Integer shopId, String orderNo, String payType, BigDecimal amount, String status, String tradeNo, Date createTime, Date updateTime) { + this.id = id; + this.staffId = staffId; + this.shopId = shopId; + this.orderNo = orderNo; + this.payType = payType; + this.amount = amount; + this.status = status; + this.tradeNo = tradeNo; + this.createTime = createTime; + this.updateTime = updateTime; + } +} \ No newline at end of file diff --git a/src/main/resources/mapper/TbQuickPayMapper.xml b/src/main/resources/mapper/TbQuickPayMapper.xml new file mode 100644 index 0000000..737c001 --- /dev/null +++ b/src/main/resources/mapper/TbQuickPayMapper.xml @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + id, staff_id, shop_id, order_no, pay_type, amount, status, trade_no, create_time, + update_time + + + + delete from tb_quick_pay + where id = #{id,jdbcType=INTEGER} + + + 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 into tb_quick_pay + + + id, + + + staff_id, + + + shop_id, + + + order_no, + + + pay_type, + + + amount, + + + status, + + + trade_no, + + + create_time, + + + update_time, + + + + + #{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}, + + + + + update tb_quick_pay + + + 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 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} + + + + \ No newline at end of file