From 2c965b93c858b9c1bdaa48fd18c8d5aae33891ff Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期五, 15 十月 2021 18:18:02 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/test' into test

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActWarehouseApplyMapper.xml                                        |    2 +-
 springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActWarehouseApplyApi.java              |   11 +++++++++++
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWarehouseApplyServiceImpl.java |    4 ++--
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActWarehouseApplyApi.java b/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActWarehouseApplyApi.java
index 004a96c..4e7907d 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActWarehouseApplyApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActWarehouseApplyApi.java
@@ -126,6 +126,17 @@
     @ApiOperation("修改数据")
     @PostMapping("/update")
     public R update(@RequestBody ComActWarehouseApplyVO comActWarehouseApply) {
+        if(comActWarehouseApply.getStatus().equals(ComActWarehouseApplyVO.status.yqx)){
+            comActWarehouseApply.setCancelTime(new Date());
+        }
+        if(comActWarehouseApply.getStatus().equals(ComActWarehouseApplyVO.status.dlq)||comActWarehouseApply.getStatus().equals(ComActWarehouseApplyVO.status.ybh)){
+            comActWarehouseApply.setSolveTime(new Date());
+            comActWarehouseApply.setSolveUserId(this.getUserId());
+        }
+        if(comActWarehouseApply.getStatus().equals(ComActWarehouseApplyVO.status.ylq)){
+            comActWarehouseApply.setActualTime(new Date());
+            comActWarehouseApply.setWriteOffUserId(this.getUserId());
+        }
         return this.communityService.comActWarehouseApplyUpdate(comActWarehouseApply);
     }
 
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 ac8e76f..9647d1e 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()>=comActWarehouseApply.getGoodsNum()){
-                comActWarehouseDonates.setSurplusQuantity(comActWarehouseDonates.getSurplusQuantity()-comActWarehouseApply.getGoodsNum());
+            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());
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActWarehouseApplyMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActWarehouseApplyMapper.xml
index 274379d..f2b4446 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActWarehouseApplyMapper.xml
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActWarehouseApplyMapper.xml
@@ -39,7 +39,7 @@
                 and  t.goods_id = #{commonPage.paramId2}
             </if>
             <if test="commonPage.keyword !=null and commonPage.keyword !=''">
-                and (t.id like concat('%',#{commonPage.keyword},'%') or t1.item like concat('%',#{commonPage.keyword},'%') or t.apply_phone  like concat('%',#{commonPage.keyword},'%') or t.apply_name like concat('%',#{commonPage.keyword},'%'))
+                and (t.id like concat('%',#{commonPage.keyword},'%') or t1.item like concat('%',#{commonPage.keyword},'%') or t.apply_phone  like concat('%',#{commonPage.keyword},'%') or t.apply_name like concat('%',#{commonPage.keyword},'%') or t.id like concat('%',#{commonPage.keyword},'%'))
             </if>
             <if test="commonPage.userId !=null">
                 and t.apply_user_id = #{commonPage.userId}

--
Gitblit v1.7.1