切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
郑周
2 years ago
提交
9dcfc85bb193f68671929a77336ffb3ada22a0ab
1 个父辈
f62e8af9
调试 项目接口
显示空白字符变更
内嵌
并排对比
正在显示
9 个修改的文件
包含
17 行增加
和
17 行删除
pkg/application/evaluation_project/project_service.go
pkg/infrastructure/repository/pg_evaluation_cycle_repository.go
pkg/infrastructure/repository/pg_evaluation_cycle_template_repository.go
pkg/infrastructure/repository/pg_evaluation_project_repository.go
pkg/infrastructure/repository/pg_evaluation_rule_repository.go
pkg/infrastructure/repository/pg_evaluation_template_repository.go
pkg/infrastructure/repository/pg_role_repository.go
pkg/infrastructure/repository/pg_role_user_repository.go
pkg/infrastructure/repository/pg_user_repository.go
pkg/application/evaluation_project/project_service.go
查看文件 @
9dcfc85
...
...
@@ -418,5 +418,5 @@ func (rs *EvaluationProjectService) CheckRecipients(in *command.CheckRecipientCo
if
err
:=
transactionContext
.
CommitTransaction
();
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
TRANSACTION_ERROR
,
err
.
Error
())
}
return
repeatNum
,
nil
return
map
[
string
]
interface
{}{
"repeatNum"
:
repeatNum
}
,
nil
}
...
...
pkg/infrastructure/repository/pg_evaluation_cycle_repository.go
查看文件 @
9dcfc85
...
...
@@ -119,7 +119,7 @@ func (repo *EvaluationCycleRepository) Find(queryOptions map[string]interface{})
query
:=
tx
.
Model
(
&
m
)
.
Where
(
"deleted_at isnull"
)
if
v
,
ok
:=
queryOptions
[
"name"
]
;
ok
&&
len
(
v
.
(
string
)
)
>
0
{
if
v
,
ok
:=
queryOptions
[
"name"
]
.
(
string
);
ok
&&
len
(
v
)
>
0
{
query
.
Where
(
"name LIKE ?"
,
v
)
}
...
...
@@ -170,7 +170,7 @@ func (repo *EvaluationCycleRepository) Count(queryOptions map[string]interface{}
query
.
Where
(
"id != ?"
,
notId
)
}
if
v
,
ok
:=
queryOptions
[
"name"
]
;
ok
{
if
v
,
ok
:=
queryOptions
[
"name"
]
.
(
string
);
ok
&&
len
(
v
)
>
0
{
query
.
Where
(
"name = ?"
,
v
)
}
...
...
pkg/infrastructure/repository/pg_evaluation_cycle_template_repository.go
查看文件 @
9dcfc85
...
...
@@ -186,7 +186,7 @@ func (repo *EvaluationCycleTemplateRepository) Count(queryOptions map[string]int
query
.
Where
(
"id != ?"
,
v
)
}
if
v
,
ok
:=
queryOptions
[
"name"
]
;
ok
{
if
v
,
ok
:=
queryOptions
[
"name"
]
.
(
string
);
ok
&&
len
(
v
)
>
0
{
query
.
Where
(
"name = ?"
,
v
)
}
...
...
pkg/infrastructure/repository/pg_evaluation_project_repository.go
查看文件 @
9dcfc85
...
...
@@ -131,7 +131,7 @@ func (repo *EvaluationProjectRepository) Find(queryOptions map[string]interface{
query
.
ExcludeColumn
(
excludeColumns
...
)
}
if
v
,
ok
:=
queryOptions
[
"name"
]
;
ok
{
if
v
,
ok
:=
queryOptions
[
"name"
]
.
(
string
);
ok
&&
len
(
v
)
>
0
{
query
.
Where
(
"name = ?"
,
v
)
}
...
...
@@ -192,7 +192,7 @@ func (repo *EvaluationProjectRepository) Count(queryOptions map[string]interface
query
.
Where
(
"id != ?"
,
v
)
}
if
v
,
ok
:=
queryOptions
[
"name"
]
;
ok
{
if
v
,
ok
:=
queryOptions
[
"name"
]
.
(
string
);
ok
&&
len
(
v
)
>
0
{
query
.
Where
(
"name = ?"
,
v
)
}
...
...
pkg/infrastructure/repository/pg_evaluation_rule_repository.go
查看文件 @
9dcfc85
...
...
@@ -127,7 +127,7 @@ func (repo *EvaluationRuleRepository) Find(queryOptions map[string]interface{})
query
.
Where
(
"id in(?)"
,
pg
.
In
(
v
))
}
if
v
,
ok
:=
queryOptions
[
"name"
]
;
ok
{
if
v
,
ok
:=
queryOptions
[
"name"
]
.
(
string
);
ok
&&
len
(
v
)
>
0
{
query
.
Where
(
"name = ?"
,
v
)
}
...
...
@@ -176,7 +176,7 @@ func (repo *EvaluationRuleRepository) Count(queryOptions map[string]interface{})
query
.
Where
(
"id != ?"
,
v
)
}
if
v
,
ok
:=
queryOptions
[
"name"
]
;
ok
{
if
v
,
ok
:=
queryOptions
[
"name"
]
.
(
string
);
ok
&&
len
(
v
)
>
0
{
query
.
Where
(
"name = ?"
,
v
)
}
...
...
pkg/infrastructure/repository/pg_evaluation_template_repository.go
查看文件 @
9dcfc85
...
...
@@ -129,7 +129,7 @@ func (repo *EvaluationTemplateRepository) Find(queryOptions map[string]interface
query
.
Where
(
"id != ?"
,
v
)
}
if
v
,
ok
:=
queryOptions
[
"name"
]
;
ok
&&
len
(
v
.
(
string
)
)
>
0
{
if
v
,
ok
:=
queryOptions
[
"name"
]
.
(
string
);
ok
&&
len
(
v
)
>
0
{
query
.
Where
(
"name LIKE ?"
,
v
)
}
...
...
@@ -186,7 +186,7 @@ func (repo *EvaluationTemplateRepository) Count(queryOptions map[string]interfac
query
.
Where
(
"id != ?"
,
v
)
}
if
v
,
ok
:=
queryOptions
[
"name"
]
;
ok
{
if
v
,
ok
:=
queryOptions
[
"name"
]
.
(
string
);
ok
&&
len
(
v
)
>
0
{
query
.
Where
(
"name = ?"
,
v
)
}
...
...
pkg/infrastructure/repository/pg_role_repository.go
查看文件 @
9dcfc85
...
...
@@ -113,8 +113,8 @@ func (repo *RoleRepository) Find(queryOptions map[string]interface{}) (int64, []
var
m
[]
*
models
.
Role
query
:=
tx
.
Model
(
&
m
)
.
Where
(
"deleted_at isnull"
)
if
name
,
ok
:=
queryOptions
[
"name"
];
ok
{
query
.
Where
(
"name = ?"
,
name
)
if
v
,
ok
:=
queryOptions
[
"name"
]
.
(
string
);
ok
&&
len
(
v
)
>
0
{
query
.
Where
(
"name = ?"
,
v
)
}
if
companyId
,
ok
:=
queryOptions
[
"companyId"
];
ok
{
...
...
@@ -154,8 +154,8 @@ func (repo *RoleRepository) Count(queryOptions map[string]interface{}) (int64, e
query
.
Where
(
"id != ?"
,
notId
)
}
if
name
,
ok
:=
queryOptions
[
"name"
];
ok
{
query
.
Where
(
"name = ?"
,
name
)
if
v
,
ok
:=
queryOptions
[
"name"
]
.
(
string
);
ok
&&
len
(
v
)
>
0
{
query
.
Where
(
"name = ?"
,
v
)
}
if
companyId
,
ok
:=
queryOptions
[
"companyId"
];
ok
{
...
...
pkg/infrastructure/repository/pg_role_user_repository.go
查看文件 @
9dcfc85
...
...
@@ -161,8 +161,8 @@ func (repo *RoleUserRepository) Count(queryOptions map[string]interface{}) (int6
query
.
Where
(
"id != ?"
,
notId
)
}
if
name
,
ok
:=
queryOptions
[
"name"
];
ok
{
query
.
Where
(
"name = ?"
,
name
)
if
v
,
ok
:=
queryOptions
[
"name"
]
.
(
string
);
ok
&&
len
(
v
)
>
0
{
query
.
Where
(
"name = ?"
,
v
)
}
if
companyId
,
ok
:=
queryOptions
[
"companyId"
];
ok
{
...
...
pkg/infrastructure/repository/pg_user_repository.go
查看文件 @
9dcfc85
...
...
@@ -116,7 +116,7 @@ func (repo *UserRepository) Find(queryOptions map[string]interface{}) (int, []*d
if
v
,
ok
:=
queryOptions
[
"account"
];
ok
{
query
.
Where
(
"account like ?"
,
v
)
}
if
v
,
ok
:=
queryOptions
[
"name"
]
;
ok
{
if
v
,
ok
:=
queryOptions
[
"name"
]
.
(
string
);
ok
&&
len
(
v
)
>
0
{
query
.
Where
(
"name like ?"
,
fmt
.
Sprintf
(
"%%%v%%"
,
v
))
}
if
v
,
ok
:=
queryOptions
[
"offset"
];
ok
{
...
...
请
注册
或
登录
后发表评论