forked from hjqhezgh/lessgo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.go
executable file
·764 lines (593 loc) · 19.1 KB
/
web.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
// Title:web服务相关
//
// Description:
//
// Author:black
//
// Createtime:2013-08-06 15:43
//
// Version:1.0
//
// 修改历史:版本号 修改日期 修改人 修改说明
//
// 1.0 2013-08-06 15:43 black 创建文档
package lessgo
import (
"fmt"
"github.com/gorilla/mux"
"github.com/hjqhezgh/commonlib"
"io"
"io/ioutil"
"net/http"
"os"
"strconv"
"strings"
"text/template"
"time"
)
//跳转至错误页面
func errMessage(w http.ResponseWriter, r *http.Request, errMsg string) {
m := make(map[string]interface{})
m["ErrMsg"] = errMsg
m["SiteName"] = SiteName
m["SiteIcon"] = SiteIcon
commonlib.RenderTemplate(w, r, "err_message.html", m, nil, "../lessgo/template/err_message.html")
}
//注销
func loginOutAction(w http.ResponseWriter, r *http.Request) {
session, _ := Store.Get(r, SESSION_USER)
for v, _ := range session.Values {
delete(session.Values, v)
}
session.Save(r, w)
w.Write([]byte("success"))
}
//中心控制器
func homeAction(w http.ResponseWriter, r *http.Request) {
m := make(map[string]interface{})
m["SiteName"] = SiteName
m["SiteIcon"] = SiteIcon
commonlib.RenderTemplate(w, r, "home.html", m, nil, "../lessgo/template/home.html")
}
//中心控制器
func commonAction(w http.ResponseWriter, r *http.Request) {
m := make(map[string]interface{})
entity, opera, terminal, msg := analyseUrl(r.URL.Path)
if msg != "" {
Log.Warn(msg, r.URL.Path)
errMessage(w, r, "出现错误,请联系IT部门,错误信息:"+msg)
return
} else {
switch opera {
case "home":
employee := GetCurrentEmployee(r)
if employee.UserId == "" {
Log.Warn("用户未登陆")
m["SiteName"] = SiteName
m["SiteIcon"] = SiteIcon
commonlib.RenderTemplate(w, r, "login.html", m, nil, "../lessgo/template/component/"+terminal+"/login.html")
return
}
Log.Debug("路径:", r.URL.Path, "访问应用首页")
content, err := ioutil.ReadFile("../etc/view/" + terminal + "/home.xml")
if err != nil {
Log.Error(err)
errMessage(w, r, "出现错误,请联系IT部门,错误信息:"+err.Error())
return
}
packageName := terminal + "." + "home"
w.Write(generate(content, terminal, packageName, r, employee))
case "index":
dealEntityIndex(entity, terminal, m, w, r)
case "add":
dealEntityAdd(entity, terminal, m, w, r)
case "modify":
dealEntityModify(entity, terminal, m, w, r)
case "save":
dealEntitySave(entity, w, r)
case "delete":
dealEntityDelete(entity, w, r)
case "detail":
dealEntityDetail(entity, m, w, r)
case "page":
dealEntityPage(entity, w, r)
case "alldata":
dealEntityAllData(entity, w, r)
case "load":
dealEntityLoad(entity, w, r)
default:
Log.Debug("路径:", r.URL.Path, "访问实体", entity.Id, "的未知页")
m["SiteName"] = SiteName
m["SiteIcon"] = SiteIcon
commonlib.RenderTemplate(w, r, "home.html", m, nil, "../lessgo/template/home.html")
}
}
}
//中心控制器
func independentAction(w http.ResponseWriter, r *http.Request) {
strs := strings.Split(r.URL.Path, "/")
terminal := strs[1]
employee := GetCurrentEmployee(r)
if employee.UserId == "" {
Log.Warn("用户未登陆")
m := make(map[string]interface{})
m["SiteName"] = SiteName
m["SiteIcon"] = SiteIcon
commonlib.RenderTemplate(w, r, "login.html", nil, nil, "../lessgo/template/component/"+terminal+"/login.html")
return
}
Log.Debug("访问自定义路径:", r.URL.Path)
view := ""
for _, url := range urlList.Urls {
if url.Path == r.URL.Path {
view = url.View
}
}
if view == "" {
Log.Warn("路径:", r.URL.Path, "找不到页面")
errMessage(w, r, "出现错误,请联系IT部门,错误信息:"+"找不到页面")
return
}
content, err := ioutil.ReadFile("../etc/view/" + view)
if err != nil {
Log.Error(err)
errMessage(w, r, "出现错误,请联系IT部门,错误信息:"+err.Error())
return
}
packageName := terminal + "." + view
w.Write(generate(content, terminal, packageName, r, employee))
}
//中心控制器
func loginAction(w http.ResponseWriter, r *http.Request) {
m := make(map[string]interface{})
m["SiteName"] = SiteName
m["SiteIcon"] = SiteIcon
strs := strings.Split(r.URL.Path, "/")
terminal := strs[1]
Log.Debug("访问登陆页")
commonlib.RenderTemplate(w, r, "login.html", m, nil, "../lessgo/template/component/"+terminal+"/login.html")
}
//分析URL得出当前url访问的实体模块,以及进行的操作,如果有错误,就去读取msg
func analyseUrl(url string) (_entity Entity, operation, terminal, msg string) {
strs := strings.Split(url, "/")
//首页的情况
if len(strs) == 2 || strs[2] == "index.html" {
return Entity{}, "home", strs[1], ""
} else {
_entity = getEntity(strs[2])
if _entity.Id == "" {
return Entity{}, "", "", "找不到该url下的相应实体"
}
if len(strs) == 3 {
return _entity, "index", strs[1], ""
}
switch strs[3] {
case "index.html":
return _entity, "index", strs[1], ""
case "add":
return _entity, "add", strs[1], ""
case "modify":
return _entity, "modify", strs[1], ""
case "save":
return _entity, "save", strs[1], ""
case "delete":
return _entity, "delete", strs[1], ""
case "page":
return _entity, "page", strs[1], ""
case "alldata":
return _entity, "alldata", strs[1], ""
case "load":
return _entity, "load", strs[1], ""
default:
_, err := strconv.Atoi(strs[4])
if err != nil {
return Entity{}, "", "", "找不到该url下对应的操作"
} else {
return _entity, "detail", strs[1], ""
}
}
}
return
}
//处理实体的列表页请求
func dealEntityIndex(entity Entity, terminal string, m map[string]interface{}, w http.ResponseWriter, r *http.Request) {
employee := GetCurrentEmployee(r)
if employee.UserId == "" {
Log.Warn("用户未登陆")
m["SiteName"] = SiteName
m["SiteIcon"] = SiteIcon
commonlib.RenderTemplate(w, r, "login.html", m, nil, "../lessgo/template/component/"+terminal+"/login.html")
return
}
Log.Debug("路径:", r.URL.Path, "访问实体", entity.Id, "的列表页")
content, err := ioutil.ReadFile("../etc/view/" + terminal + "/" + entity.Id + "/index.xml")
if err != nil {
Log.Error(err)
errMessage(w, r, "出现错误,请联系IT部门,错误信息:"+err.Error())
return
}
packageName := terminal + "." + entity.Id + ".index"
w.Write(generate(content, terminal, packageName, r, employee))
}
//处理实体的添加页请求
func dealEntityAdd(entity Entity, terminal string, m map[string]interface{}, w http.ResponseWriter, r *http.Request) {
employee := GetCurrentEmployee(r)
if employee.UserId == "" {
Log.Warn("用户未登陆")
m["SiteName"] = SiteName
m["SiteIcon"] = SiteIcon
commonlib.RenderTemplate(w, r, "login.html", m, nil, "../lessgo/template/component/"+terminal+"/login.html")
return
}
Log.Debug("路径:", r.URL.Path, "访问实体", entity.Id, "的添加页")
content, err := ioutil.ReadFile("../etc/view/" + terminal + "/" + entity.Id + "/add.xml")
if err != nil {
Log.Error(err)
errMessage(w, r, "出现错误,请联系IT部门,错误信息:"+err.Error())
return
}
packageName := terminal + "." + entity.Id + ".add"
w.Write(generate(content, terminal, packageName, r, employee))
}
//处理实体的修改页请求
func dealEntityModify(entity Entity, terminal string, m map[string]interface{}, w http.ResponseWriter, r *http.Request) {
employee := GetCurrentEmployee(r)
if employee.UserId == "" {
Log.Warn("用户未登陆")
m["SiteName"] = SiteName
m["SiteIcon"] = SiteIcon
commonlib.RenderTemplate(w, r, "login.html", m, nil, "../lessgo/template/component/"+terminal+"/login.html")
return
}
Log.Debug("路径:", r.URL.Path, "访问实体", entity.Id, "的修改页")
content, err := ioutil.ReadFile("../etc/view/" + terminal + "/" + entity.Id + "/modify.xml")
if err != nil {
Log.Error(err)
errMessage(w, r, "出现错误,请联系IT部门,错误信息:"+err.Error())
return
}
packageName := terminal + "." + entity.Id + ".modify"
w.Write(generate(content, terminal, packageName, r, employee))
}
//处理实体的保存页请求
func dealEntitySave(_entity Entity, w http.ResponseWriter, r *http.Request) {
m := make(map[string]interface{})
employee := GetCurrentEmployee(r)
if employee.UserId == "" {
Log.Warn("用户未登陆")
m["success"] = false
m["code"] = 100
m["msg"] = "用户未登陆"
commonlib.OutputJson(w, m, " ")
return
}
Log.Debug("路径:", r.URL.Path, "访问实体", _entity.Id, "的保存ajax请求")
err := r.ParseForm()
//异步请求绑定的组件Id
componentId := r.FormValue("componentId")
formpanel := runtimeComponentContain[componentId].(formPanel)
if err != nil {
m["success"] = false
m["code"] = 100
m["msg"] = "出现错误,请联系IT部门,错误信息:" + err.Error()
Log.Warn(err.Error())
commonlib.OutputJson(w, m, " ")
return
}
idString := r.FormValue(_entity.Pk)
_model := new(Model)
_model.Props = []*Prop{}
imgElements := []element{}
for _, formElement := range formpanel.Elements {
_prop := new(Prop)
if formElement.Type == "image" { //图片类型需要做多表处理
imgElements = append(imgElements, formElement)
} else if formElement.Type == "currentTime" { //当前时间,一般用于createTime
_prop.Name = formElement.Field
if formElement.Char14 == "true" {
_prop.Value = time.Now().Format("20060102150405")
} else {
_prop.Value = time.Now().Format("2006-01-02 15:04:05")
}
_model.Props = append(_model.Props, _prop)
} else {
_prop.Name = formElement.Field
_prop.Value = r.FormValue(formElement.Field)
_model.Props = append(_model.Props, _prop)
}
}
if idString != "" { //修改的情况
id, err := strconv.Atoi(idString)
if err != nil {
m["success"] = false
m["code"] = 100
m["msg"] = "出现错误,请联系IT部门,错误信息:" + err.Error()
Log.Warn(err.Error())
commonlib.OutputJson(w, m, " ")
return
}
_model.Id = fmt.Sprint(id)
err = modify(_entity, _model, formpanel.Elements)
if err != nil {
m["success"] = false
m["code"] = 100
m["msg"] = "出现错误,请联系IT部门,错误信息:" + err.Error()
commonlib.OutputJson(w, m, " ")
return
}
m["success"] = true
m["code"] = 200
commonlib.OutputJson(w, m, " ")
return
} else {
id, err := insert(_entity, _model, formpanel.Elements)
for _, imgElment := range imgElements {
filePath := r.FormValue(imgElment.Field)
tmpFileName := ""
if filePath != "" {
imgEntity := getEntity(imgElment.ImageEntity)
imageModel := new(Model)
imageModel.Props = []*Prop{}
fileNameProp := new(Prop)
fileNameProp.Name = "filename"
fileNameProp.Value = commonlib.SubstrByStEd(filePath, strings.LastIndex(filePath, "/")+1, strings.LastIndex(filePath, "."))
tmpFileName = commonlib.Substr(filePath, strings.LastIndex(filePath, "/")+1, len(filePath))
suffixProp := new(Prop)
suffixProp.Name = "suffix"
suffixProp.Value = commonlib.Substr(filePath, strings.LastIndex(filePath, ".")+1, len(filePath))
refProp := new(Prop)
refProp.Name = imgElment.Field
refProp.Value = fmt.Sprint(id)
imageModel.Props = append(imageModel.Props, fileNameProp)
imageModel.Props = append(imageModel.Props, suffixProp)
imageModel.Props = append(imageModel.Props, refProp)
_, err := insert(imgEntity, imageModel, []element{
element{
Field: "filename",
},
element{
Field: "suffix",
},
element{
Field: imgElment.Field,
},
})
if err != nil {
m["success"] = false
m["code"] = 100
m["msg"] = "出现错误,请联系IT部门,错误信息:" + err.Error()
Log.Warn(err.Error())
commonlib.OutputJson(w, m, " ")
return
}
tmpFile, err := os.OpenFile("../tmp/"+tmpFileName, os.O_RDWR, 0777)
if err != nil {
m["success"] = false
m["code"] = 100
m["msg"] = "出现错误,请联系IT部门,错误信息:" + err.Error()
Log.Warn(err.Error())
commonlib.OutputJson(w, m, " ")
return
}
_, err = os.Stat(imgElment.ImagePath)
if err != nil && os.IsNotExist(err) {
Log.Info(imgElment.ImagePath, "文件夹不存在,创建")
os.MkdirAll(imgElment.ImagePath, 0777)
}
disFile, err := os.Create(imgElment.ImagePath + "/" + tmpFileName)
if err != nil {
m["success"] = false
m["code"] = 100
m["msg"] = "出现错误,请联系IT部门,错误信息:" + err.Error()
Log.Warn(err.Error())
commonlib.OutputJson(w, m, " ")
return
}
io.Copy(disFile, tmpFile)
os.Remove("../tmp/" + tmpFileName)
}
}
if err != nil {
m["success"] = false
m["code"] = 100
m["msg"] = "出现错误,请联系IT部门,错误信息:" + err.Error()
commonlib.OutputJson(w, m, " ")
return
}
m["success"] = true
m["code"] = 200
commonlib.OutputJson(w, m, " ")
return
}
}
//处理实体的详细页请求
func dealEntityDetail(entity Entity, m map[string]interface{}, w http.ResponseWriter, r *http.Request) {
//todo 目前还没实现此页面
/*
employee := GetCurrentEmployee(r)
if employee.UserId == "" {
Log.Warn("用户未登陆")
commonlib.RenderTemplate(w, r, "login.html", m, nil, "../lessgo/template/login.html")
return
}
Log.Debug("路径:", r.URL.Path, "访问实体", entity.Id, "的详细信息页")
vars := mux.Vars(r)
id := vars["id"] //先假设这个是活动的ID
model, err := findById(entity, id)
if err != nil {
errMessage(w, r, "出现错误,请联系IT部门,错误信息:"+err.Error())
return
}
m["Entity"] = entity
m["Model"] = model
commonlib.RenderTemplate(w, r, "entity_detail.html", m, template.FuncMap{"getPropValue": getPropValue}, "../lessgo/template/entity_detail.html")*/
}
//处理实体的删除页请求
func dealEntityDelete(entity Entity, w http.ResponseWriter, r *http.Request) {
m := make(map[string]interface{})
employee := GetCurrentEmployee(r)
if employee.UserId == "" {
Log.Warn("用户未登陆")
m["success"] = false
m["code"] = 100
m["msg"] = "用户未登陆"
commonlib.OutputJson(w, m, " ")
return
}
Log.Debug("路径:", r.URL.Path, "访问实体", entity.Id, "的删除页")
id := r.FormValue("id")
err := deleteEntity(entity, id)
if err != nil {
m["success"] = false
m["code"] = 100
m["msg"] = "出现错误,请联系IT部门,错误信息:" + err.Error()
commonlib.OutputJson(w, m, " ")
return
}
m["success"] = true
m["code"] = 200
commonlib.OutputJson(w, m, " ")
return
}
//处理实体的分页ajax请求
func dealEntityPage(entity Entity, w http.ResponseWriter, r *http.Request) {
m := make(map[string]interface{})
employee := GetCurrentEmployee(r)
if employee.UserId == "" {
Log.Warn("用户未登陆")
m["success"] = false
m["code"] = 100
m["msg"] = "用户未登陆"
commonlib.OutputJson(w, m, " ")
return
}
Log.Debug("路径:", r.URL.Path, "访问实体", entity.Id, "的分页数据ajax请求")
err := r.ParseForm()
if err != nil {
m["success"] = false
m["code"] = 100
m["msg"] = "出现错误,请联系IT部门,错误信息:" + err.Error()
commonlib.OutputJson(w, m, " ")
return
}
pageNoString := r.FormValue("page")
pageNo := 1
if pageNoString != "" {
pageNo, err = strconv.Atoi(pageNoString)
if err != nil {
pageNo = 1
Log.Warn("错误的pageNo:", pageNo)
}
}
pageSizeString := r.FormValue("rows")
pageSize := 10
if pageSizeString != "" {
pageSize, err = strconv.Atoi(pageSizeString)
if err != nil {
Log.Warn("错误的pageSize:", pageSize)
}
}
//异步请求绑定的组件Id
componentId := r.FormValue("componentId")
gridpanel := runtimeComponentContain[componentId].(gridPanel)
searchParam := []search{}
for key, value := range r.Form {
//滤除分页组件自带的参数,其他参数都认定为搜索参数, Fixme 后期改进这块机制
strings.Contains(key, "-")
if strings.Contains(key, "-") {
// if key != "page" && key != "rows" && key != "componentId" && key != "_search" && key != "nd" && key != "sidx" && key != "sord" && key != "filters" {
strs := strings.Split(key, "-")
search := search{
Field: strs[0],
SearchType: strs[1],
}
if len(value) > 0 {
search.Value = value[0]
} else {
search.Value = ""
}
searchParam = append(searchParam, search)
}
}
pageData, err := findTraditionPage(entity, pageNo, pageSize, searchParam, gridpanel.Columns)
if err != nil {
m["success"] = false
m["code"] = 100
m["msg"] = "出现错误,请联系IT部门,错误信息:" + err.Error()
commonlib.OutputJson(w, m, " ")
return
}
m["PageData"] = pageData
m["Entity"] = entity
m["Gridpanel"] = gridpanel
m["DataLength"] = len(pageData.Datas) - 1
if len(pageData.Datas) > 0 {
m["FieldLength"] = len(pageData.Datas[0].(*Model).Props) - 1
}
commonlib.RenderTemplate(w, r, "entity_page.json", m, template.FuncMap{"getPropValue": GetPropValue, "compareInt": CompareInt, "compareString": CompareString, "dealJsonString": DealJsonString}, "../lessgo/template/entity_page.json")
}
//处理实体的所有数据ajax请求
func dealEntityAllData(entity Entity, w http.ResponseWriter, r *http.Request) {
m := make(map[string]interface{})
employee := GetCurrentEmployee(r)
if employee.UserId == "" {
Log.Warn("用户未登陆")
m["success"] = false
m["code"] = 100
m["msg"] = "用户未登陆"
commonlib.OutputJson(w, m, " ")
return
}
Log.Debug("路径:", r.URL.Path, "访问实体", entity.Id, "的所有数据ajax请求")
err := r.ParseForm()
models, err := findAllData(entity)
if err != nil {
m["success"] = false
m["code"] = 100
m["msg"] = "出现错误,请联系IT部门,错误信息:" + err.Error()
commonlib.OutputJson(w, m, " ")
return
}
m["Models"] = models
m["Entity"] = entity
m["DataLength"] = len(models) - 1
if len(models) > 0 {
m["FieldLength"] = len(models[0].Props) - 1
}
commonlib.RenderTemplate(w, r, "entity_alldata.json", m, template.FuncMap{"getPropValue": GetPropValue, "compareInt": CompareInt}, "../lessgo/template/entity_alldata.json")
}
//处理实体的分页ajax请求
func dealEntityLoad(entity Entity, w http.ResponseWriter, r *http.Request) {
m := make(map[string]interface{})
employee := GetCurrentEmployee(r)
if employee.UserId == "" {
Log.Warn("用户未登陆")
m["success"] = false
m["code"] = 100
m["msg"] = "用户未登陆"
commonlib.OutputJson(w, m, " ")
return
}
Log.Debug("路径:", r.URL.Path, "访问实体", entity.Id, "的load单实体ajax请求")
vars := mux.Vars(r)
id := vars["id"]
model, err := findById(entity, id)
if err != nil {
m["success"] = false
m["code"] = 100
m["msg"] = "出现错误,请联系IT部门,错误信息:" + err.Error()
commonlib.OutputJson(w, m, " ")
return
}
if model.Id == "" {
m["success"] = false
m["code"] = 100
m["msg"] = "出现错误,请联系IT部门,错误信息:找不到相应的实体"
commonlib.OutputJson(w, m, " ")
return
}
m["Entity"] = entity
m["Model"] = model
m["FieldLength"] = len(entity.Fields) - 1
commonlib.RenderTemplate(w, r, "entity_load.json", m, template.FuncMap{"getPropValue": GetPropValue, "compareInt": CompareInt}, "../lessgo/template/entity_load.json")
}