From 21f587ed55ae117f40e1725936ddb95bafc05dc4 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Fri, 24 Nov 2023 16:01:29 +0800 Subject: [PATCH] fix --- server/product/internal/logic/getproductdetaillogic.go | 1 - server/product/internal/logic/getproductmodelslogic.go | 5 ++++- server/product/internal/types/types.go | 3 +-- server_api/product.api | 3 +-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/product/internal/logic/getproductdetaillogic.go b/server/product/internal/logic/getproductdetaillogic.go index 629bec51..2069352a 100644 --- a/server/product/internal/logic/getproductdetaillogic.go +++ b/server/product/internal/logic/getproductdetaillogic.go @@ -222,7 +222,6 @@ func (l *GetProductDetailLogic) GetProductDetail(req *types.GetProductDetailReq, //赋值 modelInfoRsp.LightInfo = types.LightInfo{ Id: lightInfo.Id, - LightName: *lightInfo.Name, LightDesignInfo: lightDesignInfo, } } diff --git a/server/product/internal/logic/getproductmodelslogic.go b/server/product/internal/logic/getproductmodelslogic.go index 4573ac57..9c6ef437 100644 --- a/server/product/internal/logic/getproductmodelslogic.go +++ b/server/product/internal/logic/getproductmodelslogic.go @@ -153,7 +153,10 @@ func (l *GetProductModelsLogic) GetProductModels(req *types.GetProductModelsReq, Name: *v.Name, MaterialImage: fittingMaterialImage, DesignInfo: modelDesignInfo, - LightInfo: lightDesignInfo, + LightInfo: types.LightInfo{ + Id: *v.Light, + LightDesignInfo: lightDesignInfo, + }, }) } mapProductInfo := make(map[int64][]types.ModelItem) diff --git a/server/product/internal/types/types.go b/server/product/internal/types/types.go index ac2af14a..8a87d03e 100644 --- a/server/product/internal/types/types.go +++ b/server/product/internal/types/types.go @@ -150,7 +150,6 @@ type ModelInfo struct { type LightInfo struct { Id int64 `json:"id"` //灯光id - LightName string `json:"light_name"` //灯光组名称 LightDesignInfo interface{} `json:"light_design_info"` //灯光设计信息 } @@ -187,7 +186,7 @@ type ModelItem struct { Name string `json:"name"` MaterialImage string `json:"material_image"` //默认贴图 DesignInfo interface{} `json:"design_info"` - LightInfo interface{} `json:"light_info"` + LightInfo LightInfo `json:"light_info"` } type Request struct { diff --git a/server_api/product.api b/server_api/product.api index 9df4b422..49858ec6 100644 --- a/server_api/product.api +++ b/server_api/product.api @@ -170,7 +170,6 @@ type ModelInfo { } type LightInfo { Id int64 `json:"id"` //灯光id - LightName string `json:"light_name"` //灯光组名称 LightDesignInfo interface{} `json:"light_design_info"` //灯光设计信息 } type ProductInfo { @@ -203,5 +202,5 @@ type ModelItem { Name string `json:"name"` MaterialImage string `json:"material_image"` //默认贴图 DesignInfo interface{} `json:"design_info"` - LightInfo interface{} `json:"light_info"` + LightInfo LightInfo `json:"light_info"` } \ No newline at end of file