From b9fd6aed7a824b5d78300a78c50b10b5e41478eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A9=E9=B9=8F=E8=BE=89?= <18322780655@163.com> Date: Fri, 5 Jul 2024 16:37:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=80=97=E6=9D=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/cashierservice/entity/TbConsInfoFlow.java | 10 ++++++++++ .../system/cashierservice/service/ConsService.java | 1 + src/main/resources/mapper/TbConsInfoFlowMapper.xml | 5 +++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbConsInfoFlow.java b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbConsInfoFlow.java index 5755dc0..0e22495 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbConsInfoFlow.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/entity/TbConsInfoFlow.java @@ -11,6 +11,8 @@ public class TbConsInfoFlow implements Serializable { private Integer consId; + private Integer proSkuId; + private String conName; private BigDecimal amount; @@ -53,6 +55,14 @@ public class TbConsInfoFlow implements Serializable { this.consId = consId; } + public Integer getProSkuId() { + return proSkuId; + } + + public void setProSkuId(Integer proSkuId) { + this.proSkuId = proSkuId; + } + public String getConName() { return conName; } diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/ConsService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/ConsService.java index 66640a4..5d8ad12 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/ConsService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/ConsService.java @@ -70,6 +70,7 @@ public class ConsService { flow.setConsId(tbConsInfo.getId()); flow.setShopId(tbConsInfo.getShopId()); flow.setConName(tbConsInfo.getConName()); + flow.setProSkuId(proskuCon.getProductSkuId()); if("create".equals(type)){ amount=proskuCon.getSurplusStock().multiply(new BigDecimal(orderDetail.getNum())); diff --git a/src/main/resources/mapper/TbConsInfoFlowMapper.xml b/src/main/resources/mapper/TbConsInfoFlowMapper.xml index c4ef232..229c085 100644 --- a/src/main/resources/mapper/TbConsInfoFlowMapper.xml +++ b/src/main/resources/mapper/TbConsInfoFlowMapper.xml @@ -5,6 +5,7 @@ + @@ -29,11 +30,11 @@ where id = #{id,jdbcType=INTEGER} - insert into tb_cons_info_flow (id, shop_id, cons_id, + insert into tb_cons_info_flow (id, shop_id, cons_id, pro_sku_id, con_name, amount, balance, biz_code, biz_name, biz_type, create_time, update_time) - values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}, #{consId,jdbcType=INTEGER}, + values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}, #{consId,jdbcType=INTEGER}, #{proSkuId,jdbcType=INTEGER}, #{conName,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{balance,jdbcType=DECIMAL}, #{bizCode,jdbcType=VARCHAR}, #{bizName,jdbcType=VARCHAR}, #{bizType,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})