| | |
| | | import com.qxueyou.scc.sys.service.ISysAttachmentService; |
| | | |
| | | /** |
| | | * 数据库配置服务 |
| | | * 数据库配置服务 |
| | | * @author kevin |
| | | * |
| | | */ |
| | |
| | | attachement.setAttachmentType(0); |
| | | this.save(attachement); |
| | | |
| | | // 更新上传文件使用轨迹 |
| | | // 更新上传文件使用轨迹 |
| | | fileUploadService.updateUploadTrace(attachmentPath, "sys_attachment_file", SysFileUploadTrace.FILE_USE, attachement.getAttachmentId()); |
| | | result =new Result(true); |
| | | Map<String,Object> attrMap = new HashMap<String,Object>(); |
| | | attrMap.put("attachmentId", attachement.getAttachmentId()); |
| | | result.setData(attrMap); |
| | | } catch (Exception ex) { |
| | | logger.error("新增附件出错。。attachmentName="+attachmentName,ex); |
| | | logger.error("新增附件出错。。attachmentName="+attachmentName,ex); |
| | | } |
| | | |
| | | return result; |
| | |
| | | SysAttachment tempAttach = null; |
| | | String[] arrAttachementId = null; |
| | | try { |
| | | // 保存到服务器 |
| | | // 保存到服务器 |
| | | if(StringUtils.isEmpty(attachementIds)){ |
| | | return new Result(false,"参数错误,需要删除的附件不存在"); |
| | | return new Result(false,"参数错误,需要删除的附件不存在"); |
| | | } |
| | | |
| | | arrAttachementId = attachementIds.split(","); |
| | |
| | | } |
| | | result = new Result(true); |
| | | } catch (Exception ex) { |
| | | logger.error("删除附件出错。。attachementIds="+attachementIds,ex); |
| | | logger.error("删除附件出错。。attachementIds="+attachementIds,ex); |
| | | } |
| | | return result; |
| | | } |