doccollectlogic.go 846 B

12345678910111213141516171819202122232425262728293031323334
  1. package logic
  2. import (
  3. "context"
  4. "app.yhyue.com/moapp/jydocs/rpc/userlib/internal/svc"
  5. "app.yhyue.com/moapp/jydocs/rpc/userlib/userlib"
  6. userLibService "app.yhyue.com/moapp/jydocs/services/userlib"
  7. "github.com/tal-tech/go-zero/core/logx"
  8. )
  9. type DocCollectLogic struct {
  10. ctx context.Context
  11. svcCtx *svc.ServiceContext
  12. logx.Logger
  13. }
  14. func NewDocCollectLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DocCollectLogic {
  15. return &DocCollectLogic{
  16. ctx: ctx,
  17. svcCtx: svcCtx,
  18. Logger: logx.WithContext(ctx),
  19. }
  20. }
  21. func (l *DocCollectLogic) DocCollect(in *userlib.UserCollectRequest) (*userlib.UserCollectResponse, error) {
  22. // todo: add your logic here and delete this line
  23. userLibService.UserDocCollect(in.UserId, in.DocId, in.SourceUserId)
  24. return &userlib.UserCollectResponse{
  25. Code:200,
  26. Message:"success",
  27. }, nil
  28. }