From 69030d31deeeca37c2c0d33019c04e341d873926 Mon Sep 17 00:00:00 2001 From: Hiven Date: Thu, 17 Aug 2023 11:29:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=87=8D=E6=9E=84=E5=90=88=E5=9B=BE?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/resource/resource_test.go | 3 --- service/repositories/image_handle.go | 10 +--------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/server/resource/resource_test.go b/server/resource/resource_test.go index d035c13a..80820ef2 100644 --- a/server/resource/resource_test.go +++ b/server/resource/resource_test.go @@ -4,9 +4,6 @@ import ( "testing" ) -// var configFile = flag.String("f", "etc/home-user-auth.yaml", "the config file") - func TestMain(t *testing.T) { - // log.Println(model.RawFieldNames[FsCanteenType]()) main() } diff --git a/service/repositories/image_handle.go b/service/repositories/image_handle.go index 8db2eecc..ffacf0d2 100644 --- a/service/repositories/image_handle.go +++ b/service/repositories/image_handle.go @@ -92,15 +92,6 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq return nil, err } var groupOptions map[string]interface{} - if productTemplateV2Info.GroupOptions != nil { - err = json.Unmarshal([]byte(*productTemplateV2Info.GroupOptions), &groupOptions) - - if err != nil { - logx.Error(err) - return nil, err - } - } - var materialList []interface{} if productTemplateV2Info.TemplateInfo != nil { var templateInfo map[string]interface{} @@ -111,6 +102,7 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq return nil, err } materialList = templateInfo["materialList"].([]interface{}) + groupOptions = templateInfo["groupOptions"].(map[string]interface{}) } var moduleDataMap = make(map[string]interface{}, 4)