fix
Hentua
2023-08-23 8b6cde991aebcdca6726da58918297a3d1909470
src/main/java/cc/mrbird/febs/pay/service/impl/XcxPayServiceImpl.java
@@ -79,8 +79,12 @@
        String productNames = "小程序充值";
        MallMember mallMember = mallMemberMapper.selectById(apiRechargeWalletDto.getMemberId());
        String rechargeNo = apiRechargeWalletDto.getRechargeNo();
        Long agentApplyId = apiRechargeWalletDto.getAgentApplyId() == null ? 0L : apiRechargeWalletDto.getAgentApplyId();
        Boolean debug = xcxProperties.getDebug();
        String attrStr = "{'rechargeNo':"+rechargeNo+",'memberId':"+mallMember.getId()+",'type':"+apiRechargeWalletDto.getType()+"}";
        String attrStr = "{'rechargeNo':"+rechargeNo
                +",'memberId':"+mallMember.getId()
                +",'agentApplyId':"+agentApplyId
                +",'type':"+apiRechargeWalletDto.getType()+"}";
        if (debug) {
            payData = weixinServiceUtil.createRechargeWallet("[测试]" + productNames, rechargeNo,
                    1, mallMember.getOpenId(), attrStr);
@@ -399,12 +403,12 @@
            String url = null;
            if (type == null) {
                // 该接口无数量限制,但是 scene 传参最大字符长度为32个字符
                url = StrFormatter.format("https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token={}",redisUtils.get(WechatConfigure.WX_ACCESS_TOKEN_REDIS_KEY).toString());
                url = StrUtil.format("https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token={}",redisUtils.get(WechatConfigure.WX_ACCESS_TOKEN_REDIS_KEY).toString());
                obj.set("scene", scene);
                obj.set("page", path);
            } else {
                // 该接口存在数量限制, 总共可生成10w个, 但参数是接在path后面
                url = StrFormatter.format("https://api.weixin.qq.com/wxa/getwxacode?access_token={}", redisUtils.get(WechatConfigure.WX_ACCESS_TOKEN_REDIS_KEY).toString());
                url = StrUtil.format("https://api.weixin.qq.com/wxa/getwxacode?access_token={}", redisUtils.get(WechatConfigure.WX_ACCESS_TOKEN_REDIS_KEY).toString());
                obj.set("page", path + "?" + scene );
            }