Skip to content

Commit

Permalink
增加incrby方法
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Nov 22, 2018
1 parent 824dcac commit a010b76
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions db/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a010b76

Please sign in to comment.