是
This commit is contained in:
parent
a85d543c36
commit
89dca4e2d2
@ -225,7 +225,7 @@ namespace VOL.Business.Services.School
|
|||||||
var schoolModel = await (from s in _schoolRepository.DbContext.Set<S_School>()
|
var schoolModel = await (from s in _schoolRepository.DbContext.Set<S_School>()
|
||||||
join u in _userRepository.DbContext.Set<Sys_User>()
|
join u in _userRepository.DbContext.Set<Sys_User>()
|
||||||
on s.SchoolCode equals u.SchoolCode
|
on s.SchoolCode equals u.SchoolCode
|
||||||
where u.Role_Id == 2 && s.SchoolCode == schoolCode
|
where (u.Role_Id == 2 || u.Role_Id == 4) && s.SchoolCode == schoolCode
|
||||||
select new SchoolPageListModel()
|
select new SchoolPageListModel()
|
||||||
{
|
{
|
||||||
Id = s.Id,
|
Id = s.Id,
|
||||||
@ -265,7 +265,7 @@ namespace VOL.Business.Services.School
|
|||||||
schoolModel.ModifyDate = DateTime.Now;
|
schoolModel.ModifyDate = DateTime.Now;
|
||||||
schoolModel.Modifier = UserContext.Current.UserId;
|
schoolModel.Modifier = UserContext.Current.UserId;
|
||||||
|
|
||||||
var user = await _userRepository.FindAsyncFirst(x => x.UserName == paramDto.UserName && x.Role_Id == 2);
|
var user = await _userRepository.FindAsyncFirst(x => x.UserName == paramDto.UserName && x.Role_Id == 2 || x.Role_Id == 4);
|
||||||
if (user == null)
|
if (user == null)
|
||||||
throw new Exception($"未找到用户名为{paramDto.UserName}的学校");
|
throw new Exception($"未找到用户名为{paramDto.UserName}的学校");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user