作者 tangxvhui

修正 操作权限判定

... ... @@ -42,6 +42,7 @@ func startNodeTask() {
}()
}
// 定时任务-间隔检查时间,发送周期评估
func startSummaryEvaluation() {
go func() {
duration := 10 * time.Minute
... ... @@ -57,6 +58,5 @@ func startSummaryEvaluation() {
}
timer.Reset(duration) // 重置定时
}
}()
}
... ...
... ... @@ -681,10 +681,10 @@ func (srv *SummaryEvaluationService) GetEvaluationSuper(param *command.QueryEval
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
if evaluationData.Types == domain.EvaluationSuper {
if evaluationData.Types != domain.EvaluationSuper {
return nil, application.ThrowError(application.BUSINESS_ERROR, "没有操作权限")
}
if evaluationData.CompanyId == param.CompanyId {
if evaluationData.CompanyId != param.CompanyId {
return nil, application.ThrowError(application.BUSINESS_ERROR, "没有操作权限")
}
_, itemList, err := evaluationItemRepo.Find(map[string]interface{}{
... ... @@ -1126,7 +1126,7 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有找到符合条件的数据")
}
evaluationData := evaluationList[0]
if evaluationData.CompanyId == param.CompanyId {
if evaluationData.CompanyId != param.CompanyId {
return nil, application.ThrowError(application.BUSINESS_ERROR, "没有操作权限")
}
_, itemList, err := evaluationItemRepo.Find(map[string]interface{}{
... ...