docpermanentdeletelogic.go 1008 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package logic
  2. import (
  3. "app.yhyue.com/moapp/jy_docs/rpc/userlib/internal/svc"
  4. "app.yhyue.com/moapp/jy_docs/rpc/userlib/userlib"
  5. userLibService "app.yhyue.com/moapp/jy_docs/services/userlib"
  6. "context"
  7. "github.com/tal-tech/go-zero/core/logx"
  8. )
  9. type DocPermanentDeleteLogic struct {
  10. ctx context.Context
  11. svcCtx *svc.ServiceContext
  12. logx.Logger
  13. }
  14. func NewDocPermanentDeleteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DocPermanentDeleteLogic {
  15. return &DocPermanentDeleteLogic{
  16. ctx: ctx,
  17. svcCtx: svcCtx,
  18. Logger: logx.WithContext(ctx),
  19. }
  20. }
  21. func (l *DocPermanentDeleteLogic) DocPermanentDelete(in *userlib.UserRecoveryRequest) (*userlib.UserCollectResponse, error) {
  22. // todo: add your logic here and delete this line
  23. result := &userlib.UserCollectResponse{}
  24. code,msg:= userLibService.UserDocPermanentDelete(in.UserDocId,in.AppId,in.UserId)
  25. if code {
  26. result.Code = 1
  27. result.Message = msg
  28. return result,nil
  29. }
  30. result.Code = 0
  31. result.Message = msg
  32. return result, nil
  33. }