From 51ee3c4db2eb49062d3236bf44f95dc22f8f6ac9 Mon Sep 17 00:00:00 2001
From: puhanshu <a9236326>
Date: 星期五, 14 一月 2022 17:59:03 +0800
Subject: [PATCH] 商业街bug修改

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsInformationServiceImpl.java |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsInformationServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsInformationServiceImpl.java
index 3296fe4..5952e34 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsInformationServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsInformationServiceImpl.java
@@ -8,6 +8,7 @@
 
 import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsInfoDTO;
 import com.panzhihua.common.model.vos.community.microCommercialStreet.McsGameVO;
+import com.panzhihua.common.model.vos.community.microCommercialStreet.McsMerchantVO;
 import com.panzhihua.common.utlis.DateUtils;
 import com.panzhihua.service_community.util.NearbyUtil;
 import com.spatial4j.core.shape.Rectangle;
@@ -131,7 +132,7 @@
         TopStatisticsVO topStatisticsVO = new TopStatisticsVO();
         topStatisticsVO.setExpireAt(mcsMerchant.getExpireAt());
         if (nonNull(mcsMerchant.getExpireAt())) {
-            int surplusLitDays = DateUtils.differentDays(new Date(), mcsMerchant.getExpireAt());
+            int surplusLitDays = DateUtils.retrieveRemainingDays(mcsMerchant.getExpireAt());
             topStatisticsVO.setSurplusLitDays(surplusLitDays > 0 ? surplusLitDays : 0);
         }
 
@@ -249,6 +250,18 @@
         }
         McsInformationVO mcsInformationVO = new McsInformationVO();
         BeanUtils.copyProperties(mcsInformation, mcsInformationVO);
+        McsMerchant mcsMerchant = mcsMerchantDAO.selectById(mcsInformation.getMerchantId());
+        McsMerchantVO mcsMerchantVO = new McsMerchantVO();
+        if (nonNull(mcsMerchant)) {
+            mcsMerchantVO.setId(mcsMerchant.getId());
+            mcsMerchantVO.setName(mcsMerchant.getName());
+            mcsMerchantVO.setLogo(mcsMerchant.getLogo());
+            mcsMerchantVO.setIntroduction(mcsMerchant.getIntroduction());
+            mcsMerchantVO.setLat(mcsMerchant.getLat());
+            mcsMerchantVO.setLon(mcsMerchant.getLon());
+            mcsMerchantVO.setAddress(mcsMerchant.getAddress());
+        }
+        mcsInformationVO.setMerchantInfo(mcsMerchantVO);
         return R.ok(mcsInformationVO);
     }
 }

--
Gitblit v1.7.1