增加新特性,并修复一些问题

This commit is contained in:
LLLLancelot
2020-02-28 04:03:08 +08:00
parent 2bd6daaf8d
commit 9e60d56227
17 changed files with 176 additions and 131 deletions

View File

@@ -60,6 +60,18 @@ func (m *mysqlModel) GetPkgName() string {
func getPackageInfo(orm *mysqldb.MySqlDB, info *model.DBInfo) {
tabls := getTables(orm) // get table and notes
if m := config.GetTableList(); len(m) > 0 {
// 制定了表之后
newTabls := make(map[string]string)
for t := range m {
if notes, ok := tabls[t]; ok {
newTabls[t] = notes
} else {
fmt.Printf("table: %s not found in db\n", t)
}
}
tabls = newTabls
}
for tabName, notes := range tabls {
var tab model.TabInfo
tab.Name = tabName