コード例 #1
0
 @Transactional
 public void save(CellMenuList cellMenuList) {
   if (StringUtils.isEmpty(cellMenuList.getId())) {
     cellMenuList.setId(idGenerator.getNextId());
     // cellMenuList.setId(idGenerator.getNextId());
     // cellMenuList.setCreateDate(new Date());
     cellMenuListMapper.insertCellMenuList(cellMenuList);
   } else {
     CellMenuList model = this.getCellMenuList(cellMenuList.getId());
     if (model != null) {
       if (cellMenuList.getTopid() != null) {
         model.setTopid(cellMenuList.getTopid());
       }
       model.setIndexId(cellMenuList.getIndexId());
       cellMenuListMapper.updateCellMenuList(model);
     }
   }
 }
コード例 #2
0
 @Transactional
 public boolean create(SysApplication bean) {
   boolean ret = false;
   if (bean.getId() == 0) {
     bean.setId(idGenerator.nextId());
   }
   if (StringUtils.isEmpty(bean.getCode())) {
     bean.setCode("app_" + bean.getId());
   }
   if (bean.getNode() != null) {
     bean.getNode().setCode(bean.getCode());
     bean.getNode().setDiscriminator("A");
     bean.getNode().setCreateBy(bean.getCreateBy());
     sysTreeService.create(bean.getNode());
     bean.setNodeId(bean.getNode().getId());
   }
   bean.setSort((int) bean.getId()); // 设置排序号为刚插入的id值
   bean.setCreateDate(new Date());
   sysApplicationMapper.insertSysApplication(bean);
   ret = true;
   return ret;
 }
コード例 #3
0
 @Transactional
 public void save(CellUpicInfo cellUpicInfo) {
   if (StringUtils.isEmpty(cellUpicInfo.getId())) {
     cellUpicInfo.setId(idGenerator.getNextId());
     // cellUpicInfo.setId(idGenerator.getNextId());
     // cellUpicInfo.setCreateDate(new Date());
     cellUpicInfoMapper.insertCellUpicInfo(cellUpicInfo);
   } else {
     CellUpicInfo model = this.getCellUpicInfo(cellUpicInfo.getId());
     if (model != null) {
       if (cellUpicInfo.getTopid() != null) {
         model.setTopid(cellUpicInfo.getTopid());
       }
       model.setIndexId(cellUpicInfo.getIndexId());
       if (cellUpicInfo.getTaskId() != null) {
         model.setTaskId(cellUpicInfo.getTaskId());
       }
       model.setPfileflag(cellUpicInfo.getPfileflag());
       if (cellUpicInfo.getFiledotFileid() != null) {
         model.setFiledotFileid(cellUpicInfo.getFiledotFileid());
       }
       model.setListno(cellUpicInfo.getListno());
       model.setChktotal(cellUpicInfo.getChktotal());
       model.setChkresult(cellUpicInfo.getChkresult());
       if (cellUpicInfo.getPfileId() != null) {
         model.setPfileId(cellUpicInfo.getPfileId());
       }
       if (cellUpicInfo.getUserid() != null) {
         model.setUserid(cellUpicInfo.getUserid());
       }
       model.setRefillflag(cellUpicInfo.getRefillflag());
       model.setGroupid(cellUpicInfo.getGroupid());
       if (cellUpicInfo.getOldId() != null) {
         model.setOldId(cellUpicInfo.getOldId());
       }
       model.setRoleId(cellUpicInfo.getRoleId());
       model.setIsfinish(cellUpicInfo.getIsfinish());
       if (cellUpicInfo.getTagnum() != null) {
         model.setTagnum(cellUpicInfo.getTagnum());
       }
       if (cellUpicInfo.getCtime() != null) {
         model.setCtime(cellUpicInfo.getCtime());
       }
       if (cellUpicInfo.getTname() != null) {
         model.setTname(cellUpicInfo.getTname());
       }
       model.setPage(cellUpicInfo.getPage());
       if (cellUpicInfo.getDuty() != null) {
         model.setDuty(cellUpicInfo.getDuty());
       }
       if (cellUpicInfo.getThematic() != null) {
         model.setThematic(cellUpicInfo.getThematic());
       }
       if (cellUpicInfo.getAnnotations() != null) {
         model.setAnnotations(cellUpicInfo.getAnnotations());
       }
       model.setTypeIndexId(cellUpicInfo.getTypeIndexId());
       if (cellUpicInfo.getTypeId() != null) {
         model.setTypeId(cellUpicInfo.getTypeId());
       }
       cellUpicInfoMapper.updateCellUpicInfo(model);
     }
   }
 }