xuzhiheng 4 lat temu
rodzic
commit
cc19b26fe2

+ 1 - 1
rpc/stdlib/internal/logic/docactivitylogic.go

@@ -32,7 +32,7 @@ func (l *DocActivityLogic) DocActivity(in *stdlib.DocActivityReq) (*stdlib.DocAc
 		pageNum = 0
 	}
 	res, count := stdlibService.DocActivityList(int(in.PageSize), pageNum, int(in.ActivityId), in.AppId)
-	docActivityResp := &stdlib.DocActivityResp{Code: 0, Msg: "ok", Total: int32(count)}
+	docActivityResp := &stdlib.DocActivityResp{Code: 1, Msg: "ok", Total: int32(count)}
 	log.Println("res ", res)
 	log.Println("count ", count)
 	for _, v := range res {

+ 4 - 4
services/stdlib/docGet.go

@@ -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
 		}