From 40c80b19b49006c659217a746667e329130563b7 Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期五, 15 十月 2021 15:40:17 +0800 Subject: [PATCH] 爱心义仓修改 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWarehouseApplyServiceImpl.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWarehouseApplyServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWarehouseApplyServiceImpl.java index 898bab6..ac8e76f 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWarehouseApplyServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWarehouseApplyServiceImpl.java @@ -68,8 +68,8 @@ ComActWarehouseApplyVO comActWarehouseApply1=this.comActWarehouseApplyDao.selectById(comActWarehouseApply.getId()); if(comActWarehouseApply.getStatus().equals(ComActWarehouseApplyVO.status.ylq)){ ComActWarehouseDonates comActWarehouseDonates=this.comActWarehouseDonatesDao.selectById(comActWarehouseApply1.getGoodsId()); - if(comActWarehouseDonates!=null&&comActWarehouseDonates.getSurplusQuantity()>0){ - comActWarehouseDonates.setSurplusQuantity(comActWarehouseDonates.getSurplusQuantity()-1); + if(comActWarehouseDonates!=null&&comActWarehouseDonates.getSurplusQuantity()>=comActWarehouseApply.getGoodsNum()){ + comActWarehouseDonates.setSurplusQuantity(comActWarehouseDonates.getSurplusQuantity()-comActWarehouseApply.getGoodsNum()); this.comActWarehouseDonatesDao.updateById(comActWarehouseDonates); ComActWarehouseOperation comActWarehouseOperation=new ComActWarehouseOperation(); comActWarehouseOperation.setGoodsId(comActWarehouseApply.getGoodsId()); -- Gitblit v1.7.1