|
|
@@ -121,7 +121,7 @@ func buildSQL(datas []interface{}, parentCode string, level int) string {
|
|
|
// 递归
|
|
|
sub := data["children"].([]interface{})
|
|
|
if len(sub) > 0 {
|
|
|
- sql += buildSQL(data["children"].([]interface{}), data["code"].(string), level+1)
|
|
|
+ sql += buildSQL(data["children"].([]interface{}), data["rulekey"].(string), level+1)
|
|
|
}
|
|
|
|
|
|
if level == 1 {
|
|
|
@@ -167,10 +167,10 @@ func buildPCWEBSQL(datas []interface{}, parentCode string, level int) string {
|
|
|
|
|
|
// 递归
|
|
|
if data["auth"] != nil {
|
|
|
- sql += buildPCWEBSQL(data["auth"].([]interface{}), data["code"].(string), level+1)
|
|
|
+ sql += buildPCWEBSQL(data["auth"].([]interface{}), data["rulekey"].(string), level+1)
|
|
|
}
|
|
|
if data["children"] != nil {
|
|
|
- sql += buildPCWEBSQL(data["children"].([]interface{}), data["code"].(string), level+1)
|
|
|
+ sql += buildPCWEBSQL(data["children"].([]interface{}), data["rulekey"].(string), level+1)
|
|
|
}
|
|
|
|
|
|
if level == 1 {
|