Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8afd00ff86 | |||
| 8992fd6d3a |
@@ -675,11 +675,15 @@ var TptProject = Proj{
|
|||||||
where := Map{"name": name}
|
where := Map{"name": name}
|
||||||
if that.MakeCodeRouter[hotimeName].TableColumns[fileConfig.GetString("table")]["phone"] != nil {
|
if that.MakeCodeRouter[hotimeName].TableColumns[fileConfig.GetString("table")]["phone"] != nil {
|
||||||
where["phone"] = name
|
where["phone"] = name
|
||||||
where = Map{"AND": Map{"OR": where, "password": Md5(password)}}
|
where = Map{"OR": where, "password": Md5(password)}
|
||||||
} else {
|
} else {
|
||||||
where["password"] = Md5(password)
|
where["password"] = Md5(password)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(where) > 1 {
|
||||||
|
where = Map{"AND": where}
|
||||||
|
}
|
||||||
|
|
||||||
user := that.Db.Get(fileConfig.GetString("table"), "*", where)
|
user := that.Db.Get(fileConfig.GetString("table"), "*", where)
|
||||||
|
|
||||||
if user == nil {
|
if user == nil {
|
||||||
@@ -776,16 +780,24 @@ var TptProject = Proj{
|
|||||||
name = v2.GetString("table")
|
name = v2.GetString("table")
|
||||||
}
|
}
|
||||||
if v2["auth"] != nil {
|
if v2["auth"] != nil {
|
||||||
newAuth := Slice{}
|
|
||||||
for k3, _ := range linkAuth.GetSlice(name) {
|
|
||||||
v3 := linkAuth.GetSlice(name).GetString(k3)
|
|
||||||
if strings.Contains(v2.GetString("auth"), v3) {
|
|
||||||
newAuth = append(newAuth, v3)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
linkAuth[name] = newAuth
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if linkAuth[name] == nil {
|
||||||
|
linkAuth[name] = v2["auth"]
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
newAuth := Slice{}
|
||||||
|
for k3, _ := range linkAuth.GetSlice(name) {
|
||||||
|
v3 := linkAuth.GetSlice(name).GetString(k3)
|
||||||
|
if strings.Contains(v2.GetString("auth"), v3) {
|
||||||
|
newAuth = append(newAuth, v3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
linkAuth[name] = newAuth
|
||||||
|
continue
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,9 +23,9 @@
|
|||||||
],
|
],
|
||||||
"db": {
|
"db": {
|
||||||
"mysql": {
|
"mysql": {
|
||||||
"host": "192.168.6.253",
|
"host": "192.168.2.20",
|
||||||
"name": "dgs-cms",
|
"name": "gov_crawler",
|
||||||
"password": "dasda8454456",
|
"password": "fh22y8b882d",
|
||||||
"port": "3306",
|
"port": "3306",
|
||||||
"prefix": "",
|
"prefix": "",
|
||||||
"user": "root"
|
"user": "root"
|
||||||
|
|||||||
Reference in New Issue
Block a user