|
@@ -235,4 +235,29 @@ public class WeGroupFissionController extends BaseController {
|
|
|
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("二维码获取失败:".getBytes());
|
|
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("二维码获取失败:".getBytes());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @version
|
|
|
|
|
+ * @author: hxl
|
|
|
|
|
+ * @Date: 2026/2/25 10:34
|
|
|
|
|
+ * @Description: 获取短链二进制流
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping(value = "/getWechatGroupFissionUrlStream")
|
|
|
|
|
+ public ResponseEntity<byte[]> getWechatGroupFissionUrlStream(@RequestBody CreateWechatGroupFissionUrlVo createWechatGroupFissionUrlVo) {
|
|
|
|
|
+ if(StringUtils.isBlank(createWechatGroupFissionUrlVo.getUrl())){
|
|
|
|
|
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("生成页面路径不能为空:".getBytes());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isBlank(createWechatGroupFissionUrlVo.getGroupFissionId())){
|
|
|
|
|
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("群裂变活动id不能为空:".getBytes());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isBlank(createWechatGroupFissionUrlVo.getVersion())){
|
|
|
|
|
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("版本不能为空:".getBytes());
|
|
|
|
|
+ }
|
|
|
|
|
+ try{
|
|
|
|
|
+ String url = weGroupFissionService.getWechatGroupFissionUrl(createWechatGroupFissionUrlVo);
|
|
|
|
|
+ byte[] qrcodeBytes = QrcodeUtils.qrcodeUrlToBytes(url);
|
|
|
|
|
+ return QrcodeUtils.returnQrcodeToFront(qrcodeBytes);
|
|
|
|
|
+ }catch (Exception e){
|
|
|
|
|
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("获取失败:".getBytes());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|