Skip to content

how to get bitmap  #80

@lichcc

Description

@lichcc

使用redis做签到数据
/*
*redis
*setbit a 11 1
*使用下面的方法直接get key
*控制台返回 'value:: '
*直接返回数据,swagger里面显示返回的是一个特殊字符
*请教一下如何获取二进制的bitmap数据,不然获取签到数据要循环很多次肯定是不科学的
*/
public async getBitValue(key: string): Promise {
if (!this.client) {
await this.getClient();
}
const data = await this.client.get(key);
if (data) {
console.log('value:: ' + data);
return data;
} else {
return null;
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions