|
|
@ -225,6 +225,7 @@ public class AcitveProductInfoServiceImpl extends BaseServiceImpl<AcitveProductI |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<PointExchangeResultDTO> getProductExchange(PointExchangeFormDTO formDTO) { |
|
|
|
System.out.println("getProductExchange"+formDTO.getProductId()); |
|
|
|
// 根据token的部门权限效验是否有权限购买商品。
|
|
|
|
int productByDeptId = acitveProductDeptService.getProductByDeptId(formDTO); |
|
|
|
if (productByDeptId == 0) { |
|
|
@ -270,6 +271,7 @@ public class AcitveProductInfoServiceImpl extends BaseServiceImpl<AcitveProductI |
|
|
|
acitveProductExchangeService.save(acitveProductExchangeDTO); |
|
|
|
// 根据核销兑换接口链接 生成核销二维码。
|
|
|
|
String qrcodeUrl =null; |
|
|
|
System.out.println("22222222222222222222"); |
|
|
|
try { |
|
|
|
String imageBase64 = QRCodeGenerator.createImage("https://epdc-shibei.elinkservice.cn/epdc-api/api/work/points/exchangedCheck?exchangeId=" + acitveProductExchangeDTO.getId()); |
|
|
|
imageBase64 = "data:image/png;base64,"+imageBase64; |
|
|
@ -281,6 +283,7 @@ public class AcitveProductInfoServiceImpl extends BaseServiceImpl<AcitveProductI |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
System.out.println("333333333333"+qrcodeUrl); |
|
|
|
// 更新二维码地址
|
|
|
|
acitveProductExchangeDTO.setQrCodeUrl(qrcodeUrl); |
|
|
|
acitveProductExchangeService.update(acitveProductExchangeDTO); |
|
|
|