|
@@ -48,6 +48,8 @@ public class FdkkSceneEditService {
|
|
|
private String hotCdfPath;
|
|
|
@Value("${fdkk.hot-local-path}")
|
|
|
private String hotLocalPath;
|
|
|
+ @Value("${fdkk.qr-code-url}")
|
|
|
+ private String qrCodeUrl;
|
|
|
@Resource
|
|
|
private FdkkClient fdkkClient;
|
|
|
@Resource
|
|
@@ -170,24 +172,6 @@ public class FdkkSceneEditService {
|
|
|
}
|
|
|
return fdkkResponse;
|
|
|
}
|
|
|
- public FdkkResponse uploadBallScreenVideo(FdkkUploadRequest param,
|
|
|
- MultipartFile file, String token) throws IOException {
|
|
|
- String path = null;
|
|
|
- if(file !=null && file.getSize() >0){
|
|
|
- String fileName = file.getOriginalFilename();
|
|
|
- assert fileName != null;
|
|
|
- String newFilePath = String.format(hotLocalPath,param.getNum()) + "/"+fileName ;
|
|
|
- File newFile = new File(newFilePath);
|
|
|
- file.transferTo(newFile);
|
|
|
- path = newFile.getPath();
|
|
|
- }
|
|
|
- FdkkResponse fdkkResponse = fdkkClient.uploadBallScreenVideo(param,path,fdkkSceneService.getFdkkToken(token));
|
|
|
- if(fdkkResponse.getCode() !=0){
|
|
|
- throw new BusinessException(fdkkResponse.getCode(),fdkkResponse.getMsg());
|
|
|
- }
|
|
|
- return fdkkResponse;
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
private JSONArray getProductByJsonObj(JSONArray tags){
|
|
|
HashMap<String,JSONArray> resultMap = new HashMap<>(); //sid, productId array
|
|
@@ -263,11 +247,9 @@ public class FdkkSceneEditService {
|
|
|
public void downQrCode(HttpServletRequest request, HttpServletResponse response, String num) {
|
|
|
String longUrl;
|
|
|
try {
|
|
|
- longUrl = "http://vr.cdfmembers.com/index.html?m=" +num;
|
|
|
- // 转换成短url
|
|
|
- String shortUrl = ShortNetAddressUtil.generateShortUrl(longUrl);
|
|
|
+ longUrl = qrCodeUrl +num;
|
|
|
// 生成二维码
|
|
|
- BitMatrix qRcodeImg = QRCodeUtil.generateQRCodeStream(shortUrl, response);
|
|
|
+ BitMatrix qRcodeImg = QRCodeUtil.generateQRCodeStream(longUrl, response);
|
|
|
// 将二维码输出到页面中
|
|
|
MatrixToImageWriter.writeToStream(qRcodeImg, "png", response.getOutputStream());
|
|
|
} catch (Exception e) {
|