Skip to content

Commit

Permalink
社区文件下架
Browse files Browse the repository at this point in the history
  • Loading branch information
Love-YeLin committed Apr 2, 2024
1 parent 31bc5a3 commit b68a916
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions biz/application/service/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -846,5 +846,15 @@ func (s *FileService) MakeFilePrivate(ctx context.Context, req *gencontent.MakeF
if _, err = s.FileMongoMapper.UpdateUnset(ctx, data, update); err != nil {
return resp, err
}

res, _ := sonic.Marshal(&message.DeleteFileRelationsMessage{
FromType: int64(gencontent.TargetType_UserType),
FromId: req.UserId,
ToType: int64(gencontent.TargetType_FileType),
})
if err2 := s.DeleteFileRelationKq.Push(pconvertor.Bytes2String(res)); err2 != nil {
return resp, err2
}

return resp, nil
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/CloudStriver/go-pkg v0.0.0-20240329084540-20ca37a52fea
github.com/CloudStriver/service-idl-gen-go v0.0.0-20240402021409-326abc356747
github.com/CloudStriver/service-idl-gen-go v0.0.0-20240402115528-0964d5751a70
github.com/bytedance/sonic v1.10.2
github.com/cloudwego/kitex v0.8.0
github.com/elastic/go-elasticsearch/v8 v8.11.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ github.com/CloudStriver/service-idl-gen-go v0.0.0-20240331132549-840abd6c662c h1
github.com/CloudStriver/service-idl-gen-go v0.0.0-20240331132549-840abd6c662c/go.mod h1:chtR82RvfrjUujTGWROSCNAwF9Lh/U959k34bXIDvBI=
github.com/CloudStriver/service-idl-gen-go v0.0.0-20240402021409-326abc356747 h1:+wHcqO0Mfk7UBKBXl0eD5ctjHTN08WpB71g0F9arBYQ=
github.com/CloudStriver/service-idl-gen-go v0.0.0-20240402021409-326abc356747/go.mod h1:chtR82RvfrjUujTGWROSCNAwF9Lh/U959k34bXIDvBI=
github.com/CloudStriver/service-idl-gen-go v0.0.0-20240402115528-0964d5751a70 h1:rL3mK+nM3aTgYqAxjz32C0A5kuvi07910bbyt37PuUM=
github.com/CloudStriver/service-idl-gen-go v0.0.0-20240402115528-0964d5751a70/go.mod h1:chtR82RvfrjUujTGWROSCNAwF9Lh/U959k34bXIDvBI=
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
Expand Down

0 comments on commit b68a916

Please sign in to comment.