Browse Source

fixed 微信会员卡背景图

fushengqian 1 year ago
parent
commit
40e17c728b

+ 5 - 2
fuint-application/src/main/java/com/fuint/common/service/impl/WeixinServiceImpl.java

@@ -713,13 +713,16 @@ public class WeixinServiceImpl implements WeixinService {
                 card.put("card_type", "MEMBER_CARD");
                 card.put("card_type", "MEMBER_CARD");
             }
             }
             Map<String, Object> memberCard = new HashMap<>();
             Map<String, Object> memberCard = new HashMap<>();
+            String baseImage = settingService.getUploadBasePath();
             if (StringUtil.isNotEmpty(wxCardDto.getBackgroundUrl())) {
             if (StringUtil.isNotEmpty(wxCardDto.getBackgroundUrl())) {
-                memberCard.put("background_pic_url", wxCardDto.getBackgroundUrl());
+                memberCard.put("background_pic_url", baseImage + wxCardDto.getBackgroundUrl());
             }
             }
 
 
             // baseInfo
             // baseInfo
             Map<String, Object> baseInfo = new HashMap<>();
             Map<String, Object> baseInfo = new HashMap<>();
-            baseInfo.put("logo_url", "https://fuint-cn.oss-cn-shenzhen.aliyuncs.com/images/logo.png");
+            if (StringUtil.isNotEmpty(wxCardDto.getLogoUrl())) {
+                baseInfo.put("logo_url", baseImage + wxCardDto.getLogoUrl());
+            }
             if (StringUtil.isEmpty(wxCardId)) {
             if (StringUtil.isEmpty(wxCardId)) {
                 baseInfo.put("brand_name", wxCardDto.getBrandName());
                 baseInfo.put("brand_name", wxCardDto.getBrandName());
             }
             }