From a010b766045e3b8ccb6f1b64e39d9e4b79e72eb6 Mon Sep 17 00:00:00 2001 From: "lukang@cmcm.com" Date: Thu, 22 Nov 2018 15:45:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0incrby=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/redis.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/db/redis.go b/db/redis.go index a152caf..865695c 100644 --- a/db/redis.go +++ b/db/redis.go @@ -769,6 +769,17 @@ func (this *RedisDao) INCRRET(key string) (num int, err error) { } return } + +func (this *RedisDao) INCRBY(key string,num int64) (err error) { + conn := this.redisPool.Get() + defer conn.Close() + _, err = conn.Do("INCRBY", key,num) + if err != nil { + return + } + return +} + func (this *RedisDao) SETBIT(key string, bit, value int) (ret int, err error) { conn := this.redisPool.Get() defer conn.Close()