From 6ac0849d13ec2f178b2daa6cd3e63bbe9fdde596 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期二, 20 四月 2021 21:22:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderServiceImpl.java |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 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..9d08cae 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);
     }
 
@@ -618,6 +619,12 @@
     @Override
     public R getFundsStat(Long userId) {
         ComShopFundsVO comShopFundsVO = comShopOrderDAO.queryStatis(userId);
+        if(comShopFundsVO==null){
+            comShopFundsVO = new ComShopFundsVO();
+            comShopFundsVO.setMonthTotal(new BigDecimal(0));
+            comShopFundsVO.setTodayTotal(new BigDecimal(0));
+            comShopFundsVO.setWeekTotal(new BigDecimal(0));
+        }
         return R.ok(comShopFundsVO);
     }
 
@@ -687,9 +694,9 @@
         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())));
+        shopOrderDO.setPayTime(new Date(Long.parseLong(wxPayNotifyOrderDTO.getPayTime() + "000")));
         this.baseMapper.updateById(shopOrderDO);
 
         //查询订单商品
@@ -721,7 +728,6 @@
                 comShopStoreDAO.updateById(storeDO);
             }
         }
-
 
         //添加订单操作记录
         ComShopOrderOperateDO orderOperateDO = new ComShopOrderOperateDO();

--
Gitblit v1.7.1