|
|
|
@ -97,7 +97,7 @@ public class HighDiscountAgentRelController { |
|
|
|
|
// 是否已分配
|
|
|
|
|
if (highDiscountAgentRelService.getRelByDiscountAgent(highDiscountAgentRel.getDiscountId(), highDiscountAgentRel.getAgentId()) != null) { |
|
|
|
|
log.error("HighDiscountAgentRelController -> insertDiscountAgent() error!", discount.getDiscountName() + "重复分配给" + agent.getAgentName()); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, discount.getDiscountName() + "重复分配给" + agent.getAgentName()); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, discount.getDiscountName() + "重复分配给" + agent.getAgentName()); |
|
|
|
|
} |
|
|
|
|
highDiscountAgentRel.setCreateTime(new Date()); |
|
|
|
|
highDiscountAgentRel.setStatus(1); |
|
|
|
@ -110,7 +110,7 @@ public class HighDiscountAgentRelController { |
|
|
|
|
//参数
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("type", QrCodeType.AGENT_QR_CODE); |
|
|
|
|
map.put("code", AESEncodeUtil.aesEncrypt(Base64Util.encode(highDiscountAgentRel.getId().toString()))); |
|
|
|
|
map.put("code", Base64Util.encode(AESEncodeUtil.aesEncrypt(highDiscountAgentRel.getId().toString()))); |
|
|
|
|
QRCodeGenerator.generateQRCodeImage(JSON.toJSONString(map), 350, 350, qrCodeUrl); |
|
|
|
|
highDiscountAgentRel.setQrCode(qrCodeImg); |
|
|
|
|
highDiscountAgentRelService.updateDiscountAgentRel(highDiscountAgentRel); |
|
|
|
|