bug
jiangqs
2023-08-15 bb95ec391d10f04702822705ecb82c027e849b98
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/util/WechatPayUtils.java
@@ -48,29 +48,30 @@
        }
        //营业执照
        ApplymentsRequest.BusinessLicenseInfo business_license_info = new ApplymentsRequest.BusinessLicenseInfo();
        InputStream blImageIO = OBSUploadUtils.getOSSInputStream(shopAuthentication.getBlImage());
        ImageUploadResult blImageIR = merchantMediaService.imageUploadV3(blImageIO,applyNumber+"blimage");
        InputStream blImageIO = OBSUploadUtils.getOSSInputStream(shopAuthentication.getBlImage().replace("https://hongruitang.oss-cn-beijing.aliyuncs.com/",""));
        ImageUploadResult blImageIR = merchantMediaService.imageUploadV3(blImageIO,applyNumber+"blimage.jpg");
        business_license_info.setBusinessLicenseCopy(blImageIR.getMediaId());
        blImageIO.close();
        business_license_info.setBusinessLicenseNumber(shopAuthentication.getBlNumber());
        business_license_info.setMerchantName(shopAuthentication.getBlShopName());
        business_license_info.setLegalPerson(shopAuthentication.getBlCorporateName());
        business_license_info.setCompanyAddress(shopAuthentication.getBlRegisteredAddress());
        business_license_info.setBusinessTime(shopAuthentication.getBlBusinessDeanline());
        business_license_info.setBusinessTime("[\"2023-05-08\",\"长期\"]");
        request.setBusinessLicenseInfo(business_license_info);
        //法人证件
        request.setIdDocType("IDENTIFICATION_TYPE_MAINLAND_IDCARD");
        ApplymentsRequest.IdCardInfo id_card_info = new ApplymentsRequest.IdCardInfo();
        InputStream lpIcFrontIO = OBSUploadUtils.getOSSInputStream(shopAuthentication.getLpIcFront());
        ImageUploadResult lpIcFrontIR = merchantMediaService.imageUploadV3(lpIcFrontIO,applyNumber+"lpIcFront");
        InputStream lpIcFrontIO = OBSUploadUtils.getOSSInputStream(shopAuthentication.getLpIcFront().replace("https://hongruitang.oss-cn-beijing.aliyuncs.com/",""));
        ImageUploadResult lpIcFrontIR = merchantMediaService.imageUploadV3(lpIcFrontIO,applyNumber+"lpIcFront.jpg");
        id_card_info.setIdCardCopy(lpIcFrontIR.getMediaId());
        lpIcFrontIO.close();
        InputStream lpIcBackIO = OBSUploadUtils.getOSSInputStream(shopAuthentication.getLpIcBack());
        ImageUploadResult lpIcBackIR = merchantMediaService.imageUploadV3(lpIcBackIO,applyNumber+"lpIcBack");
        InputStream lpIcBackIO = OBSUploadUtils.getOSSInputStream(shopAuthentication.getLpIcBack().replace("https://hongruitang.oss-cn-beijing.aliyuncs.com/",""));
        ImageUploadResult lpIcBackIR = merchantMediaService.imageUploadV3(lpIcBackIO,applyNumber+"lpIcBack.jpg");
        id_card_info.setIdCardNational(lpIcBackIR.getMediaId());
        lpIcBackIO.close();
        id_card_info.setIdCardName(shopAuthentication.getLpCorporateName());
        id_card_info.setIdCardNumber(shopAuthentication.getLpIdCard());
        id_card_info.setIdCardAddress("四川省泸州市江阳区桃园路1号2号楼4单元1号");
        id_card_info.setIdCardValidTimeBegin(shopAuthentication.getLpIcStartDate());
        id_card_info.setIdCardValidTime(shopAuthentication.getLpIcEndDate());
        request.setIdCardInfo(id_card_info);
@@ -84,12 +85,12 @@
                List<ApplymentsRequest.UboInfo> ubo_info_list = new ArrayList<>();
                ApplymentsRequest.UboInfo uboInfo = new ApplymentsRequest.UboInfo();
                uboInfo.setUboIdDocType("IDENTIFICATION_TYPE_MAINLAND_IDCARD");
                InputStream uboIcFrontIO = OBSUploadUtils.getOSSInputStream(shopAuthentication.getUboIcFront());
                ImageUploadResult uboIcFrontIR = merchantMediaService.imageUploadV3(uboIcFrontIO,applyNumber+"uboIcFront");
                InputStream uboIcFrontIO = OBSUploadUtils.getOSSInputStream(shopAuthentication.getUboIcFront().replace("https://hongruitang.oss-cn-beijing.aliyuncs.com/",""));
                ImageUploadResult uboIcFrontIR = merchantMediaService.imageUploadV3(uboIcFrontIO,applyNumber+"uboIcFront.jpg");
                uboInfo.setUboIdDocCopy(uboIcFrontIR.getMediaId());
                uboIcFrontIO.close();
                InputStream uboIcBackIO = OBSUploadUtils.getOSSInputStream(shopAuthentication.getUboIcBack());
                ImageUploadResult uboIcBackIR = merchantMediaService.imageUploadV3(uboIcBackIO,applyNumber+"uboIcBack");
                InputStream uboIcBackIO = OBSUploadUtils.getOSSInputStream(shopAuthentication.getUboIcBack().replace("https://hongruitang.oss-cn-beijing.aliyuncs.com/",""));
                ImageUploadResult uboIcBackIR = merchantMediaService.imageUploadV3(uboIcBackIO,applyNumber+"uboIcBack.jpg");
                uboInfo.setUboIdDocCopyBack(uboIcBackIR.getMediaId());
                uboIcBackIO.close();
                uboInfo.setUboIdDocName(shopAuthentication.getUboName());
@@ -117,14 +118,15 @@
        contactInfo.setContactType("65");
        contactInfo.setContactName(shopAuthentication.getLpCorporateName());
        contactInfo.setContactIdCardNumber(shopAuthentication.getLpIdCard());
        contactInfo.setMobilePhone(shopAuthentication.getLpMobilePhone());
        contactInfo.setContactEmail(shopAuthentication.getLpContactEmail());
        contactInfo.setMobilePhone("13882237106");
        contactInfo.setContactEmail("343695869@qq.com");
        request.setContactInfo(contactInfo);
        //店铺信息
        ApplymentsRequest.SalesSceneInfo salesSceneInfo = new ApplymentsRequest.SalesSceneInfo();
        salesSceneInfo.setStoreName(shop.getShopName());
        salesSceneInfo.setStoreQrCode("https://wxapp.hhhrt.cn/mini/shop?id="+shop.getShopId());
        salesSceneInfo.setMiniProgramSubAppid("wxb7f0ea286fc4e535");
        InputStream storeQrCodeIO = OBSUploadUtils.getOSSInputStream(shop.getShopCode().replace("https://hongruitang.oss-cn-beijing.aliyuncs.com/",""));
        ImageUploadResult storeQrCodeIR = merchantMediaService.imageUploadV3(storeQrCodeIO,applyNumber+"storeQrCode.jpg");
        salesSceneInfo.setStoreQrCode(storeQrCodeIR.getMediaId());
        request.setSalesSceneInfo(salesSceneInfo);
        request.setMerchantShortname(shop.getShopName());
        request.setBusinessAdditionPics(shopAuthentication.getBaPics());