|
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.zhongzheng.common.constant.Constants;
|
|
import com.zhongzheng.common.constant.Constants;
|
|
import com.zhongzheng.common.constant.GenConstants;
|
|
import com.zhongzheng.common.constant.GenConstants;
|
|
import com.zhongzheng.common.exception.CustomException;
|
|
import com.zhongzheng.common.exception.CustomException;
|
|
|
|
+import com.zhongzheng.common.utils.DateUtils;
|
|
import com.zhongzheng.common.utils.SecurityUtils;
|
|
import com.zhongzheng.common.utils.SecurityUtils;
|
|
import com.zhongzheng.common.utils.file.FileUtils;
|
|
import com.zhongzheng.common.utils.file.FileUtils;
|
|
import com.zhongzheng.generator.domain.GenTable;
|
|
import com.zhongzheng.generator.domain.GenTable;
|
|
@@ -131,6 +132,7 @@ public class GenTableServiceImpl extends ServiceImpl<GenTableMapper, GenTable> i
|
|
.set(cenTableColumn.getIsEdit() == null, GenTableColumn::getIsEdit, null)
|
|
.set(cenTableColumn.getIsEdit() == null, GenTableColumn::getIsEdit, null)
|
|
.set(cenTableColumn.getIsList() == null, GenTableColumn::getIsList, null)
|
|
.set(cenTableColumn.getIsList() == null, GenTableColumn::getIsList, null)
|
|
.set(cenTableColumn.getIsQuery() == null, GenTableColumn::getIsQuery, null)
|
|
.set(cenTableColumn.getIsQuery() == null, GenTableColumn::getIsQuery, null)
|
|
|
|
+ .set(GenTableColumn::getUpdateTime, DateUtils.getNowDate())
|
|
.eq(GenTableColumn::getColumnId,cenTableColumn.getColumnId()));
|
|
.eq(GenTableColumn::getColumnId,cenTableColumn.getColumnId()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -169,6 +171,7 @@ public class GenTableServiceImpl extends ServiceImpl<GenTableMapper, GenTable> i
|
|
List<GenTableColumn> genTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName);
|
|
List<GenTableColumn> genTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName);
|
|
for (GenTableColumn column : genTableColumns) {
|
|
for (GenTableColumn column : genTableColumns) {
|
|
GenUtils.initColumnField(column, table);
|
|
GenUtils.initColumnField(column, table);
|
|
|
|
+ column.setCreateTime(DateUtils.getNowDate());
|
|
genTableColumnMapper.insert(column);
|
|
genTableColumnMapper.insert(column);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -446,4 +449,4 @@ public class GenTableServiceImpl extends ServiceImpl<GenTableMapper, GenTable> i
|
|
}
|
|
}
|
|
return genPath + File.separator + VelocityUtils.getFileName(template, table);
|
|
return genPath + File.separator + VelocityUtils.getFileName(template, table);
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+}
|