这里哪里出错了吗?怎么图片修改不了?

@RequestMapping
public ModelAndView ie6upload(HttpServletRequest request,Map out,String destUrl) throws IOException{
String type= request.getParameter("ptype");//获取type
SsoUser user = getCachedUser(request);//用user容器装入
JSONObject job = new JSONObject();//json转换类型
String filename = UUID.randomUUID().toString();
String path = MvcUpload.getModalPath("feiliao91");
String finalname = "";
try {
finalname = MvcUpload.localUpload(request, path, filename);//上传
} catch (Exception e) {
finalname = filename;
}
// 添加图片水印
PicMarkUtils.pressImageRightButtomTZS(path+MvcUpload.getDateFolder()+finalname,"");
//保存在数据库
Picture picture = new Picture();
picture.setCompanyId(user.getCompanyId());
String picAddress = "/feiliao91/"+MvcUpload.getDateFolder();
picture.setPicAddress(picAddress+"/"+finalname);
picture.setTargetType(type);
picture.setTargetId(0);
Integer i = pictureService.createPicture(picture);
job.put("url", picture.getPicAddress());
job.put("pid", i.toString()); //跟强制转化有什么区别
out.put("destUrl", destUrl);
if (i>0) {
out.put("success", true);
out.put("data", job.toString());//转换后的json data(string)
}
// return printJson(job.toString(), out);
return new ModelAndView("submitCallback");//返回一个新的模型和界面
}

}

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!