diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighDiscountAgentRelController.java b/hai-bweb/src/main/java/com/bweb/controller/HighDiscountAgentRelController.java index 1e62ad7f..ae436423 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighDiscountAgentRelController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighDiscountAgentRelController.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON; import com.bweb.config.SysConst; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import com.hai.common.Base64Util; import com.hai.common.QRCodeGenerator; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; @@ -109,7 +110,7 @@ public class HighDiscountAgentRelController { //参数 Map map = new HashMap<>(); map.put("type", QrCodeType.AGENT_QR_CODE); - map.put("code", AESEncodeUtil.aesEncrypt(highDiscountAgentRel.getId().toString())); + map.put("code", AESEncodeUtil.aesEncrypt(Base64Util.encode(highDiscountAgentRel.getId().toString()))); QRCodeGenerator.generateQRCodeImage(JSON.toJSONString(map), 350, 350, qrCodeUrl); highDiscountAgentRel.setQrCode(qrCodeImg); highDiscountAgentRelService.updateDiscountAgentRel(highDiscountAgentRel); diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighDiscountController.java b/hai-cweb/src/main/java/com/cweb/controller/HighDiscountController.java index 06658914..d942eb95 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighDiscountController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighDiscountController.java @@ -1,5 +1,6 @@ package com.cweb.controller; +import com.hai.common.Base64Util; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; @@ -46,7 +47,7 @@ public class HighDiscountController { try { String relId; try { - relId = AESEncodeUtil.aesDecrypt(code); + relId = AESEncodeUtil.aesDecrypt(Base64Util.decode(code)); } catch (Exception e) { log.error("HighDiscountController -> getDiscountByQrCode() error!","code解码错误"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "code解码错误"); diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java b/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java index e6fbcd4b..e76a665e 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java @@ -71,7 +71,7 @@ public class HighUserDiscountController { } // 领取 highDiscountUserRelService.receiveDiscount(userInfoModel.getHighUser().getId(), discountAgentId); - return ResponseMsgUtil.success("操作成功"); + return ResponseMsgUtil.success("领取成功"); } catch (Exception e) { log.error("HighDiscountController -> receiveDiscount() error!",e);