|
|
|
@ -4,6 +4,7 @@ import (
|
|
|
|
|
"dsBaseRpc/Const/ErrorConst"
|
|
|
|
|
"dsBaseRpc/Utils/ConfigUtil"
|
|
|
|
|
"dsBaseRpc/Utils/LogUtil"
|
|
|
|
|
"fmt"
|
|
|
|
|
"github.com/go-redis/redis/v7"
|
|
|
|
|
"time"
|
|
|
|
|
)
|
|
|
|
@ -61,7 +62,10 @@ func SET(key string, value string, ttl time.Duration) {
|
|
|
|
|
功能:将指定的键值增加
|
|
|
|
|
*/
|
|
|
|
|
func IncrBy(key string, value int64) int64 {
|
|
|
|
|
c, _ := RedisClient.IncrBy(key, value).Result()
|
|
|
|
|
c, err := RedisClient.IncrBy(key, value).Result()
|
|
|
|
|
if err!=nil{
|
|
|
|
|
fmt.Println(err.Error())
|
|
|
|
|
}
|
|
|
|
|
return c
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|