Esempio n. 1
0
 /**
  * @Description 修改
  *
  * @param entity
  * @return JsonResult
  * @author davidwan
  */
 public JsonResult modify(MeetingRoom entity) {
   int result = meetingRoomDao.updateEntity(entity);
   if (result > 0) {
     // 添加操作日志
     systemLogService.create(EnumLogModule.会议室管理.getValue(), "修改会议室", "修改会议室:" + entity.getName());
     return new JsonResult(true);
   } else {
     return new JsonResult(false);
   }
 }
Esempio n. 2
0
 /**
  * @Description 添加
  *
  * @param entity
  * @return JsonResult
  * @author davidwan
  */
 public JsonResult create(MeetingRoom entity) {
   Subject currentUser = SecurityUtils.getSubject();
   ShiroUser shiroUser = (ShiroUser) currentUser.getPrincipals().getPrimaryPrincipal();
   entity.setCreator_id(shiroUser.getId());
   entity.setCreate_time(new Date());
   // 若要获取id,请使用entity.getId();
   int result = meetingRoomDao.insertEntity(entity);
   if (result > 0) {
     // 添加操作日志
     systemLogService.create(EnumLogModule.会议室管理.getValue(), "添加会议室", "添加会议室:" + entity.getName());
     return new JsonResult(true);
   } else {
     return new JsonResult(false);
   }
 }