Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Xicheng Guo committed Jan 11, 2024
1 parent a268f56 commit f6cf6c9
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 f6cf6c9

Please sign in to comment.