Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
zendata
提交
056c859f
Z
zendata
项目概览
LinuxSuRen
/
zendata
与 Fork 源项目一致
Fork自
易企天创 / zendata
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zendata
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
056c859f
编写于
8月 11, 2020
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update for service message
上级
fe3a4548
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
11 addition
and
7 deletion
+11
-7
res/en/messages.json
res/en/messages.json
+2
-2
res/zh/messages.json
res/zh/messages.json
+2
-2
res/zh/sample.yaml
res/zh/sample.yaml
+1
-1
src/action/generator.go
src/action/generator.go
+1
-1
src/utils/log/print.go
src/utils/log/print.go
+4
-0
src/zd.go
src/zd.go
+1
-1
未找到文件。
res/en/messages.json
浏览文件 @
056c859f
...
...
@@ -103,11 +103,11 @@
},
{
"id"
:
"server_request"
,
"translation"
:
"
\n
Got %s request %s."
"translation"
:
"
\n
Got %s request %s.
"
},
{
"id"
:
"server_response"
,
"translation"
:
"
\n
Create %d records in %d sec."
"translation"
:
"Create %d records in %d sec."
},
{
"id"
:
"excel_data"
,
...
...
res/zh/messages.json
浏览文件 @
056c859f
...
...
@@ -94,11 +94,11 @@
},
{
"id"
:
"server_request"
,
"translation"
:
"
\n
收到%s请求 %s
.
"
"translation"
:
"
\n
收到%s请求 %s
。
"
},
{
"id"
:
"server_response"
,
"translation"
:
"生成%d条记录,耗时%d秒"
"translation"
:
"生成%d条记录,耗时%d秒
。
"
},
{
"id"
:
"excel_data"
,
...
...
res/zh/sample.yaml
浏览文件 @
056c859f
...
...
@@ -120,7 +120,7 @@ fields:
-
field
:
field_use_excel
# 从excel数据源里面取数据。
from
:
system.address.v1.china
# 从data/system/address/v1.xlsx文件中读取名为china的工作簿。
select
:
city
# 查询city字段。
where
:
state like '%山东%'
# 条件是省份包含山东。
where
:
state like '%山东%'
# 条件是省份包含山东。
postfix
:
"
\t
"
-
field
:
field_with_children
# 嵌套字段
...
...
src/action/generator.go
浏览文件 @
056c859f
...
...
@@ -46,7 +46,7 @@ func Generate(defaultFile string, configFile string, total int, fieldsToExportSt
entTime
:=
time
.
Now
()
.
Unix
()
if
vari
.
RunMode
==
constant
.
RunModeServerRequest
{
logUtils
.
PrintTo
WithColor
(
i118Utils
.
I118Prt
.
Sprintf
(
"server_response"
,
len
(
rows
),
entTime
-
startTime
),
color
.
FgCyan
)
logUtils
.
PrintTo
(
i118Utils
.
I118Prt
.
Sprintf
(
"server_response"
,
len
(
rows
),
entTime
-
startTime
)
)
}
}
...
...
src/utils/log/print.go
浏览文件 @
056c859f
...
...
@@ -55,6 +55,10 @@ func PrintTo(str string) {
output
:=
color
.
Output
fmt
.
Fprint
(
output
,
str
+
"
\n
"
)
}
func
PrintToWithoutNewLine
(
str
string
)
{
output
:=
color
.
Output
fmt
.
Fprint
(
output
,
str
)
}
func
PrintToWithColor
(
msg
string
,
attr
color
.
Attribute
)
{
output
:=
color
.
Output
...
...
src/zd.go
浏览文件 @
056c859f
...
...
@@ -242,7 +242,7 @@ func DataHandler(writer http.ResponseWriter, req *http.Request) {
fmt
.
Fprintln
(
writer
,
vari
.
JsonResp
)
}
else
if
defaultFile
!=
""
||
configFile
!=
""
{
vari
.
RunMode
=
constant
.
RunModeServerRequest
logUtils
.
PrintTo
(
i118Utils
.
I118Prt
.
Sprintf
(
"server_request"
,
req
.
Method
,
req
.
URL
))
logUtils
.
PrintTo
WithoutNewLine
(
i118Utils
.
I118Prt
.
Sprintf
(
"server_request"
,
req
.
Method
,
req
.
URL
))
toGen
()
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录