Skip to content

Commit

Permalink
Merge pull request #75 from GuoXiCheng/dev-c
Browse files Browse the repository at this point in the history
update
  • Loading branch information
GuoXiCheng authored Jan 11, 2024
2 parents d1871f7 + f6cf6c9 commit 96846be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/repository-lib/base/base-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,15 @@ export abstract class BaseRepository<T extends BaseModel> {

// 序列化: 将对象转换为字符串
protected serialize<T>(obj: T): string {
console.log(obj);
return (this.useEncrypt && this.encryptFn)
? this.encryptFn(JSON.stringify(obj))
: JSON.stringify(obj);
}

// 反序列化: 将字符串转换为对象
protected deserialize<T>(comment: BaseComment): T {
console.log(comment);
if (comment.body == null) {
console.error(comment);
}
Expand Down

0 comments on commit 96846be

Please sign in to comment.