Commit 501977fec240c1e841106350918256091c11b223
1 parent
14db6ea4
Exists in
master
提交
Showing
1 changed file
with
15 additions
and
1 deletions
Show diff stats
src/HttpServer/logic/httpserver.go
@@ -87,7 +87,21 @@ func ClearData(w http.ResponseWriter, r *http.Request) { | @@ -87,7 +87,21 @@ func ClearData(w http.ResponseWriter, r *http.Request) { | ||
87 | } | 87 | } |
88 | 88 | ||
89 | fmt.Fprint(w, "ClearData coin=%v",coin)*/ | 89 | fmt.Fprint(w, "ClearData coin=%v",coin)*/ |
90 | - err := mysql.DoClearData(uuidnum) | 90 | + |
91 | + //首先检查白名单 | ||
92 | + rkey := "CATCAFE_REDIS_CAN_RESETDATA_LIST" | ||
93 | + vv,err := redishandler.GetRedisClient().HGetAllValues(rkey) | ||
94 | + if err != nil { | ||
95 | + fmt.Fprint(w,"获取白名单失败!,请检查") | ||
96 | + } | ||
97 | + | ||
98 | + for _,val := range vv { | ||
99 | + bytestr := string(val.([]byte)) | ||
100 | + logger.Info("ClearData white list str=%v",bytestr) | ||
101 | + } | ||
102 | + return | ||
103 | + | ||
104 | + err = mysql.DoClearData(uuidnum) | ||
91 | if err != nil { | 105 | if err != nil { |
92 | fmt.Fprint(w, "清除数据失败了,错误码%v",err) | 106 | fmt.Fprint(w, "清除数据失败了,错误码%v",err) |
93 | } | 107 | } |