소스 검색

用户动态数修改

wuyi 2 년 전
부모
커밋
3110cfcc99
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/moments/moments.service.ts

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

@@ -165,6 +165,9 @@ export class MomentsService {
             setTimeout(async () => {
             setTimeout(async () => {
                 moments.isDel = false
                 moments.isDel = false
                 await this.momentsRepository.save(moments)
                 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)
             }, hours * 60 * 60 * 1000 + minutes * 60 * 1000)
         })
         })
     }
     }