Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
e999bedb
Commit
e999bedb
authored
Jan 20, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增缓存字段
parent
6ed9df02
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
5 deletions
+25
-5
UserReidsCache.cs
Edu.Cache/User/UserReidsCache.cs
+12
-1
UserInfo.cs
Edu.Model/CacheModel/UserInfo.cs
+5
-0
LoginController.cs
Edu.WebApi/Controllers/User/LoginController.cs
+8
-4
No files found.
Edu.Cache/User/UserReidsCache.cs
View file @
e999bedb
...
...
@@ -105,6 +105,10 @@ namespace Edu.Cache.User
/// 账号仓储层对象
/// </summary>
private
static
readonly
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
/// <summary>
/// 部门仓储层对象
/// </summary>
private
static
readonly
RB_DepartmentRepository
departmentRepository
=
new
RB_DepartmentRepository
();
/// <summary>
/// 获取用户登录信息
...
...
@@ -138,12 +142,18 @@ namespace Edu.Cache.User
})?.
FirstOrDefault
();
if
(
model
!=
null
)
{
var
deptList
=
departmentRepository
.
GetDepartmentListRepository
(
new
Model
.
ViewModel
.
User
.
RB_Department_ViewModel
()
{
DeptId
=
model
.
Dept_Id
,
Group_Id
=
model
.
Group_Id
,
ManagerIds
=
model
.
Id
.
ToString
()
});
userInfo
=
new
UserInfo
{
Id
=
model
.
Id
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
model
.
School_Id
,
AccountType
=
model
.
AccountType
,
AccountType
=
model
.
AccountType
,
AccountName
=
model
.
AccountName
,
GroupName
=
model
.
GroupName
,
SchoolName
=
model
.
SchoolName
,
...
...
@@ -165,6 +175,7 @@ namespace Edu.Cache.User
IsTenCccUser
=
model
.
IsTenCccUser
,
IsCourseConsultant
=
(
model
!=
null
&&
model
.
UserRole
==
UserRoleEnum
.
CourseConsultant
)
?
1
:
0
,
IsMarket
=
(
model
!=
null
&&
model
.
UserRole
==
UserRoleEnum
.
MarketPersion
)
?
1
:
0
,
IsManager
=
(
deptList
?.
Count
??
0
)
>
0
?
1
:
0
,
};
UserInfoSet
(
Cache
.
CacheKey
.
User_Login_Key
+
Id
.
ToString
(),
userInfo
,
Common
.
Config
.
JwtExpirTime
);
}
...
...
Edu.Model/CacheModel/UserInfo.cs
View file @
e999bedb
...
...
@@ -177,6 +177,11 @@ namespace Edu.Model.CacheModel
/// 是否是市场(1-是)
/// </summary>
public
int
IsMarket
{
get
;
set
;
}
/// <summary>
/// 部门负责人(1-是)
/// </summary>
public
int
IsManager
{
get
;
set
;
}
}
/// <summary>
...
...
Edu.WebApi/Controllers/User/LoginController.cs
View file @
e999bedb
...
...
@@ -54,6 +54,11 @@ namespace Edu.WebApi.Controllers.User
private
readonly
StudentModule
studentModule
=
new
StudentModule
();
/// <summary>
/// 部门处理类对象
/// </summary>
private
readonly
DepartmentModule
departmentModule
=
new
DepartmentModule
();
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
...
...
@@ -153,10 +158,6 @@ namespace Edu.WebApi.Controllers.User
string
erpToken
=
WebApiTokenHelper
.
CreateToken
(
Common
.
GlobalKey
.
JWT_ERP_User_Key
,
erpUserInfo
);
#
region
获取甲鹤教育
Token
string
JHTenantId
=
Config
.
JHTenantId
;
string
JHMallBaseId
=
Config
.
JHMallBaseId
;
...
...
@@ -190,6 +191,7 @@ namespace Edu.WebApi.Controllers.User
#
endregion
var
treeList
=
menuModule
.
GetPostMenuTreeModule
(
new
Model
.
ViewModel
.
System
.
RB_Menu_ViewModel
()
{
MenuType
=
accountType
...
...
@@ -198,6 +200,7 @@ namespace Edu.WebApi.Controllers.User
var
actionList
=
menuModule
.
GetPostMenuFunctionListModule
(
model
.
Post_Id
.
ToString
());
//上传配置
var
uploadConfig
=
publicModule
.
GetFileStoreList
(
new
Model
.
Public
.
RB_File_Store
()
{
Group_Id
=
model
.
Group_Id
,
IsDefault
=
1
})?.
FirstOrDefault
();
var
deptList
=
departmentModule
.
GetDepartmentListModule
(
new
RB_Department_ViewModel
()
{
DeptId
=
model
.
Dept_Id
,
Group_Id
=
model
.
Group_Id
,
ManagerIds
=
model
.
Id
.
ToString
()
});
UserInfo
obj
=
new
UserInfo
{
...
...
@@ -225,6 +228,7 @@ namespace Edu.WebApi.Controllers.User
PostId
=
model
.
Post_Id
,
PostName
=
model
.
PostName
,
Email
=
model
.
Email
,
IsManager
=(
deptList
?.
Count
??
0
)>
0
?
1
:
0
,
IsTenCccUser
=
model
.
IsTenCccUser
,
IsCourseConsultant
=
(
model
!=
null
&&
model
.
UserRole
==
UserRoleEnum
.
CourseConsultant
)
?
1
:
0
,
IsMarket
=
(
model
!=
null
&&
model
.
UserRole
==
UserRoleEnum
.
MarketPersion
)
?
1
:
0
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment