From 161e27e08b1495c04cd3f35906c1d7dd873f1d60 Mon Sep 17 00:00:00 2001
From: puhanshu <a9236326>
Date: 星期一, 17 一月 2022 11:38:20 +0800
Subject: [PATCH] 商业街bug修改
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsMerchantServiceImpl.java | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsMerchantServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsMerchantServiceImpl.java
index 3d20c0a..5e03a74 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsMerchantServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsMerchantServiceImpl.java
@@ -6,6 +6,7 @@
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
import java.util.Arrays;
+import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Random;
@@ -60,6 +61,7 @@
private static final String MERCHANT_PUBLISH_LIMIT_KEY = "MERCHANT_PUBLISH_LIMIT";
private static final String DEFAULT_IMAGE_URL = "https://www.psciio.com//idcard/91313573d071436ab1f934231b31c6e5.jpg";
private static final int DEFAULT_PUBLISH_LIMIT = 2;
+ private static final String CUSTOMER_SERVICE_CONTACT_NUM="CUSTOMER_SERVICE_CONTACT_NUM";
@Resource
private UserService userService;
@@ -230,6 +232,11 @@
return R.fail("账号不存在");
}
retrieveMerchantSurplusLitDays(merchantVO);
+ McsConfig mcsConfig=mcsConfigDAO.selectOne(new QueryWrapper<McsConfig>().lambda().eq(McsConfig::getKey,CUSTOMER_SERVICE_CONTACT_NUM));
+ if(mcsConfig!=null){
+ merchantVO.setCustomPhone(mcsConfig.getValue());
+ }
+
return R.ok(merchantVO);
}
@@ -441,7 +448,7 @@
Integer idleTotal = publishLimit - publishCount;
merchantVO.setIdleTotal(idleTotal > 0 ? idleTotal : 0);
if (nonNull(merchantVO.getExpireAt())) {
- int surplusLitDays = DateUtils.differentDays(new Date(), merchantVO.getExpireAt());
+ int surplusLitDays = DateUtils.retrieveRemainingDays(merchantVO.getExpireAt());
merchantVO.setSurplusLitDays(surplusLitDays > 0 ? surplusLitDays : 0);
}
}
--
Gitblit v1.7.1