| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | } |