diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighAgentController.java b/hai-bweb/src/main/java/com/bweb/controller/HighAgentController.java index 0e24d692..b48e02a8 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighAgentController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighAgentController.java @@ -1,5 +1,6 @@ package com.bweb.controller; +import com.bweb.config.SysConst; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.hai.common.QRCodeGenerator; @@ -160,21 +161,21 @@ public class HighAgentController { @RequestMapping(value = "/generateRechargeAgentQrCode", method = RequestMethod.GET) @ResponseBody - @ApiOperation(value = "生成【充值代理商】二维码") + @ApiOperation(value = "生成【代理商】二维码") public ResponseData generateRechargeAgentQrCode(@RequestParam(value = "agentId", required = true) Long agentId) { try { HighAgent highAgent = highAgentService.findByAgentMsgId(agentId); // 代理商类型 1:卡券代理商 2:充值代理商 - if (highAgent == null || highAgent.getType() != 2) { + if (highAgent == null) { log.error("HighAgentController --> generateRechargeAgentQrCode() error!", "此代理商暂无法生成二维码"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "此代理商暂无法生成二维码"); } // 生成二维码 - String url = "https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue="; - String qrCodeImg = "rechargeAgentQrCode/" + highAgent.getAgentKey()+".png"; + String url = SysConst.getSysConfig().getAgentQrCodeWxUrl(); + String qrCodeImg = "agentQrCode/" + highAgent.getId()+".png"; String qrCodeUrl = "/home/project/hsg/filesystem/" + qrCodeImg; - QRCodeGenerator.generateQRCodeImage(url+highAgent.getAgentKey(), 350, 350, qrCodeUrl); + QRCodeGenerator.generateQRCodeImage(url+highAgent.getId(), 350, 350, qrCodeUrl); highAgent.setExt1(qrCodeImg); highAgentService.updateAgentDetail(highAgent); return ResponseMsgUtil.success(qrCodeImg); diff --git a/hai-bweb/src/main/resources/dev/config.properties b/hai-bweb/src/main/resources/dev/config.properties index 9874dd8e..a35e3947 100644 --- a/hai-bweb/src/main/resources/dev/config.properties +++ b/hai-bweb/src/main/resources/dev/config.properties @@ -1,4 +1,4 @@ fileUrl=/home/project/hsg/filesystem cmsPath=/home/project/hsg/filesystem/cmsPath agentQrCode=/home/project/hsg/filesystem/agentQrCode -agentQrCodeWxUrl=https://hsgcs.dctpay.com/wx/?action=gogogo&id= +agentQrCodeWxUrl=https://hsgcs.dctpay.com/wx/?action=ic&id= diff --git a/hai-bweb/src/main/resources/prod/config.properties b/hai-bweb/src/main/resources/prod/config.properties index 69132629..a35e3947 100644 --- a/hai-bweb/src/main/resources/prod/config.properties +++ b/hai-bweb/src/main/resources/prod/config.properties @@ -1,4 +1,4 @@ fileUrl=/home/project/hsg/filesystem cmsPath=/home/project/hsg/filesystem/cmsPath agentQrCode=/home/project/hsg/filesystem/agentQrCode -agentQrCodeWxUrl=https://hsg.dctpay.com/wx/?action=gogogo&id= +agentQrCodeWxUrl=https://hsgcs.dctpay.com/wx/?action=ic&id=