@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); } } }
/** * 根据查询参数获取记录列表 * * @return */ public List<CellMenuList> getCellMenuLists(Map<String, Object> parameter) { return cellMenuListMapper.getCellMenuLists(parameter); }
public CellMenuList getCellMenuList(String id) { CellMenuList cellMenuList = cellMenuListMapper.getCellMenuListById(id); return cellMenuList; }
/** * 根据查询参数获取记录总数 * * @return */ public int getCellMenuListCountByQueryCriteria(CellMenuListQuery query) { return cellMenuListMapper.getCellMenuListCountByQueryCriteria(query); }
/** * 根据查询参数获取记录总数 * * @return */ public int getCellMenuListCount(Map<String, Object> parameter) { return cellMenuListMapper.getCellMenuListCount(parameter); }
public List<CellMenuList> list(CellMenuListQuery query) { query.ensureInitialized(); List<CellMenuList> list = cellMenuListMapper.getCellMenuListsByQueryCriteria(query); return list; }
public int count(CellMenuListQuery query) { query.ensureInitialized(); return cellMenuListMapper.getCellMenuListCountByQueryCriteria(query); }
@Transactional public void deleteById(String id) { cellMenuListMapper.deleteCellMenuListById(id); }