提交代理商邀请码

dev-discount
袁野 3 years ago
parent e6aad7fe1b
commit 3e7b0634b4
  1. 11
      hai-bweb/src/main/java/com/bweb/controller/HighAgentController.java
  2. 2
      hai-bweb/src/main/resources/dev/application.yml
  3. 2
      hai-bweb/src/main/resources/dev/config.properties
  4. 2
      hai-bweb/src/main/resources/prod/config.properties

@ -1,5 +1,6 @@
package com.bweb.controller; package com.bweb.controller;
import com.bweb.config.SysConst;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.hai.common.QRCodeGenerator; import com.hai.common.QRCodeGenerator;
@ -160,21 +161,21 @@ public class HighAgentController {
@RequestMapping(value = "/generateRechargeAgentQrCode", method = RequestMethod.GET) @RequestMapping(value = "/generateRechargeAgentQrCode", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "生成【充值代理商】二维码") @ApiOperation(value = "生成【代理商】二维码")
public ResponseData generateRechargeAgentQrCode(@RequestParam(value = "agentId", required = true) Long agentId) { public ResponseData generateRechargeAgentQrCode(@RequestParam(value = "agentId", required = true) Long agentId) {
try { try {
HighAgent highAgent = highAgentService.findByAgentMsgId(agentId); HighAgent highAgent = highAgentService.findByAgentMsgId(agentId);
// 代理商类型 1:卡券代理商 2:充值代理商 // 代理商类型 1:卡券代理商 2:充值代理商
if (highAgent == null || highAgent.getType() != 2) { if (highAgent == null) {
log.error("HighAgentController --> generateRechargeAgentQrCode() error!", "此代理商暂无法生成二维码"); log.error("HighAgentController --> generateRechargeAgentQrCode() error!", "此代理商暂无法生成二维码");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "此代理商暂无法生成二维码"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "此代理商暂无法生成二维码");
} }
// 生成二维码 // 生成二维码
String url = "https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue="; String url = SysConst.getSysConfig().getAgentQrCodeWxUrl();
String qrCodeImg = "rechargeAgentQrCode/" + highAgent.getAgentKey()+".png"; String qrCodeImg = "agentQrCode/" + highAgent.getId()+".png";
String qrCodeUrl = "/home/project/hsg/filesystem/" + qrCodeImg; 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); highAgent.setExt1(qrCodeImg);
highAgentService.updateAgentDetail(highAgent); highAgentService.updateAgentDetail(highAgent);
return ResponseMsgUtil.success(qrCodeImg); return ResponseMsgUtil.success(qrCodeImg);

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置 #datasource数据源设置
spring: spring:
datasource: 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 username: root
password: HF123456. password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource

@ -1,4 +1,4 @@
fileUrl=/home/project/hsg/filesystem fileUrl=/home/project/hsg/filesystem
cmsPath=/home/project/hsg/filesystem/cmsPath cmsPath=/home/project/hsg/filesystem/cmsPath
agentQrCode=/home/project/hsg/filesystem/agentQrCode agentQrCode=/home/project/hsg/filesystem/agentQrCode
agentQrCodeWxUrl=https://hsgcs.dctpay.com/wx/?action=gogogo&id= agentQrCodeWxUrl=https://hsgcs.dctpay.com/wx/?action=ic&id=

@ -1,4 +1,4 @@
fileUrl=/home/project/hsg/filesystem fileUrl=/home/project/hsg/filesystem
cmsPath=/home/project/hsg/filesystem/cmsPath cmsPath=/home/project/hsg/filesystem/cmsPath
agentQrCode=/home/project/hsg/filesystem/agentQrCode agentQrCode=/home/project/hsg/filesystem/agentQrCode
agentQrCodeWxUrl=https://hsg.dctpay.com/wx/?action=gogogo&id= agentQrCodeWxUrl=https://hsgcs.dctpay.com/wx/?action=ic&id=

Loading…
Cancel
Save