更新表文件

This commit is contained in:
wh_zcy 2023-02-16 11:40:50 +08:00
parent c6c3e4ed14
commit 3a0f055f1a
10 changed files with 153 additions and 3353 deletions

View File

@ -0,0 +1,42 @@
[
{
"customer_id": 1,
"customer_type": 1,
"customer_speak": {
"key": "我需要{0}件【{1}】,如果你暂时没有备货的话我可以在这等一段时间,但不会太久。",
"text": ""
},
"goods": [],
"reword": []
},
{
"customer_id": 2,
"customer_type": 2,
"customer_speak": {
"key": "我需要{0}件【{1}】,如果你暂时没有备货的话我可以在这等一段时间,但不会太久。",
"text": ""
},
"goods": [],
"reword": []
},
{
"customer_id": 3,
"customer_type": 3,
"customer_speak": {
"key": "",
"text": ""
},
"goods": [],
"reword": []
},
{
"customer_id": 4,
"customer_type": 4,
"customer_speak": {
"key": "我有个宝贝,你要是喜欢的话便宜你点卖你。",
"text": ""
},
"goods": [],
"reword": []
}
]

View File

@ -1,42 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type GameTaskCond struct {
_dataMap map[int32]*GameTaskCondData
_dataList []*GameTaskCondData
}
func NewGameTaskCond(_buf []map[string]interface{}) (*GameTaskCond, error) {
_dataList := make([]*GameTaskCondData, 0, len(_buf))
dataMap := make(map[int32]*GameTaskCondData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameTaskCondData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameTaskCond{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameTaskCond) GetDataMap() map[int32]*GameTaskCondData {
return table._dataMap
}
func (table *GameTaskCond) GetDataList() []*GameTaskCondData {
return table._dataList
}
func (table *GameTaskCond) Get(key int32) *GameTaskCondData {
return table._dataMap[key]
}

View File

@ -1,47 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type GameTaskCondData struct {
Id int32
Type int32
Data1 int32
Data2 int32
Data3 int32
Data4 int32
Data5 int32
}
const TypeId_GameTaskCondData = -1719868659
func (*GameTaskCondData) GetTypeId() int32 {
return -1719868659
}
func (_v *GameTaskCondData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["data1"].(float64); !_ok_ { err = errors.New("data1 error"); return }; _v.Data1 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["data2"].(float64); !_ok_ { err = errors.New("data2 error"); return }; _v.Data2 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["data3"].(float64); !_ok_ { err = errors.New("data3 error"); return }; _v.Data3 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["data4"].(float64); !_ok_ { err = errors.New("data4 error"); return }; _v.Data4 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["data5"].(float64); !_ok_ { err = errors.New("data5 error"); return }; _v.Data5 = int32(_tempNum_) }
return
}
func DeserializeGameTaskCondData(_buf map[string]interface{}) (*GameTaskCondData, error) {
v := &GameTaskCondData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -1,42 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type GameTestFlow struct {
_dataMap map[int32]*GameTestFlowData
_dataList []*GameTestFlowData
}
func NewGameTestFlow(_buf []map[string]interface{}) (*GameTestFlow, error) {
_dataList := make([]*GameTestFlowData, 0, len(_buf))
dataMap := make(map[int32]*GameTestFlowData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameTestFlowData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameTestFlow{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameTestFlow) GetDataMap() map[int32]*GameTestFlowData {
return table._dataMap
}
func (table *GameTestFlow) GetDataList() []*GameTestFlowData {
return table._dataList
}
func (table *GameTestFlow) Get(key int32) *GameTestFlowData {
return table._dataMap[key]
}

View File

@ -1,41 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type GameTestFlowData struct {
Id int32
Msg string
Route string
Params string
}
const TypeId_GameTestFlowData = -1087831770
func (*GameTestFlowData) GetTypeId() int32 {
return -1087831770
}
func (_v *GameTestFlowData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; if _v.Msg, _ok_ = _buf["msg"].(string); !_ok_ { err = errors.New("msg error"); return } }
{ var _ok_ bool; if _v.Route, _ok_ = _buf["route"].(string); !_ok_ { err = errors.New("route error"); return } }
{ var _ok_ bool; if _v.Params, _ok_ = _buf["params"].(string); !_ok_ { err = errors.New("params error"); return } }
return
}
func DeserializeGameTestFlowData(_buf map[string]interface{}) (*GameTestFlowData, error) {
v := &GameTestFlowData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -1,38 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type JsonLoader func(string) ([]map[string]interface{}, error)
type Tables struct {
TestFlow *GameTestFlow
TaskCond *GameTaskCond
}
func NewTables(loader JsonLoader) (*Tables, error) {
var err error
var buf []map[string]interface{}
tables := &Tables{}
if buf, err = loader("game_testflow"); err != nil {
return nil, err
}
if tables.TestFlow, err = NewGameTestFlow(buf); err != nil {
return nil, err
}
if buf, err = loader("game_taskcond"); err != nil {
return nil, err
}
if tables.TaskCond, err = NewGameTaskCond(buf); err != nil {
return nil, err
}
return tables, nil
}

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +0,0 @@
[
{
"id": 1,
"msg": "功能列表",
"route": "sys.funclist",
"params": "{}"
}
]

View File

@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type GameSmithyCustomer struct {
_dataMap map[int32]*GameSmithyCustomerData
_dataList []*GameSmithyCustomerData
}
func NewGameSmithyCustomer(_buf []map[string]interface{}) (*GameSmithyCustomer, error) {
_dataList := make([]*GameSmithyCustomerData, 0, len(_buf))
dataMap := make(map[int32]*GameSmithyCustomerData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameSmithyCustomerData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.CustomerId] = _v
}
}
return &GameSmithyCustomer{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameSmithyCustomer) GetDataMap() map[int32]*GameSmithyCustomerData {
return table._dataMap
}
func (table *GameSmithyCustomer) GetDataList() []*GameSmithyCustomerData {
return table._dataList
}
func (table *GameSmithyCustomer) Get(key int32) *GameSmithyCustomerData {
return table._dataMap[key]
}

View File

@ -0,0 +1,69 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type GameSmithyCustomerData struct {
CustomerId int32
CustomerType int32
CustomerSpeak string
Goods []*Gameatn
Reword []*Gameatn
}
const TypeId_GameSmithyCustomerData = 1314583578
func (*GameSmithyCustomerData) GetTypeId() int32 {
return 1314583578
}
func (_v *GameSmithyCustomerData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["customer_id"].(float64); !_ok_ { err = errors.New("customer_id error"); return }; _v.CustomerId = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["customer_type"].(float64); !_ok_ { err = errors.New("customer_type error"); return }; _v.CustomerType = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["customer_speak"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.CustomerSpeak error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.CustomerSpeak, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["goods"].([]interface{}); !_ok_ { err = errors.New("goods error"); return }
_v.Goods = make([]*Gameatn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gameatn
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
_v.Goods = append(_v.Goods, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["reword"].([]interface{}); !_ok_ { err = errors.New("reword error"); return }
_v.Reword = make([]*Gameatn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gameatn
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
_v.Reword = append(_v.Reword, _list_v_)
}
}
return
}
func DeserializeGameSmithyCustomerData(_buf map[string]interface{}) (*GameSmithyCustomerData, error) {
v := &GameSmithyCustomerData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}