|
@@ -24,6 +24,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.web.bind.annotation.RequestHeader;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -163,6 +164,23 @@ 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){
|