From 179c4d64313c9b7572778da4aaaf6c6584fe457d Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期二, 20 五月 2025 23:48:08 +0800
Subject: [PATCH] 修改文件上传类型限制

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWarehouseApplyServiceImpl.java |    8 ++++----
 1 files changed, 4 insertions(+), 4 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..420fa25 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
@@ -65,14 +65,14 @@
     @Transactional(rollbackFor = Exception.class)
     @Override
     public R update(ComActWarehouseApply comActWarehouseApply) {
-        ComActWarehouseApplyVO comActWarehouseApply1=this.comActWarehouseApplyDao.selectById(comActWarehouseApply.getId());
+        ComActWarehouseApply 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()>=comActWarehouseApply1.getGoodsNum()){
+                comActWarehouseDonates.setSurplusQuantity(comActWarehouseDonates.getSurplusQuantity()-comActWarehouseApply1.getGoodsNum());
                 this.comActWarehouseDonatesDao.updateById(comActWarehouseDonates);
                 ComActWarehouseOperation comActWarehouseOperation=new ComActWarehouseOperation();
-                comActWarehouseOperation.setGoodsId(comActWarehouseApply.getGoodsId());
+                comActWarehouseOperation.setGoodsId(comActWarehouseApply1.getGoodsId());
                 comActWarehouseOperation.setCreateTime(new Date());
                 comActWarehouseOperation.setType(ComActWarehouseOperation.type.xs);
                 comActWarehouseOperation.setApplyId(comActWarehouseApply.getId());

--
Gitblit v1.7.1