基于javaweb+mysql的springbootoa办公自动化系统设计和实现(java+springboot+freemarker+mysql+maven+mybatis+jpa)
运行环境
Java≥8、MySQL≥5.7
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb+mysql的SpringBootoa办公自动化系统设计和实现(java+springboot+freemarker+mysql+maven+mybatis+jpa)
java springbootOA办公自动化系统:
主要功能模块:系统、用户、角色、考勤、流程、公告、邮件、任务、日程、计划、文件、笔记、通讯录、讨论区等多个模块管理
使用Maven进行项目管理,基于springboot框架开发的项目,mysql底层数据库,前端采用freemarker模板引擎,Bootstrap作为前端UI框架,集成了jpa、mybatis等框架。
if(("费用报销").equals(typename)){
Bursement bu=budao.findByProId(pro);
if(shen.getFatherId().equals(u.getUserId())){
bu.setManagerAdvice(reviewed.getAdvice());
budao.save(bu);
}
if(u.getPosition().getId()==5){
bu.setFinancialAdvice(reviewed.getAdvice());
bu.setBurseTime(new Date());
bu.setOperation(u);
budao.save(bu);
}
}else if(("出差费用").equals(typename)){
EvectionMoney emoney=emdao.findByProId(pro);
if(shen.getFatherId().equals(u.getUserId())){
emoney.setManagerAdvice(reviewed.getAdvice());
emdao.save(emoney);
}
if(u.getPosition().getId()==5){
emoney.setFinancialAdvice(reviewed.getAdvice());
emdao.save(emoney);
}
}else if(("出差申请").equals(typename)){
Evection ev=edao.findByProId(pro);
if(shen.getFatherId().equals(u.getUserId())){
ev.setManagerAdvice(reviewed.getAdvice());
edao.save(ev);
}
if(u.getPosition().getId().equals(7L)){
ev.setPersonnelAdvice(reviewed.getAdvice());
edao.save(ev);
}
}else if(("加班申请").equals(typename)){
Overtime over=odao.findByProId(pro);
if(shen.getFatherId().equals(u.getUserId())){
over.setManagerAdvice(reviewed.getAdvice());
odao.save(over);
}
public void getuserlogrecord(int page, HttpSession session, Model model, String basekey, String time,
String icon) {
long userid=Long.valueOf(session.getAttribute("userId")+"");
setTwo(model, basekey, time,icon);
Page<LoginRecord> page4=userLogRecordService.ulogpaging(page, basekey, userid, time);
model.addAttribute("page", page4);
model.addAttribute("userloglist", page4.getContent());
System.out.println("debug");
for (LoginRecord loginRecord : page4.getContent()) {
System.out.println("000"+loginRecord);
}
model.addAttribute("url", "morelogrecordtable");
}
//用来查找用户记录
@RequestMapping("morelog")
public String test3df(@RequestParam(value="page",defaultValue = "0")int page,
HttpSession session,Model model,
@RequestParam(value="baseKey",required=false)String basekey,
@RequestParam(value="time",required=false)String time,
@RequestParam(value="icon",required=false)String icon
) {
System.out.println("11"+basekey);
getuserlog(page, session, model, basekey, time, icon);
return "user/userlogmanage";
}
//用来查找用户记录
@RequestMapping("morelogtable")
public String test3dfrt(@RequestParam(value="page",defaultValue = "0")int page,
HttpSession session,Model model,
@RequestParam(value="baseKey",required=false)String basekey,
@RequestParam(value="time",required=false)String time,
@RequestParam(value="icon",required=false)String icon) {
getuserlog(page, session, model, basekey, time, icon);
return "user/userlogmanagetable";
}
public void getuserlog(int page, HttpSession session, Model model, String basekey, String time,
String icon) {
long userid=Long.valueOf(session.getAttribute("userId")+"");
setTwo(model, basekey, time,icon);
Page<UserLog> page3=userLogService.ulogpaging(page, basekey, userid, time);
model.addAttribute("page", page3);
model.addAttribute("userloglist", page3.getContent());
model.addAttribute("url", "morelogtable");
}
model.addAttribute("url","mailtitle");
model.addAttribute("mess",mess);
return "mail/allmail";
}
/**
* 查看邮件
*/
@RequestMapping("smail")
public String index4(HttpServletRequest req,@SessionAttribute("userId") Long userId,Model model) {
User mu=udao.findOne(userId);
//邮件id
Long id=Long.parseLong(req.getParameter("id"));
//title
String title=req.getParameter("title");
//找到中间表信息
if(("收件箱").equals(title)||("垃圾箱").equals(title)){
Mailreciver mailr=mrdao.findbyReciverIdAndmailId(mu,id);
mailr.setRead(true);
mrdao.save(mailr);
}
//找到该邮件信息
Inmaillist mail=imdao.findOne(id);
String filetype=null;
if(!Objects.isNull(mail.getMailFileid())){
String filepath= mail.getMailFileid().getAttachmentPath();
System.out.println(filepath);
if(mail.getMailFileid().getAttachmentType().startsWith("image")){
filetype="img";
}else{
filetype="appli";
}
model.addAttribute("filepath", filepath);
model.addAttribute("filetype", filetype);
}
User pushuser=udao.findOne(mail.getMailUserid().getUserId());
model.addAttribute("pushname", pushuser.getUserName());
model.addAttribute("mail", mail);
model.addAttribute("mess", title);
model.addAttribute("file", mail.getMailFileid());
return "mail/seemail";
}
list.setModifyTime(new Date());
tdao.save(list);
// 分割任务接收人
StringTokenizer st = new StringTokenizer(list.getReciverlist(), ";");
while (st.hasMoreElements()) {
User reciver = udao.findid(st.nextToken());
Taskuser task = new Taskuser();
task.setTaskId(list);
task.setUserId(reciver);
task.setStatusId(list.getStatusId());
// 存任务中间表
tudao.save(task);
}
return "redirect:/taskmanage";
}
/**
* 修改任务
*/
@RequestMapping("edittasks")
public ModelAndView index3(HttpServletRequest req, @SessionAttribute("userId") Long userId,
@RequestParam(value = "page", defaultValue = "0") int page,
@RequestParam(value = "size", defaultValue = "10") int size) {
Pageable pa=new PageRequest(page, size);
ModelAndView mav = new ModelAndView("task/edittask");
// 得到链接中的任务id
String taskid = req.getParameter("id");
Long ltaskid = Long.parseLong(taskid);
// 通过任务id得到相应的任务
Tasklist task = tdao.findOne(ltaskid);
// 得到状态id
Long statusid = task.getStatusId().longValue();
// 得到类型id
Long typeid = task.getTypeId();
// 查看状态表
SystemStatusList status = sdao.findOne(statusid);
// 查询类型表
SystemTypeList type = tydao.findOne(typeid);
// 查询部门下面的员工
Page<User> pagelist = udao.findByFatherId(userId,pa);
List<User> emplist=pagelist.getContent();
// 查询部门表
Iterable<Dept> deptlist = ddao.findAll();
// 查职位表
Iterable<Position> poslist = pdao.findAll();
mav.addObject("type", type);
mav.addObject("status", status);
mav.addObject("emplist", emplist);
}
/**
* 最近邮件
*/
@RequestMapping("amail")
public String index3(HttpServletRequest req,@SessionAttribute("userId") Long userId,Model model,
@RequestParam(value = "page", defaultValue = "0") int page,
@RequestParam(value = "size", defaultValue = "10") int size) {
Pageable pa=new PageRequest(page, size);
User mu=udao.findOne(userId);
String mess=req.getParameter("title");
Page<Pagemail> pagelist=null;
Page<Inmaillist> pagemail=null;
List<Map<String, Object>> maillist=null;
if(("收件箱").equals(mess)){
//分页及查找
pagelist=mservice.recive(page, size, mu, null,mess);
maillist=mservice.mail(pagelist);
}else if(("发件箱").equals(mess)){
pagemail=mservice.inmail(page, size, mu, null,mess);
maillist=mservice.maillist(pagemail);
}else if(("草稿箱").equals(mess)){
pagemail=mservice.inmail(page, size,mu, null,mess);
maillist=mservice.maillist(pagemail);
}else{
//垃圾箱
//分页及查找
pagelist=mservice.recive(page, size, mu, null,mess);
maillist=mservice.mail(pagelist);
}
if(!Objects.isNull(pagelist)){
model.addAttribute("page", pagelist);
}else{
model.addAttribute("page", pagemail);
}
model.addAttribute("sort", "&title="+mess);
model.addAttribute("maillist",maillist);
model.addAttribute("url","mailtitle");
model.addAttribute("mess",mess);
return "mail/allmail";
}
/**
* 查看邮件
*/
@RequestMapping("smail")
uMap.put(user.getUserName(), null);
}
}
System.out.println("map"+uMap);
}
System.out.println(uListpage.getContent());
//记住开始时间和结束时间以及选择
model.addAttribute("starttime",starttime);
model.addAttribute("endtime", endtime);
model.addAttribute("choose", choose1);
model.addAttribute("uMap", uMap);
model.addAttribute("type", type);
model.addAttribute("status", status);
model.addAttribute("plans", plans);
model.addAttribute("plist", pList);
model.addAttribute("ulist", uListpage.getContent());
model.addAttribute("page", uListpage);
model.addAttribute("url", "realplantable");
}
}
public class AttendceController {
Logger log = LoggerFactory.getLogger(getClass());
@Autowired
AttendceDao attenceDao;
@Autowired
AttendceService attendceService;
@Autowired
UserDao uDao;
@Autowired
UserService userService;
@Autowired
TypeDao typeDao;
@Autowired
StatusDao statusDao;
List<Attends> alist;
List<User> uList;
Date start,end;
String month_;
// 格式转化导入
DefaultConversionService service = new DefaultConversionService();
// 考勤 前面的签到
@RequestMapping("singin")
public String Datag(HttpSession session, Model model, HttpServletRequest request) throws InterruptedException, UnknownHostException {
//首先获取ip
InetAddress ia=null;
ia=ia.getLocalHost();
String attendip=ia.getHostAddress();
// 时间规范
String start = "08:00:00", end = "17:00:00";
service.addConverter(new StringtoDate());
// 状态默认是正常
long typeId, statusId = 10;
Attends attends = null;
Long userId = Long.parseLong(session.getAttribute("userId") + "");
User user = uDao.findOne(userId);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date date = new Date();
String nowdate = sdf.format(date);
// 星期 判断该日期是星期几
SimpleDateFormat sdf3 = new SimpleDateFormat("EEEE");
// 截取时分
SimpleDateFormat sdf4 = new SimpleDateFormat("HH:mm");
// 截取时分秒
SimpleDateFormat sdf5 = new SimpleDateFormat("HH:mm:ss");
// 一周当中的星期几
String weekofday = sdf3.format(date);
// 时分
String hourmin = sdf4.format(date);
model.addAttribute("page", page2);
model.addAttribute("url", url);
model.addAttribute("name", name);
if(!StringUtils.isEmpty(manage)){
model.addAttribute("manage", "manage");
}
}
/**
* 超级管理员管理页面的controller,分页处理
* @return
*/
@RequestMapping("chattable")
public String chatTable(@RequestParam(value="page",defaultValue="0") int page,
@RequestParam(value="baseKey",required=false) String baseKey,
@RequestParam(value="type",required=false) String type,
@RequestParam(value="time",required=false) String time,
@RequestParam(value="visitnum",required=false) String visitnum,
@RequestParam(value="icon",required=false) String icon,
@SessionAttribute("userId") Long userId,Model model){
setSomething(baseKey, type, time, visitnum, icon, model);
Page<Discuss> page2=disService.paging(page, baseKey, 1L,type,time,visitnum);
setPagintMess(model, page2,"/chattable","manage","超级管理员");
return "chat/chattable";
}
/**
* 自己管理页面的controller,分页处理
* @return
*/
@RequestMapping("metable")
public String meTable(@RequestParam(value="page",defaultValue="0") int page,
@RequestParam(value="baseKey",required=false) String baseKey,
@RequestParam(value="type",required=false) String type,
@RequestParam(value="time",required=false) String time,
@RequestParam(value="visitnum",required=false) String visitnum,
@RequestParam(value="icon",required=false) String icon,
@SessionAttribute("userId") Long userId,Model model){
setSomething(baseKey, type, time, visitnum, icon, model);
Page<Discuss> page2=disService.pagingMe(page, baseKey, userId,type,time,visitnum);
setPagintMess(model, page2,"/metable","manage","我的管理");
return "chat/chattable";
}
@Autowired
private NoteDao noteDao;
@Autowired
private NoteService NoteService;
@Autowired
private CatalogDao catalogDao;
@Autowired
private CatalogService catalogService;
@Autowired
private TypeDao typeDao;
@Autowired
private StatusDao statusDao;
@Autowired
private UserDao userDao;
@Autowired
private AttachmentDao attDao;
@Autowired
private NoteUserDao noteUserDao;
@Autowired
private ProcessService pservice;
@Autowired
private DeptDao ddao;
@Autowired
private PositionDao pdao;
Attachment att;
List<Note> noteList;
List<Catalog> cataloglist=new ArrayList<Catalog>();
List<SystemTypeList> type;
List<SystemStatusList> status;
// 收藏查询
@RequestMapping("collectfind")
public String dsafdsf(Model model, HttpServletRequest request, @RequestParam("iscollect") String iscollected,@RequestParam("cata") Long cid,
HttpSession session,@RequestParam(value="page",defaultValue="0")int page,@RequestParam(value="baseKey",required=false)String baseKey
,@RequestParam(value = "type", required = false) String type,
@RequestParam(value = "status", required = false) String status,
@RequestParam(value = "time", required = false) String time,
@RequestParam(value = "icon", required = false) String icon
) {
if(cid==-2)
//查看用户并分页
Page<User> pageuser=udao.findAll(pa);
List<User> userlist=pageuser.getContent();
// 查询部门表
Iterable<Dept> deptlist = ddao.findAll();
// 查职位表
Iterable<Position> poslist = pdao.findAll();
model.addAttribute("page", pageuser);
model.addAttribute("emplist", userlist);
model.addAttribute("deptlist", deptlist);
model.addAttribute("poslist", poslist);
model.addAttribute("url", "names");
model.addAttribute("username", lu.getUserName());
model.addAttribute("harrylist", harrylist);
}
/**
* 存表
* @throws IOException
* @throws IllegalStateException
*/
public void index5(ProcessList pro,String val,User lu,MultipartFile filePath,String name) throws IllegalStateException, IOException{
pro.setTypeNmae(val);
pro.setApplyTime(new Date());
pro.setUserId(lu);
pro.setStatusId(23L);
pro.setShenuser(name);
Attachment attaid=null;
if(!StringUtil.isEmpty(filePath.getOriginalFilename())){
attaid=mservice.upload(filePath, lu);
attaid.setModel("aoa_bursement");
AttDao.save(attaid);
pro.setProFileid(attaid);
}
}
public void index8(ProcessList pro,String val,User lu,String name) {
pro.setTypeNmae(val);
pro.setApplyTime(new Date());
pro.setUserId(lu);
pro.setStatusId(23L);
pro.setShenuser(name);
}
/**
* 存主表
*/
public void save(Long proid,User u,Reviewed reviewed,ProcessList pro,User u2){
Reviewed re=redao.findByProIdAndUserId(proid,u);
re.setAdvice(reviewed.getAdvice());
model.addAttribute("mail", mail.size());
model.addAttribute("task", task.size());
model.addAttribute("user", user);
//展示用户操作记录 由于现在没有登陆 不能获取用户id
List<UserLog> userLogs=userLogDao.findByUser(userId);
req.setAttribute("userLogList", userLogs);
return "index/index";
}
/**
* 菜单查找
* @param userId
* @param req
* @return
*/
@RequestMapping("menucha")
public String menucha(HttpSession session, Model model,HttpServletRequest req){
Long userId = Long.parseLong(session.getAttribute("userId") + "");
User user=uDao.findOne(userId);
String val=null;
if(!StringUtils.isEmpty(req.getParameter("val"))){
val=req.getParameter("val");
}
if(!StringUtils.isEmpty(val)){
List<Rolemenu> oneMenuAll=rdao.findname(0L, user.getRole().getRoleId(), true, true, val);//找父菜单
List<Rolemenu> twoMenuAll=null;
for (int i = 0; i < oneMenuAll.size(); i++) {
twoMenuAll=rdao.findbyparentxianall(oneMenuAll.get(i).getMenuId(), user.getRole().getRoleId(), true, true);//找子菜单
}
req.setAttribute("oneMenuAll", oneMenuAll);
req.setAttribute("twoMenuAll", twoMenuAll);
}else{
menuService.findMenuSys(req,user);
}
return "common/leftlists";
}
@RequestMapping("userlogs")
public String usreLog(@SessionAttribute("userId") Long userId,HttpServletRequest req){
List<UserLog> userLogs=userLogDao.findByUser(userId);
req.setAttribute("userLogList", userLogs);
return "user/userlog";
}
Attachment attaid=null;
if(!StringUtil.isEmpty(filePath.getOriginalFilename())){
attaid=mservice.upload(filePath, lu);
attaid.setModel("aoa_bursement");
AttDao.save(attaid);
pro.setProFileid(attaid);
}
}
public void index8(ProcessList pro,String val,User lu,String name) {
pro.setTypeNmae(val);
pro.setApplyTime(new Date());
pro.setUserId(lu);
pro.setStatusId(23L);
pro.setShenuser(name);
}
/**
* 存主表
*/
public void save(Long proid,User u,Reviewed reviewed,ProcessList pro,User u2){
Reviewed re=redao.findByProIdAndUserId(proid,u);
re.setAdvice(reviewed.getAdvice());
re.setStatusId(reviewed.getStatusId());
re.setReviewedTime(new Date());
re.setStatusId(reviewed.getStatusId());
redao.save(re);
Reviewed re2=new Reviewed();
re2.setProId(pro);
re2.setUserId(u2);
re2.setStatusId(23L);
redao.save(re2);
pro.getShenuser();
pro.setShenuser(pro.getShenuser()+";"+u2.getUserName());
pro.setStatusId(24L);//改变主表的状态
prodao.save(pro);
}
/**
* 存审核表
*/
public void index7(User reuser,ProcessList pro){
Reviewed revie=new Reviewed();
revie.setUserId(reuser);
revie.setStatusId(23L);
revie.setProId(pro);
@RequestMapping(value="attendcelisttable",method=RequestMethod.GET)
public String testdf(HttpServletRequest request, Model model,HttpSession session,
@RequestParam(value = "page", defaultValue = "0") int page,
@RequestParam(value = "baseKey", required = false) String baseKey,
@RequestParam(value = "type", required = false) String type,
@RequestParam(value = "status", required = false) String status,
@RequestParam(value = "time", required = false) String time,
@RequestParam(value = "icon", required = false) String icon) {
signsortpaging(request, model, session, page, baseKey, type, status, time, icon);
return "attendce/attendcelisttable";
}
// 考勤管理某个管理员下面的所有员工的信息
@RequestMapping("attendceatt")
public String testdasf(HttpServletRequest request, HttpSession session,
@RequestParam(value = "page", defaultValue = "0") int page,
@RequestParam(value = "baseKey", required = false) String baseKey,
@RequestParam(value = "type", required = false) String type,
@RequestParam(value = "status", required = false) String status,
@RequestParam(value = "time", required = false) String time,
@RequestParam(value = "icon", required = false) String icon,Model model) {
allsortpaging(request, session, page, baseKey, type, status, time, icon, model);
return "attendce/attendceview";
}
// 分頁分页
@RequestMapping("attendcetable")
public String table(HttpServletRequest request, HttpSession session,
@RequestParam(value = "page", defaultValue = "0") int page,
@RequestParam(value = "baseKey", required = false) String baseKey,
@RequestParam(value = "type", required = false) String type,
@RequestParam(value = "status", required = false) String status,
@RequestParam(value = "time", required = false) String time,
@RequestParam(value = "icon", required = false) String icon,Model model) {
allsortpaging(request, session, page, baseKey, type, status, time, icon, model);
return "attendce/attendcetable";
}
// 删除
@RequestMapping("attdelete")
public String dsfa(HttpServletRequest request, HttpSession session) {
long aid = Long.valueOf(request.getParameter("aid"));
attendceService.delete(aid);
return "redirect:/attendceatt";
}
// 月报表
}
Page<Mailnumber> pagelist=mservice.index(page, size, tu, val,model);
List<Map<String, Object>> list=mservice.up(pagelist);
model.addAttribute("account", list);
model.addAttribute("page", pagelist);
model.addAttribute("url", "mailpaixu");
return "mail/mailtable";
}
/**
* 新增账号
* 修改账号
*/
@RequestMapping("addaccount")
public String add(@SessionAttribute("userId") Long userId, Model model,HttpServletRequest req){
// 通过用户id找用户
User tu = udao.findOne(userId);
Mailnumber mailn=null;
if(StringUtil.isEmpty(req.getParameter("id"))){
List<SystemTypeList> typelist=tydao.findByTypeModel("aoa_mailnumber");
List<SystemStatusList> statuslist=sdao.findByStatusModel("aoa_mailnumber");
model.addAttribute("typelist", typelist);
model.addAttribute("statuslist", statuslist);
if(!StringUtil.isEmpty((String) req.getAttribute("errormess"))){
mailn=(Mailnumber) req.getAttribute("mail");
req.setAttribute("errormess",req.getAttribute("errormess"));
model.addAttribute("mails", mailn);
model.addAttribute("type", tydao.findname(mailn.getMailType()));
model.addAttribute("status", sdao.findname(mailn.getStatus()));
}else if(!StringUtil.isEmpty((String) req.getAttribute("success"))){
mailn=(Mailnumber) req.getAttribute("mail");
req.setAttribute("success","fds");
model.addAttribute("mails", mailn);
model.addAttribute("type", tydao.findname(mailn.getMailType()));
model.addAttribute("status", sdao.findname(mailn.getStatus()));
}
}else{
Long id=Long.parseLong(req.getParameter("id"));
Mailnumber mailnum=mndao.findOne(id);
model.addAttribute("type", tydao.findname(mailnum.getMailType()));
model.addAttribute("status", sdao.findname(mailnum.getStatus()));
model.addAttribute("mails", mailnum);
}
model.addAttribute("username", tu.getUserName());
return "mail/addaccounts";
System.out.println("输入信息有误!");
}else{
//修改处理
if(!StringUtils.isEmpty(session.getAttribute("id"))){
Long disId=Long.parseLong(session.getAttribute("id")+"");
Discuss discuss=discussDao.findOne(disId);
//在此处判断一下是哪种类型,投票又不一样;
if(discuss.getTypeId()==21){
VoteList vote=discuss.getVoteList();
vote.setEndTime(voteList.getEndTime());
voteService.savaVoteList(vote);
System.out.println(discuss);
}
discuss.setModifyTime(new Date());
discuss.setTitle(menu.getTitle());
discuss.setContent(menu.getContent());
disService.save(discuss);
req.setAttribute("success", "成功了");
System.out.println("成功了");
return "forward:/chatmanage";
}else{
//新增处理
Long typeId=Long.parseLong(req.getParameter("typeId"));
if(menu.getTypeId()==21){
String[] title2=req.getParameterValues("votetitle");
String[] colors=req.getParameterValues("votecolor");
System.out.println(voteList);
Set<VoteTitles> voteTitles=new HashSet<>();
//处理投票标题
for (int i = 0; i < colors.length; i++) {
VoteTitles voteTitle=new VoteTitles();
voteTitle.setColor(colors[i]);
voteTitle.setTitle(title2[i]);
voteTitle.setVoteList(voteList);
voteTitles.add(voteTitle);
}
voteList.setVoteTitles(voteTitles); //将所有投票表格保存到投票对象中
// voteService.savaVoteList(voteList); //将投票信息保存到投票表中
menu.setVoteList(voteList); //将投票对象保存到讨论表中;
System.out.println("要开始进行投票处理了");
}
menu.setVisitNum(0);
menu.setUser(user);
menu.setCreateTime(new Date());
disService.save(menu);
req.setAttribute("success", "成功了");
System.out.println("成功了");
return "forward:/chatmanage";
// 判断是否共享
if (request.getParameter("receiver") != null && (request.getParameter("receiver").trim().length() > 0)) {
userss = new HashSet<>();
String receivers = request.getParameter("receiver");
note.setReceiver(receivers);
String[] receiver = receivers.split(";");
// 先绑定自己再
userss.add(user);
// 再绑定其他人
for (String re : receiver) {
System.out.println(re);
User user2 = userDao.findid(re);
if (user2 == null) {
} else
userss.add(user2);
}
} else {
// 保存为该用户的笔记 绑定用户id
userss = new HashSet<>();
userss.add(user);
}
NoteService.updatenote(catalogId, typeId, statusId, note2.getTitle(), note2.getContent(), nid);
}
request.setAttribute("success", "后台验证成功");
}
// 设置创建人
note.setCreatemanId(userid);
note.setUserss(userss);
noteDao.save(note);
request.setAttribute("note2", note2);
return "forward:/noteedit";
}
// 笔记批量删除
@RequestMapping("notesomedelete")
public String dsafds(HttpServletRequest request, HttpSession session) {
long realuserId = Long.valueOf(session.getAttribute("userId") + "");
String sum = request.getParameter("sum");
String[] strings = sum.split(";");
for (String s : strings) {
long noteids = Long.valueOf(s);
notedelete(realuserId, noteids);
}
return "redirect:/noteview";
}