Merge branch 'develop' of https://gitee.com/fusenpack/fusenapi into feature/auth
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
Name: product
|
||||
Host: localhost
|
||||
Port: 9908
|
||||
<<<<<<< HEAD
|
||||
ReplicaId: 50
|
||||
=======
|
||||
Timeout: 15000 #服务超时时间
|
||||
>>>>>>> ac1800bb26ce44fba8be8271c7be2b8403c7d7f5
|
||||
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
|
||||
Auth:
|
||||
AccessSecret: fusen2023
|
||||
|
||||
@@ -36,7 +36,7 @@ func NewGetRecommandProductListLogic(ctx context.Context, svcCtx *svc.ServiceCon
|
||||
func (l *GetRecommandProductListLogic) GetRecommandProductList(req *types.GetRecommandProductListReq, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
req.Num = 4 //写死4个
|
||||
if req.Size > 0 {
|
||||
req.Size = image.GetCurrentSize(req.Size)
|
||||
req.Size = int32(image.GetCurrentSize(uint32(req.Size)))
|
||||
}
|
||||
productInfo, err := l.svcCtx.AllModels.FsProduct.FindOneBySn(l.ctx, req.Sn)
|
||||
if err != nil {
|
||||
|
||||
@@ -228,7 +228,7 @@ type OtherProductListRsp struct {
|
||||
}
|
||||
|
||||
type GetRecommandProductListReq struct {
|
||||
Size uint32 `form:"size,optional"`
|
||||
Size int32 `form:"size,optional"`
|
||||
Num int64 `form:"num,optional"`
|
||||
Sn string `form:"sn"`
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"fusenapi/server/product/internal/config"
|
||||
"fusenapi/server/product/internal/handler"
|
||||
@@ -22,7 +21,6 @@ func main() {
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
c.Timeout = int64(time.Second * 15)
|
||||
|
||||
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user