Пример #1
0
 /**
  * 字段保存
  *
  * @param tableColumn
  */
 @Transactional(readOnly = false)
 public void saveColumn(TableColumn tableColumn, boolean canChange) {
   tableColumn.setCompanyId(ContextUtils.getCompanyId());
   tableColumnDao.save(tableColumn);
   //		if(!canChange && !tableColumn.getDataTable().getExistedTable()){
   //			jdbcDao.addTableColumn(tableColumn.getDataTable().getTableName(), tableColumn);
   //		}
 }
Пример #2
0
 /**
  * 批量保存字段
  *
  * @param dataTable
  */
 @Transactional(readOnly = false)
 public void saveTableColumns(DataTable dataTable) {
   List<Object> list = JsonParser.getFormTableDatas(TableColumn.class);
   for (Object obj : list) {
     TableColumn column = (TableColumn) obj;
     column.setCompanyId(ContextUtils.getCompanyId());
     column.setDataTableId(dataTable.getId());
     tableColumnDao.save(column);
   }
 }