diff --git a/dsBaseRpc/Tools/SystemAccount/SystemAccount.go b/dsBaseRpc/Tools/SystemAccount/SystemAccount.go index 5f9b595a..26a47a08 100644 --- a/dsBaseRpc/Tools/SystemAccount/SystemAccount.go +++ b/dsBaseRpc/Tools/SystemAccount/SystemAccount.go @@ -339,6 +339,8 @@ func main() { //增加超级管理员 AddSuperManager() + _ProvinceMap := make(map[string]string, 0) + sql = "select * from t_gov_area" list, _ := db.SQL(sql).Query().List() //1、提取所有的省 @@ -379,8 +381,7 @@ func main() { //生成省教育厅管理员 AddWardManager(organization.OrgId, organization.OrgName, organization.AreaCode) - - //放入省map + //吉林省教育厅的ORG_ID _ProvinceMap[list[i]["area_code"].(string)] = shengId fmt.Printf("生成省:%s\n", list[i]["area_name"].(string)) @@ -443,7 +444,7 @@ func main() { organization.Lxdh = "" organization.MainSchoolId = "" organization.MainSchoolType = -1 - organization.OrgCode = CommonUtil.GetUUID()[0:30] + organization.OrgCode = CommonUtil.GetUUID()[0:30] organization.OrgLat = 0 organization.OrgLng = 0 organization.ParentId = Const.ZeroGuid @@ -466,7 +467,7 @@ func main() { } //每个批次的大小 - var batchSize =50 + var batchSize = 50 //批量插入1 var t1 = make([]models.TBaseOrganization, 0) @@ -533,13 +534,13 @@ func main() { | max_allowed_packet | 16777216 | +--------------------+----------+ 1 row in set (0.002 sec) - */ + */ //max_allowed_packet /* - 修改方法: - vi /etc/my.cnf.d/server.cnf - [mysqld] - max_allowed_packet = 1G + 修改方法: + vi /etc/my.cnf.d/server.cnf + [mysqld] + max_allowed_packet = 1G */ //恢复外键约束