切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
郑周
2 years ago
提交
64378cb5aeb7fe8d5d062e531f076a81d0147dda
2 个父辈
a45bf10d
d895c47a
Merge branch 'dev-zhengzhou' into test
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
6 行增加
和
0 行删除
pkg/application/evaluation_template/command/template_create.go
pkg/application/evaluation_template/template_service.go
pkg/port/beego/controllers/import_controller.go
pkg/application/evaluation_template/command/template_create.go
查看文件 @
64378cb
...
...
@@ -12,6 +12,7 @@ type CreateTemplateCommand struct {
Name
string
`cname:"模板名称" json:"name" valid:"Required"`
Describe
string
`cname:"模板描述" json:"describe"`
NodeContents
[]
*
domain
.
NodeContent
`cname:"环节-评估内容" json:"nodeContents"`
State
int
`cname:"状态(0待完成配置、1待启用、2启用、3停用)"`
}
func
(
in
*
CreateTemplateCommand
)
Valid
(
validation
*
validation
.
Validation
)
{
...
...
pkg/application/evaluation_template/template_service.go
查看文件 @
64378cb
...
...
@@ -93,6 +93,10 @@ func (rs *EvaluationTemplateService) Create(in *command.CreateTemplateCommand) (
State
:
domain
.
TemplateStateWaitConfig
,
LinkNodes
:
linkNodes
,
}
if
in
.
State
>
domain
.
TemplateStateWaitConfig
{
newTemplate
.
State
=
in
.
State
}
template
,
err
:=
templateRepository
.
Insert
(
newTemplate
)
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
...
...
pkg/port/beego/controllers/import_controller.go
查看文件 @
64378cb
...
...
@@ -422,6 +422,7 @@ func (controller *ImportController) parserAndInsert(file *os.File, fileName stri
in
.
Name
=
nameOnly
in
.
Describe
=
""
in
.
NodeContents
=
list
in
.
State
=
domain
.
TemplateStateWaitActive
if
_
,
err
:=
ruService
.
Create
(
in
);
err
!=
nil
{
return
application
.
ThrowError
(
application
.
ARG_ERROR
,
err
.
Error
())
...
...
请
注册
或
登录
后发表评论