From a22c4bba1289b25cdfb8607a5615e3ccb3151b80 Mon Sep 17 00:00:00 2001 From: puhanshu <a9236326> Date: 星期三, 13 十月 2021 13:11:47 +0800 Subject: [PATCH] 爱心义仓修改 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWarehouseApplyServiceImpl.java | 6 +++++- 1 files changed, 5 insertions(+), 1 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 508d282..e3c4936 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 @@ -7,6 +7,7 @@ import com.panzhihua.common.model.dtos.property.CommonPage; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseApplyVO; +import com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseOperationVO; import com.panzhihua.service_community.dao.ComActWarehouseDonatesDao; import com.panzhihua.service_community.dao.ComActWarehouseOperationDao; import com.panzhihua.service_community.dao.ComPbServiceTeamDao; @@ -64,6 +65,7 @@ @Transactional(rollbackFor = Exception.class) @Override public R update(ComActWarehouseApply comActWarehouseApply) { + ComActWarehouseApplyVO comActWarehouseApply1=this.comActWarehouseApplyDao.selectById(comActWarehouseApply.getId()); if(comActWarehouseApply.getStatus().equals(ComActWarehouseApplyVO.status.ylq)){ ComActWarehouseDonates comActWarehouseDonates=this.comActWarehouseDonatesDao.selectById(comActWarehouseApply.getGoodsId()); if(comActWarehouseDonates!=null&&comActWarehouseDonates.getSurplusQuantity()>0){ @@ -72,7 +74,9 @@ ComActWarehouseOperation comActWarehouseOperation=new ComActWarehouseOperation(); comActWarehouseOperation.setGoodsId(comActWarehouseApply.getGoodsId()); comActWarehouseOperation.setCreateTime(new Date()); - comActWarehouseOperation.setContent("爱心传递给了"+comActWarehouseApply.getApplyName().charAt(0)+"**,"+"减少了"+comActWarehouseApply.getReason()+"的困难,谢谢你的帮助"); + comActWarehouseOperation.setContent("爱心传递给了"+comActWarehouseApply1.getApplyName().charAt(0)+"**,"+"减少了"+comActWarehouseApply1.getReason()+"的困难,谢谢你的帮助"); + comActWarehouseOperation.setType(ComActWarehouseOperation.type.xs); + comActWarehouseOperation.setApplyId(comActWarehouseApply.getId()); this.comActWarehouseOperationDao.insert(comActWarehouseOperation); } else { -- Gitblit v1.7.1