From c624a13eb32b90bb698f9fa9225c5a5ec07fa804 Mon Sep 17 00:00:00 2001 From: CeDo <cedoogle@gmail.com> Date: 星期二, 20 四月 2021 18:43:22 +0800 Subject: [PATCH] Default Changelist --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderServiceImpl.java | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderServiceImpl.java index 82ce97c..75f97a1 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderServiceImpl.java @@ -176,11 +176,12 @@ } }else{//查询到用户上一笔订单 ComShopUserAddressDO userAddressDO = comShopUserAddressDAO.selectById(shopOrders.get(0).getReceiverId()); - ComShopUserAddressVO userAddressVO = new ComShopUserAddressVO(); - BeanUtils.copyProperties(userAddressDO,userAddressVO); - orderPreviewVO.setUserAddressVO(userAddressVO); + if(userAddressDO != null){ + ComShopUserAddressVO userAddressVO = new ComShopUserAddressVO(); + BeanUtils.copyProperties(userAddressDO,userAddressVO); + orderPreviewVO.setUserAddressVO(userAddressVO); + } } - return R.ok(orderPreviewVO); } @@ -687,7 +688,7 @@ shopOrderDO.setStatus(ComShopOrderDO.status.dfh); shopOrderDO.setPayType(ComShopOrderDO.payType.wx); shopOrderDO.setPayStatus(ComShopOrderDO.payStatus.yes); - shopOrderDO.setPayAmount(BigDecimal.valueOf(Integer.parseInt(wxPayNotifyOrderDTO.getCashFee()) * 100)); + shopOrderDO.setPayAmount(BigDecimal.valueOf(Integer.parseInt(wxPayNotifyOrderDTO.getCashFee()) / 100)); shopOrderDO.setWxTardeNo(wxPayNotifyOrderDTO.getWxTradeNo()); shopOrderDO.setPayTime(new Date(Long.parseLong(wxPayNotifyOrderDTO.getPayTime()))); this.baseMapper.updateById(shopOrderDO); -- Gitblit v1.7.1