切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
郑周
2 years ago
提交
b8321d211d5b12f19b67b6a6e5ab48b93fb59caa
1 个父辈
b3b05005
1. 数据不存在时,返回数据格式
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
14 行增加
和
6 行删除
pkg/application/summary_evaluation/service/service2.go
pkg/infrastructure/repository/pg_summary_evaluation_repository.go
pkg/application/summary_evaluation/service/service2.go
查看文件 @
b8321d2
...
...
@@ -212,8 +212,10 @@ func (srv *SummaryEvaluationService) GetEvaluation360(param *command.QueryEvalua
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
if
len
(
evaluations
)
==
0
{
return
nil
,
application
.
ThrowError
(
application
.
BUSINESS_ERROR
,
"数据不存在"
)
if
len
(
evaluations
)
==
0
{
// 数据不存在
result
:=
adapter
.
EvaluationInfoAdapter
{}
result
.
EvaluationItems
=
make
([]
adapter
.
EvaluationItemAdapter
,
0
)
return
&
result
,
nil
}
sEvaluation
:=
evaluations
[
0
]
...
...
@@ -280,7 +282,10 @@ func (srv *SummaryEvaluationService) GetEvaluation360All(param *command.QueryEva
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
if
len
(
evaluations
)
==
0
{
return
nil
,
application
.
ThrowError
(
application
.
BUSINESS_ERROR
,
"数据不存在"
)
result
:=
adapter
.
EvaluationInfoAdapter
{}
result
.
EvaluationItems
=
make
([]
adapter
.
EvaluationItemAdapter
,
0
)
return
&
result
,
nil
//return nil, application.ThrowError(application.BUSINESS_ERROR, "数据不存在")
}
sEvaluation
:=
evaluations
[
0
]
...
...
@@ -611,8 +616,11 @@ func (srv *SummaryEvaluationService) GetEvaluationHRBP(param *command.QueryEvalu
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
if
len
(
evaluations
)
==
0
{
return
nil
,
application
.
ThrowError
(
application
.
BUSINESS_ERROR
,
"数据不存在"
)
if
len
(
evaluations
)
==
0
{
// 数据不存在
result
:=
adapter
.
EvaluationInfoAdapter
{}
result
.
EvaluationItems
=
make
([]
adapter
.
EvaluationItemAdapter
,
0
)
return
&
result
,
nil
//return nil, application.ThrowError(application.BUSINESS_ERROR, "数据不存在")
}
sEvaluation
:=
evaluations
[
0
]
...
...
pkg/infrastructure/repository/pg_summary_evaluation_repository.go
查看文件 @
b8321d2
...
...
@@ -154,7 +154,7 @@ func (repo *SummaryEvaluationRepository) Find(queryOptions map[string]interface{
query
.
Where
(
`summary_evaluation.target_user->>'userId'='?'`
,
v
)
}
if
v
,
ok
:=
queryOptions
[
"targetUserName"
]
;
ok
{
if
v
,
ok
:=
queryOptions
[
"targetUserName"
]
.
(
string
);
ok
&&
len
(
v
)
>
0
{
query
.
Where
(
`summary_evaluation.target_user->>'userName' like ?`
,
v
)
}
...
...
请
注册
或
登录
后发表评论