This commit is contained in:
xxjwxc
2020-02-29 00:19:25 +08:00
parent 73c399165e
commit ce3904575d
11 changed files with 132 additions and 80 deletions

View File

@@ -60,18 +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
}
// 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