From 3e7b0634b43888d8f49a86b391a1e2832be86bf3 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Sun, 17 Oct 2021 19:57:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=90=86=E5=95=86?= =?UTF-8?q?=E9=82=80=E8=AF=B7=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/bweb/controller/HighAgentController.java | 11 ++++++----- hai-bweb/src/main/resources/dev/application.yml | 2 +- hai-bweb/src/main/resources/dev/config.properties | 2 +- hai-bweb/src/main/resources/prod/config.properties | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) 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/application.yml b/hai-bweb/src/main/resources/dev/application.yml index 32384420..f799126d 100644 --- a/hai-bweb/src/main/resources/dev/application.yml +++ b/hai-bweb/src/main/resources/dev/application.yml @@ -9,7 +9,7 @@ debug: false #datasource数据源设置 spring: datasource: - url: jdbc:mysql://122.9.135.148:3306/hsg?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://139.159.177.244:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: HF123456. type: com.alibaba.druid.pool.DruidDataSource 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=