From c2caccd8e2450f7823ad2f2010afb3822f1c0029 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 21 Aug 2023 17:45:51 +0800 Subject: [PATCH 1/5] fix --- server/product/internal/logic/gettemplatebypidlogic.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/product/internal/logic/gettemplatebypidlogic.go b/server/product/internal/logic/gettemplatebypidlogic.go index 6f464eae..28d440c6 100644 --- a/server/product/internal/logic/gettemplatebypidlogic.go +++ b/server/product/internal/logic/gettemplatebypidlogic.go @@ -118,18 +118,18 @@ func (l *GetTemplateByPidLogic) GetTemplateByPid(req *types.GetTemplateByPidReq, "material_data": map[string]interface{}{ "QRcode": map[string]interface{}{ "if_show": true, - "text": "二维码", - "default_value": "默认二维码", + "text": "1111", + "default_value": "11111", }, "Website": map[string]interface{}{ "if_show": true, - "text": "网站", - "default_value": "默认网站", + "text": "2222", + "default_value": "2222", }, "Address": map[string]interface{}{ "if_show": true, "text": "address", - "default_value": "非洲", + "default_value": "address", }, "Phone": map[string]interface{}{ "if_show": true, From 880ffc2a58ae7422e9a56d7dce10be5707e531ce Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Mon, 21 Aug 2023 17:49:32 +0800 Subject: [PATCH 2/5] fix --- proxyserver/main.go | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/proxyserver/main.go b/proxyserver/main.go index ac033fdd..f1fcec72 100644 --- a/proxyserver/main.go +++ b/proxyserver/main.go @@ -1,6 +1,7 @@ package main import ( + "crypto/tls" "fmt" "io" "io/ioutil" @@ -41,6 +42,8 @@ func SetCors(w http.ResponseWriter, r *http.Request) { var pathdict sync.Map = sync.Map{} func main() { + log.SetFlags(log.Llongfile) + // 将静态资源路径存储到pathdict pathdict.Store("/css", true) pathdict.Store("/fonts", true) @@ -114,7 +117,34 @@ func main() { ServerAddress := ":9900" log.Println("listen on ", ServerAddress) - log.Fatal(http.ListenAndServe(ServerAddress, mux)) + + keydata, err := os.ReadFile("/opt/server.fusen.3718.cn.key") + if err != nil { + panic(err) + } + + pemdata, err := os.ReadFile("/opt/server.fusen.3718.cn.pem") + if err != nil { + panic(err) + } + + cert, err := tls.X509KeyPair(pemdata, keydata) + if err != nil { + panic(err) + } + + tlscfg := &tls.Config{ + Certificates: []tls.Certificate{cert}, + MinVersion: tls.VersionTLS12, + MaxVersion: tls.VersionTLS13, + } + serv := http.Server{ + Addr: ServerAddress, + Handler: mux, + TLSConfig: tlscfg, + } + + log.Fatal(serv.ListenAndServeTLS("", "")) } // 后端服务的类型 From 1c0a537a099184a1755ea44af98f8880373bea30 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 21 Aug 2023 18:01:12 +0800 Subject: [PATCH 3/5] fix --- server/product/internal/logic/gettagproductlistlogic.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/product/internal/logic/gettagproductlistlogic.go b/server/product/internal/logic/gettagproductlistlogic.go index c8642633..3ae32492 100644 --- a/server/product/internal/logic/gettagproductlistlogic.go +++ b/server/product/internal/logic/gettagproductlistlogic.go @@ -34,6 +34,7 @@ func NewGetTagProductListLogic(ctx context.Context, svcCtx *svc.ServiceContext) } func (l *GetTagProductListLogic) GetTagProductList(req *types.GetTagProductListReq, userinfo *auth.UserInfo) (resp *basic.Response) { + req.TemplateTag = "b1a" //查询用户信息(不用判断存在) user, err := l.svcCtx.AllModels.FsUser.FindUserById(l.ctx, userinfo.UserId) if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) { From a5dcc5e89cb0a8decfac736e5df07369c7df9360 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 21 Aug 2023 18:05:51 +0800 Subject: [PATCH 4/5] fix --- server/product/internal/logic/gettagproductlistlogic.go | 1 - 1 file changed, 1 deletion(-) diff --git a/server/product/internal/logic/gettagproductlistlogic.go b/server/product/internal/logic/gettagproductlistlogic.go index 3ae32492..c8642633 100644 --- a/server/product/internal/logic/gettagproductlistlogic.go +++ b/server/product/internal/logic/gettagproductlistlogic.go @@ -34,7 +34,6 @@ func NewGetTagProductListLogic(ctx context.Context, svcCtx *svc.ServiceContext) } func (l *GetTagProductListLogic) GetTagProductList(req *types.GetTagProductListReq, userinfo *auth.UserInfo) (resp *basic.Response) { - req.TemplateTag = "b1a" //查询用户信息(不用判断存在) user, err := l.svcCtx.AllModels.FsUser.FindUserById(l.ctx, userinfo.UserId) if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) { From 4216f3906c8207540872dec33d6cb3c0d41650b5 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 21 Aug 2023 18:10:23 +0800 Subject: [PATCH 5/5] fix --- server/websocket/internal/logic/ws_render_image_logic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/websocket/internal/logic/ws_render_image_logic.go b/server/websocket/internal/logic/ws_render_image_logic.go index 969e403d..2e84e156 100644 --- a/server/websocket/internal/logic/ws_render_image_logic.go +++ b/server/websocket/internal/logic/ws_render_image_logic.go @@ -198,7 +198,7 @@ func (w *wsConnectItem) assembleRenderData(taskId string, info websocket_data.Re } res, err := w.logic.svcCtx.Repositories.ImageHandle.LogoCombine(w.logic.ctx, &combineReq) if err != nil { - logx.Error("合成刀版图失败:", err) + logx.Error("合成刀版图失败,合成请求数据:", combineReq, "错误信息:", err) return err } combineImage := "" //刀版图