Commit 1c85643ca115bf8599b19f514693497a107ce4b0
1 parent
2be91915
Exists in
master
提交清号接口
Showing
1 changed file
with
13 additions
and
1 deletions
Show diff stats
src/HttpServer/logic/httpserver.go
| ... | ... | @@ -261,10 +261,22 @@ func ClearData(w http.ResponseWriter, r *http.Request) { |
| 261 | 261 | //存在,即删除 |
| 262 | 262 | err = redishandler.GetRedisClient().Delete(rediskey) |
| 263 | 263 | if err != nil { |
| 264 | - fmt.Fprint(w, "清除数据失败了,错误码%v",err) | |
| 264 | + fmt.Fprint(w, "清除数据失败了1,错误码%v",err) | |
| 265 | 265 | } |
| 266 | 266 | } |
| 267 | 267 | |
| 268 | + | |
| 269 | + rediskey1 := "cat:cafe:data_new:where:data_uid:" + uuid | |
| 270 | + exist,_ = redishandler.GetRedisClient().Exists(rediskey) | |
| 271 | + if exist { | |
| 272 | + //存在,即删除 | |
| 273 | + err = redishandler.GetRedisClient().Delete(rediskey1) | |
| 274 | + if err != nil { | |
| 275 | + fmt.Fprint(w, "清除数据失败了2,错误码%v",err) | |
| 276 | + } | |
| 277 | + } | |
| 278 | + | |
| 279 | + | |
| 268 | 280 | fmt.Fprint(w, "清除数据成功了,恭喜!uuid=%v",uuid) |
| 269 | 281 | //将id从白名单删除 |
| 270 | 282 | redishandler.GetRedisClient().HDel(rkey,uuid) | ... | ... |