Compare commits

..

No commits in common. '5d313d52edd4fc3a05ef140c8eff99236c33b997' and '5841eff1bb8108e80bcf29715587b3c76977be36' have entirely different histories.

@ -419,7 +419,7 @@ public class AppController extends BaseController
tImage.setThirdId(recordId); tImage.setThirdId(recordId);
tImage.setCreateTime(new Date()); tImage.setCreateTime(new Date());
tImage.setName(name); tImage.setName(name);
String path=GenerateImage(value,name); String path=GenerateImage(value);
tImage.setPath(path); tImage.setPath(path);
imageService.insertTImage(tImage); imageService.insertTImage(tImage);
} }
@ -465,7 +465,7 @@ public class AppController extends BaseController
{ {
String imageKey=keys[i]; String imageKey=keys[i];
String imgStr=parents.get(i).getJSONObject(imageKey).getString("v"); String imgStr=parents.get(i).getJSONObject(imageKey).getString("v");
String path=GenerateImage(imgStr,imageKey); String path=GenerateImage(imgStr);
parents.get(i).getJSONObject(keys[i]).put("v",null); parents.get(i).getJSONObject(keys[i]).put("v",null);
TImage tImage = new TImage(); TImage tImage = new TImage();
tImage.setName(imageKey); tImage.setName(imageKey);
@ -495,7 +495,7 @@ public class AppController extends BaseController
} }
public static String GenerateImage(String imgStr,String imageName) public static String GenerateImage(String imgStr)
{ {
BASE64Decoder decoder = new BASE64Decoder(); BASE64Decoder decoder = new BASE64Decoder();
@ -515,7 +515,7 @@ public class AppController extends BaseController
} }
catch (Exception e) catch (Exception e)
{ {
throw new ServiceException(imageName + " :Base64转图片错误"); throw new ServiceException("Base64转图片错误");
} }
} }
} }

@ -23,7 +23,7 @@ import com.ruoyi.framework.config.ServerConfig;
/** /**
* *
* *
* @author ruoyi * @author ruoyi
*/ */
@RestController @RestController
@ -39,7 +39,7 @@ public class CommonController
/** /**
* *
* *
* @param fileName * @param fileName
* @param delete * @param delete
*/ */
@ -77,9 +77,6 @@ public class CommonController
{ {
try try
{ {
if(file == null){
return AjaxResult.error("上传文件为空");
}
// 上传文件路径 // 上传文件路径
String filePath = RuoYiConfig.getUploadPath(); String filePath = RuoYiConfig.getUploadPath();
// 上传并返回新文件名称 // 上传并返回新文件名称

Loading…
Cancel
Save