|
@@ -11,6 +11,7 @@ import com.fdkankan.manage_jp.exception.BusinessException;
|
|
|
import com.fdkankan.manage_jp.httpClient.client.FdKKClient;
|
|
|
import com.fdkankan.manage_jp.httpClient.param.UploadEditSceneParam;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -109,6 +110,14 @@ public class UploadController extends BaseController{
|
|
|
@RequestParam(value = "title",required = false)String title,
|
|
|
@RequestParam(value = "newFileName",required = false)String newFileName ){
|
|
|
|
|
|
+ if(StringUtils.isBlank(newFileName)){
|
|
|
+ throw new BusinessException(ResultCode.PARAM_ERROR);
|
|
|
+ }
|
|
|
+ String ossPath = "manage/e57/"+newFileName;
|
|
|
+ if(!fYunFileServiceInterface.fileExist(ossPath)){
|
|
|
+ throw new BusinessException(ResultCode.UPLOAD_ERROR3);
|
|
|
+ }
|
|
|
+
|
|
|
UploadEditSceneParam editSceneParam = new UploadEditSceneParam();
|
|
|
editSceneParam.setTitle(title);
|
|
|
editSceneParam.setUserId(getUser().getId());
|