Browse Source

fixed 保存店铺报错问题

fushengqian 1 year ago
parent
commit
c6ef19ee2d

+ 1 - 1
fuint-application/src/main/java/com/fuint/common/service/WeixinService.java

@@ -142,7 +142,7 @@ public interface WeixinService {
      * @param width 宽度
      * @return
      * */
-    String createStoreQrCode(Integer merchantId, Integer storeId, Integer width);
+    String createStoreQrCode(Integer merchantId, Integer storeId, Integer width) throws BusinessCheckException;
 
     /**
      * 开通微信卡券

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

@@ -644,7 +644,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @return
      * */
     @Override
-    public String createStoreQrCode(Integer merchantId, Integer storeId, Integer width) {
+    public String createStoreQrCode(Integer merchantId, Integer storeId, Integer width) throws BusinessCheckException {
         try {
             String accessToken = getAccessToken(merchantId, true,true);
             String url = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=" + accessToken;
@@ -681,8 +681,8 @@ public class WeixinServiceImpl implements WeixinService {
             }
         } catch (Exception e) {
             logger.error("生成店铺二维码出错啦:{}", e.getMessage());
+            throw new BusinessCheckException("生成店铺二维码出错,请检查小程序配置");
         }
-        return "";
     }
 
     /**