Browse Source

用户动态数修改

wuyi 3 years ago
parent
commit
3110cfcc99
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/moments/moments.service.ts

+ 3 - 0
src/moments/moments.service.ts

@@ -165,6 +165,9 @@ export class MomentsService {
             setTimeout(async () => {
                 moments.isDel = false
                 await this.momentsRepository.save(moments)
+                const chatRole = await this.chatRoleRepository.findOneBy({ id: moments.userId })
+                chatRole.dynamicNumber += 1
+                await this.chatRoleRepository.save(chatRole)
             }, hours * 60 * 60 * 1000 + minutes * 60 * 1000)
         })
     }