部分判断优化

Signed-off-by: 勤快的小晴同学 <941403820@qq.com>
This commit is contained in:
勤快的小晴同学
2024-03-11 01:50:13 +00:00
committed by Gitee
parent bb0ec5a25a
commit 0d3bae0001
6 changed files with 17 additions and 47 deletions

View File

@@ -25,9 +25,5 @@ func DelDeviceEtoken(key string) error {
func ExistsDeviceEtoken(key string) bool {
exists, _ := RedisDb.Exists(RedisDb.Context(), key).Result()
if exists == 1 {
return true
} else {
return false
}
return exists == 1
}