|
@@ -25,7 +25,7 @@ func DocGetCheck(docId, userId, appId string) stdlib.DocGetCheckResp {
|
|
|
docStatistics := map[string]interface{}{}
|
|
|
jyDocsRpcUtil.GetJyDocsDB().Table("doc_statistics").Where("docId = ? and appId = ?", docId, appId).First(&docStatistics)
|
|
|
docCheck := stdlib.DocGetCheckResp{
|
|
|
- Code: 0,
|
|
|
+ Code: 1,
|
|
|
Msg: "ok",
|
|
|
IsBuy: isbuy,
|
|
|
DocDeail: &stdlib.DocInfo{
|
|
@@ -45,12 +45,12 @@ func DocGetCheck(docId, userId, appId string) stdlib.DocGetCheckResp {
|
|
|
}
|
|
|
return docCheck
|
|
|
}
|
|
|
- return stdlib.DocGetCheckResp{Code: -1, Msg: "查询失败"}
|
|
|
+ return stdlib.DocGetCheckResp{Code: 0, Msg: "查询失败"}
|
|
|
}
|
|
|
|
|
|
func DocGetContent(docId, userId, bucketName, appId string) stdlib.DocGetContentResp {
|
|
|
doc := &model.Doc{}
|
|
|
- docContent := stdlib.DocGetContentResp{Code: -1, Msg: "查询失败"}
|
|
|
+ docContent := stdlib.DocGetContentResp{Code: 0, Msg: "查询失败"}
|
|
|
jyDocsRpcUtil.GetJyDocsDB().Where("id = ? and appId = ?", docId, appId).Find(doc)
|
|
|
if doc.DocName != "" {
|
|
|
file := filesystem.LoadFileReq{
|
|
@@ -59,7 +59,7 @@ func DocGetContent(docId, userId, bucketName, appId string) stdlib.DocGetContent
|
|
|
}
|
|
|
res, err := jyDocsRpcUtil.FileSystem.GetFile(context.Background(), &file)
|
|
|
if err == nil {
|
|
|
- docContent.Code = 0
|
|
|
+ docContent.Code = 1
|
|
|
docContent.Msg = "ok"
|
|
|
docContent.DocContent = res.RawFileContent
|
|
|
}
|