浏览代码

获取文档

xuzhiheng 4 年之前
父节点
当前提交
b91a739a05

+ 3 - 3
rpc/stdlib/internal/logic/docgetchecklogic.go

@@ -5,7 +5,7 @@ import (
 
 	"app.yhyue.com/moapp/jydocs/rpc/stdlib/internal/svc"
 	"app.yhyue.com/moapp/jydocs/rpc/stdlib/stdlib"
-
+	stdlibService "app.yhyue.com/moapp/jydocs/services/stdlib"
 	"github.com/tal-tech/go-zero/core/logx"
 )
 
@@ -25,6 +25,6 @@ func NewDocGetCheckLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DocGe
 
 func (l *DocGetCheckLogic) DocGetCheck(in *stdlib.DocGetCheckReq) (*stdlib.DocGetCheckResp, error) {
 	// todo: add your logic here and delete this line
-
-	return &stdlib.DocGetCheckResp{}, nil
+	res := stdlibService.DocGetCheck(in.DocId, in.UserId)
+	return &res, nil
 }

+ 3 - 3
rpc/stdlib/internal/logic/docgetcontentlogic.go

@@ -5,7 +5,7 @@ import (
 
 	"app.yhyue.com/moapp/jydocs/rpc/stdlib/internal/svc"
 	"app.yhyue.com/moapp/jydocs/rpc/stdlib/stdlib"
-
+	stdlibService "app.yhyue.com/moapp/jydocs/services/stdlib"
 	"github.com/tal-tech/go-zero/core/logx"
 )
 
@@ -25,6 +25,6 @@ func NewDocGetContentLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Doc
 
 func (l *DocGetContentLogic) DocGetContent(in *stdlib.DocGetCheckReq) (*stdlib.DocGetContentResp, error) {
 	// todo: add your logic here and delete this line
-
-	return &stdlib.DocGetContentResp{}, nil
+	res := stdlibService.DocGetContent(in.DocId, in.UserId)
+	return &res, nil
 }

+ 2 - 2
services/model/stdlib.go

@@ -1,6 +1,6 @@
 package model
 
-type UserMoneyRecord struct {
+type Doc struct {
 	Id               string `json:"id"`
 	UserId           string `json:"userId"`
 	DocName          string `json:"before"`
@@ -25,7 +25,7 @@ type UserMoneyRecord struct {
 	DocSummary       string `json:"docSummary"`
 }
 
-func (ud *UserMoneyRecord) TableName() string {
+func (ud *Doc) TableName() string {
 	return "doc"
 }