From cc6e2d1ce0b0281495f4e8c5486eb860d43d9a89 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 29 Aug 2023 11:34:02 +0800 Subject: [PATCH 1/3] 11 --- .../websocket/internal/logic/ws_render_image.go | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/server/websocket/internal/logic/ws_render_image.go b/server/websocket/internal/logic/ws_render_image.go index ebe38904..3fc15a13 100644 --- a/server/websocket/internal/logic/ws_render_image.go +++ b/server/websocket/internal/logic/ws_render_image.go @@ -186,15 +186,6 @@ func (w *wsConnectItem) consumeRenderCache(data []byte) { logx.Info("合成刀版图成功,合成刀版图数据:", combineReq, ",logo图片:", renderImageData.RenderData.Logo, " 刀版图:", *res.ResourceUrl) //获取唯一id taskId := w.genRenderTaskId(renderImageData, model3dInfo, productTemplate, element) - //记录刀版图合成消耗时间跟上传刀版图时间 - w.modifyRenderTaskProperty(renderImageControlChanItem{ - option: 2, - taskId: taskId, - taskProperty: renderTask{ - combineTakesTime: res.DiffTimeLogoCombine, - uploadCombineImageTakesTime: res.DiffTimeUploadFile, - }, - }) //查询有没有缓存的资源,有就返回###################### resource, err := w.logic.svcCtx.AllModels.FsResource.FindOneById(w.logic.ctx, taskId) if err != nil { @@ -227,12 +218,14 @@ func (w *wsConnectItem) consumeRenderCache(data []byte) { taskId: taskId, renderId: renderImageData.RenderId, }) - //记录刀版图 + //记录刀版图合成消耗时间跟上传刀版图时间以及刀版图 w.modifyRenderTaskProperty(renderImageControlChanItem{ option: 2, taskId: taskId, taskProperty: renderTask{ - combineImage: combineImage, + combineTakesTime: res.DiffTimeLogoCombine, + uploadCombineImageTakesTime: res.DiffTimeUploadFile, + combineImage: combineImage, }, }) //组装数据 @@ -476,7 +469,7 @@ func (w *wsConnectItem) operationRenderTask() { renderId: data.renderId, } - case 2: //修改(耗时)属性 + case 2: //修改任务属性 if taskData, ok := w.extendRenderProperty.renderImageTask[data.taskId]; ok { //合图耗时 if data.taskProperty.combineTakesTime != 0 { From d241b8da6c7b5858eda67cf673ca76c52b0e3b82 Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Tue, 29 Aug 2023 11:35:53 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/home-user-auth/internal/types/types.go | 4 +-- server_api/home-user-auth.api | 36 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/server/home-user-auth/internal/types/types.go b/server/home-user-auth/internal/types/types.go index fa3dd840..3288ff75 100644 --- a/server/home-user-auth/internal/types/types.go +++ b/server/home-user-auth/internal/types/types.go @@ -6,8 +6,8 @@ import ( ) type UserInfoSetReq struct { - Module string `form:"module,options=[merchant_category]"` // json格式字符串 - Metadata string `form:"metadata"` // json格式字符串 + Module string `form:"module,options=[merchant_category,logo_merchant_category]"` // json格式字符串 + Metadata string `form:"metadata"` // json格式字符串 } type UserAgainOrderReq struct { diff --git a/server_api/home-user-auth.api b/server_api/home-user-auth.api index 919d344b..3f97c058 100644 --- a/server_api/home-user-auth.api +++ b/server_api/home-user-auth.api @@ -10,56 +10,56 @@ info ( import "basic.api" service home-user-auth { - + // @handler UserRegisterHandler // post /api/user/register(RequestUserRegister) returns (response); - + @handler UserFontsHandler get /api/user/fonts(request) returns (response); - + @handler UserGetTypeHandler get /api/user/get-type(request) returns (response); - + @handler UserSaveBasicInfoHandler post /api/user/basic-info(RequestBasicInfoForm) returns (response); - + @handler UserStatusConfigHandler get /api/user/status-config(request) returns (response); - + @handler UserBasicInfoHandler get /api/user/basic-info(request) returns (response); - + @handler UserAddressListHandler get /api/user/address-list(request) returns (response); - + @handler UserAddAddressHandler post /api/user/add-address(RequestAddAddress) returns (response); - + @handler UserContactServiceHandler post /api/user/contact-service (RequestContactService) returns (response); - + // @handler UserOderListHandler // get /api/user/order-list(RequestOrderId) returns (response); - + @handler UserOderDeleteHandler post /api/user/order-delete(RequestOrderId) returns (response); - + //订单列表 @handler UserOrderListHandler get /api/user/order-list (UserOrderListReq) returns (response); - + //删除订单 @handler UserOrderDeleteHandler get /api/user/order-delete (UserOrderDeleteReq) returns (response); - + //取消订单 @handler UserOrderCancelHandler get /api/user/order-cancel (UserOrderCancelReq) returns (response); - + // 用户logo列表 @handler UserLogoListHandler get /api/user/logo-list (UserLogoListReq) returns (response); - + // 再来一单 @handler UserAgainOrderHandler get /api/user/one-more-order (UserAgainOrderReq) returns (response); @@ -71,8 +71,8 @@ service home-user-auth { type ( UserInfoSetReq { - Module string `form:"module,options=[merchant_category]"` // json格式字符串 - Metadata string `form:"metadata"` // json格式字符串 + Module string `form:"module,options=[merchant_category,logo_merchant_category]"` // json格式字符串 + Metadata string `form:"metadata"` // json格式字符串 } ) From a40e3f25556e3e233bc67ff22e6cab6226069d1f Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 29 Aug 2023 11:39:15 +0800 Subject: [PATCH 3/3] 11 --- server/websocket/internal/logic/ws_render_image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/websocket/internal/logic/ws_render_image.go b/server/websocket/internal/logic/ws_render_image.go index 3fc15a13..67ec2c03 100644 --- a/server/websocket/internal/logic/ws_render_image.go +++ b/server/websocket/internal/logic/ws_render_image.go @@ -453,7 +453,7 @@ func (w *wsConnectItem) operationRenderTask() { w.sendToOutChan(w.respondDataFormat(constants.WEBSOCKET_RENDER_IMAGE, websocket_data.RenderImageRspMsg{ RenderId: taskData.renderId, Image: data.renderNotifyImageUrl, - CombineImage: data.taskProperty.combineImage, + CombineImage: taskData.combineImage, RenderProcessTime: websocket_data.RenderProcessTime{ CombineTakesTime: CombineTakesTime, UnityRenderTakesTime: UnityRenderTakesTime,