diff --git a/src/database/repositories/common-configuration.repository.ts b/src/database/repositories/common-configuration.repository.ts index 7c1efec..6ea6d79 100644 --- a/src/database/repositories/common-configuration.repository.ts +++ b/src/database/repositories/common-configuration.repository.ts @@ -8,13 +8,13 @@ import { CommonConfig } from '../../modules/crawler/entities/common-config.entit export class CommonConfigRepository extends BaseRepository { protected alias: ETableName = ETableName.COMMON_CONFIGURATION; - public async getCommonConfig() { + public getCommonConfig() { return this.createQueryBuilder(`${this.alias}`) .select([`${this.alias}.id`, `${this.alias}.tip`, `${this.alias}.dailyQuota`, `${this.alias}.asset`]) .getOne(); } - public async updateCommonConfig(id: number, updateConfig) { + public updateCommonConfig(id: number, updateConfig) { return this.createQueryBuilder(`${this.alias}`) .update(CommonConfig) .set(updateConfig) diff --git a/src/database/repositories/event-log.repository.ts b/src/database/repositories/event-log.repository.ts index 8fcb433..795e1dd 100644 --- a/src/database/repositories/event-log.repository.ts +++ b/src/database/repositories/event-log.repository.ts @@ -72,7 +72,9 @@ export class EventLogRepository extends BaseRepository { public async getHistoriesOfUser(address: string, options) { const queryBuilder = this.createQb(); queryBuilder - .where(`${this.alias}.sender_address = :address OR ${this.alias}.receive_address = :address`, { address }) + .where(`LOWER(${this.alias}.sender_address) = :address OR LOWER(${this.alias}.receive_address) = :address`, { + address: address.toLowerCase(), + }) .orderBy(`${this.alias}.id`, EDirection.DESC) .select([ `${this.alias}.id`,