Procházet zdrojové kódy

fix:附件上传修改

xmy před 3 roky
rodič
revize
b513c535c2

+ 2 - 1
api/etc/info-api.yaml

@@ -21,6 +21,7 @@ Consumer:
     Hosts:
       - 127.0.0.1:2379
     Key: consumer.rpc
+  Timeout: 10000
 AppId: 10000
 MaxBytes: 2097152
-Timeout:  5000
+Timeout:  500000

+ 1 - 0
api/internal/logic/infoexaminelogic.go

@@ -33,6 +33,7 @@ func (l *InfoExamineLogic) InfoExamine(req *types.InfoExamineReq) (resp *types.C
 		ReviewStatus: req.ReviewStatus,
 		ReviewDetail: req.ReviewDetail,
 		MsgType:      req.MsgType,
+		ReviewName:   req.Auditor,
 	})
 	if err0 != nil {
 		return &types.CommonRes{

+ 6 - 8
api/internal/logic/uploadlogic.go

@@ -1,17 +1,14 @@
 package logic
 
 import (
-	"context"
-	"io/ioutil"
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumer"
-	"net/http"
-
-	"app.yhyue.com/moapp/jybase/common"
-
 	"app.yhyue.com/moapp/jyInfo/api/internal/svc"
 	"app.yhyue.com/moapp/jyInfo/api/internal/types"
-
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumer"
+	"app.yhyue.com/moapp/jybase/common"
+	"context"
 	"github.com/zeromicro/go-zero/core/logx"
+	"io/ioutil"
+	"net/http"
 )
 
 type UploadLogic struct {
@@ -42,6 +39,7 @@ func (l *UploadLogic) Upload(req *types.UploadReq) (resp *types.CommonRes, err e
 		return &types.CommonRes{
 			Err_code: -1,
 			Err_msg:  "错误",
+			Data:     err0,
 		}, nil
 	}
 	return &types.CommonRes{

+ 1 - 0
api/internal/types/types.go

@@ -74,6 +74,7 @@ type InfoExamineReq struct {
 	ReviewStatus int64  `json:"reviewStatus"`
 	ReviewDetail string `json:"reviewDetail,optional"`
 	MsgType      int64  `json:"msgType"`
+	Auditor      string `json:"auditor"`
 }
 
 type AssProjecctReq struct {

+ 1 - 0
api/jyinfo.api

@@ -67,6 +67,7 @@ type (
 		ReviewStatus int64  `json:"reviewStatus"`
 		ReviewDetail string `json:"reviewDetail,optional"`
 		MsgType      int64  `json:"msgType"`
+		Auditor      string `json:"auditor"`
 	}
 	assProjecctReq {
 		UserId  string `json:"userId"`

+ 1 - 0
rpc/consumer/etc/consumer.yaml

@@ -8,6 +8,7 @@ Etcd:
     - 127.0.0.1:2379
   Key: consumer.rpc
 Webrpcport: 8013
+Timeout:  10000
 MysqlMain:
   dbName: base_service
   address: 192.168.3.11:3366

+ 3 - 4
rpc/consumer/internal/logic/infofileuploadlogic.go

@@ -1,15 +1,14 @@
 package logic
 
 import (
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumer"
 	IC "app.yhyue.com/moapp/jyInfo/rpc/consumer/init"
+	"app.yhyue.com/moapp/jyInfo/rpc/consumer/internal/svc"
 	model "app.yhyue.com/moapp/jyInfo/rpc/model/oss"
 	"bytes"
 	"context"
 	"strings"
 
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/consumer"
-	"app.yhyue.com/moapp/jyInfo/rpc/consumer/internal/svc"
-
 	mc "app.yhyue.com/moapp/jybase/common"
 	"github.com/zeromicro/go-zero/core/logx"
 )
@@ -48,7 +47,7 @@ func (l *InfoFileUploadLogic) InfoFileUpload(in *consumer.InfoFileUploadReq) (*c
 		}
 		data.Ftype = ftype
 		resp.Data = &data
-		return &resp, err
+		return &resp, nil
 	}
 	resp.ErrCode = -1
 	resp.ErrMsg = "上传失败"