Commit 25efecb8 authored by 罗林杰's avatar 罗林杰

修改退款

parent d81590bb
......@@ -282,9 +282,13 @@ public class StoreGoodsApplyServiceImpl extends ServiceImpl<StoreGoodsApplyRepos
}
//修改子表状态
storeGoodsLogServiceImpl.updateStatus(storeGoodsApply);
}
if("3".equals(storeGoodsApply.getIsReturn())){
} else if("3".equals(storeGoodsApply.getIsReturn())){
storeGoodsApply.setIsReturn("2");
} else if ("1".equals(storeGoodsApply.getIsReturn())){
StoreGoodsApply oldStoreGoodsApply = baseMapper.selectById(storeGoodsApply.getBusinessId());
storeGoodsApply.setTotalOutPrice(
oldStoreGoodsApply.getTotalOutPrice().subtract(storeGoodsApply.getTotalOutPrice())
);
}
int line = baseMapper.updateById(storeGoodsApply);
......
......@@ -120,6 +120,7 @@ public class StoreGoodsLogServiceImpl extends ServiceImpl<StoreGoodsLogRepositor
StoreGoodsApply storeGoodsApply = new StoreGoodsApply();
storeGoodsApply.setBusinessId(oldStoreGoodsLog.getApplyId());
storeGoodsApply.setIsReturn(storeGoodsLog.getIsReturn());
storeGoodsApply.setTotalOutPrice(storeGoodsLog.getTotalPrice());
storeGoodsApplyServiceImpl.merge(storeGoodsApply);
oldStoreGoodsLog.setIsReturn("1");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment