From 7987fcbcbfc245b0b30c6e6c16bff986c80a5771 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Sat, 31 Dec 2022 18:08:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=85=B7=E6=94=AF=E6=8C=81=E8=AF=BBjs?= =?UTF-8?q?on=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/v2/gen_test.go | 6 +++--- cmd/v2/lib/common/utils.go | 3 ++- cmd/v2/ui/perf_choose.go | 2 +- cmd/v2/ui/perf_pb.go | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cmd/v2/gen_test.go b/cmd/v2/gen_test.go index 43770adc9..483fbbbd6 100644 --- a/cmd/v2/gen_test.go +++ b/cmd/v2/gen_test.go @@ -1,7 +1,7 @@ package main_test import ( - cfg "go_dreamfactory/cmd/v2/configure/structs" + cfg "go_dreamfactory/sys/configure/structs" "go_dreamfactory/cmd/v2/lib/common" "html/template" "os" @@ -9,12 +9,12 @@ import ( ) type TaskCond struct { - Data map[int32]*cfg.GameTaskCondData + Data map[int32]*cfg.GameRdtaskCondiData } func TestTask(t *testing.T) { if tb, err := cfg.NewTables(common.Loader); err == nil { - data := tb.TaskCond.GetDataMap() + data := tb.RdtaskCondi.GetDataMap() tmpl := template.New("task") tplTxt := `reqDataMap := map[int32]TaskCondi{ diff --git a/cmd/v2/lib/common/utils.go b/cmd/v2/lib/common/utils.go index 9645e6bdd..32031cdfe 100644 --- a/cmd/v2/lib/common/utils.go +++ b/cmd/v2/lib/common/utils.go @@ -162,7 +162,8 @@ func ConvertFileSize(size int64) string { } func Loader(file string) ([]map[string]interface{}, error) { - if bytes, err := ioutil.ReadFile("./json/" + file + ".json"); err != nil { + path := filepath.Join("E:\\projects\\workspace\\go_dreamfactory\\bin\\json", file+".json") + if bytes, err := ioutil.ReadFile(path); err != nil { return nil, err } else { jsonData := make([]map[string]interface{}, 0) diff --git a/cmd/v2/ui/perf_choose.go b/cmd/v2/ui/perf_choose.go index db5e520a7..3cc27597f 100644 --- a/cmd/v2/ui/perf_choose.go +++ b/cmd/v2/ui/perf_choose.go @@ -1,7 +1,6 @@ package ui import ( - cfg "go_dreamfactory/cmd/v2/configure/structs" "go_dreamfactory/cmd/v2/lib" "go_dreamfactory/cmd/v2/lib/common" "go_dreamfactory/cmd/v2/lib/storage" @@ -9,6 +8,7 @@ import ( "go_dreamfactory/cmd/v2/service/observer" "go_dreamfactory/comm" "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" "strings" "time" diff --git a/cmd/v2/ui/perf_pb.go b/cmd/v2/ui/perf_pb.go index b46a909c5..1a317b902 100644 --- a/cmd/v2/ui/perf_pb.go +++ b/cmd/v2/ui/perf_pb.go @@ -2,7 +2,6 @@ package ui import ( "fmt" - cfg "go_dreamfactory/cmd/v2/configure/structs" "go_dreamfactory/cmd/v2/lib" "go_dreamfactory/cmd/v2/lib/common" "go_dreamfactory/cmd/v2/lib/storage" @@ -10,6 +9,7 @@ import ( "go_dreamfactory/cmd/v2/service/observer" "go_dreamfactory/comm" "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" "strings" "time"