|
|
|
|
230
|
String page = StringUtils.ifNull(params.getString("page"), "");
|
230
|
String page = StringUtils.ifNull(params.getString("page"), "");
|
231
|
String lineColorStr = StringUtils.ifNull(params.getString("line_color"), "{\"r\":0,\"g\":0,\"b\":0}");
|
231
|
String lineColorStr = StringUtils.ifNull(params.getString("line_color"), "{\"r\":0,\"g\":0,\"b\":0}");
|
232
|
WxMaCodeLineColor lineColor = JSONObject.parseObject(lineColorStr, WxMaCodeLineColor.class);
|
232
|
WxMaCodeLineColor lineColor = JSONObject.parseObject(lineColorStr, WxMaCodeLineColor.class);
|
233
|
-
|
|
|
234
|
- TaMiniappQrcode taQrcode = new TaMiniappQrcode();
|
|
|
235
|
- taQrcode.setAppid(miniappId);
|
|
|
236
|
- taQrcode.setCreateDate(LocalDateTime.now());
|
|
|
237
|
- taQrcode.setExpireDate(LocalDateTime.now().plusDays(7));
|
|
|
238
|
- taQrcode.setQrParams(replace);
|
|
|
239
|
- taMiniappQrcodeMapper.insert(taQrcode);
|
|
|
|
|
233
|
+ TaMiniappQrcode taQrcode = new TaMiniappQrcode();
|
|
|
234
|
+
|
240
|
try {
|
235
|
try {
|
241
|
// 使用ID作为场景值
|
236
|
// 使用ID作为场景值
|
242
|
File qrFile = wxService.getQrcodeService().createWxaCodeUnlimit(scene, page, 430, true, lineColor, true);
|
237
|
File qrFile = wxService.getQrcodeService().createWxaCodeUnlimit(scene, page, 430, true, lineColor, true);
|
243
|
String qrcode = AliOSSUtils.putObject(qrFile, CommConstant.ALIOSS_DEFAULT_UPLOAD);
|
238
|
String qrcode = AliOSSUtils.putObject(qrFile, CommConstant.ALIOSS_DEFAULT_UPLOAD);
|
|
|
239
|
+
|
|
|
240
|
+ taQrcode.setAppid(miniappId);
|
|
|
241
|
+ taQrcode.setCreateDate(LocalDateTime.now());
|
|
|
242
|
+ taQrcode.setExpireDate(LocalDateTime.now().plusDays(7));
|
|
|
243
|
+ taQrcode.setQrParams(replace);
|
244
|
taQrcode.setQrCode(qrcode);
|
244
|
taQrcode.setQrCode(qrcode);
|
245
|
- taMiniappQrcodeMapper.updateById(taQrcode);
|
|
|
246
|
- taQrcode.setQrCode(qrcode);
|
|
|
|
|
245
|
+ taMiniappQrcodeMapper.insert(taQrcode);
|
247
|
return taQrcode;
|
246
|
return taQrcode;
|
248
|
}catch (Exception e) {
|
247
|
}catch (Exception e) {
|
249
|
e.printStackTrace();
|
248
|
e.printStackTrace();
|