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
c1834eb9
Commit
c1834eb9
authored
Dec 17, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
d789cead
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
77 additions
and
36 deletions
+77
-36
RB_Manager.cs
Edu.Model/Entity/User/RB_Manager.cs
+5
-0
RB_Teacher.cs
Edu.Model/Entity/User/RB_Teacher.cs
+5
-0
Employee_ViewModel.cs
Edu.Model/ViewModel/User/Employee_ViewModel.cs
+5
-0
EmployeeModule.cs
Edu.Module.User/EmployeeModule.cs
+4
-2
ManagerModule.cs
Edu.Module.User/ManagerModule.cs
+5
-0
TeacherModule.cs
Edu.Module.User/TeacherModule.cs
+5
-0
RB_AccountRepository.cs
Edu.Repository/User/RB_AccountRepository.cs
+3
-3
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+45
-31
No files found.
Edu.Model/Entity/User/RB_Manager.cs
View file @
c1834eb9
...
...
@@ -121,5 +121,10 @@ namespace Edu.Model.Entity.User
/// 邮箱
/// </summary>
public
string
Email
{
get
;
set
;
}
/// <summary>
/// 用户角色(1-市场人员,2-课程顾问)
/// </summary>
public
UserRoleEnum
UserRole
{
get
;
set
;
}
}
}
Edu.Model/Entity/User/RB_Teacher.cs
View file @
c1834eb9
...
...
@@ -202,5 +202,10 @@ namespace Edu.Model.Entity.User
/// 启用时间 (存到月)
/// </summary>
public
string
EnableTime
{
get
;
set
;
}
/// <summary>
/// 用户角色(1-市场人员,2-课程顾问)
/// </summary>
public
UserRoleEnum
UserRole
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/User/Employee_ViewModel.cs
View file @
c1834eb9
...
...
@@ -206,5 +206,10 @@ namespace Edu.Model.ViewModel.User
/// 企业微信用户Ids
/// </summary>
public
string
WorkUserIds
{
get
;
set
;
}
/// <summary>
/// 用户角色(1-市场人员,2-课程顾问)
/// </summary>
public
UserRoleEnum
UserRole
{
get
;
set
;
}
}
}
Edu.Module.User/EmployeeModule.cs
View file @
c1834eb9
...
...
@@ -187,7 +187,8 @@ namespace Edu.Module.User
DirectSupervisor
=
extModel
.
DirectSupervisor
,
ManagerAccount
=
extModel
.
Account
,
Password
=
extModel
.
Password
,
Token
=
token
Token
=
token
,
UserRole
=
extModel
.
UserRole
,
});
break
;
case
Common
.
Enum
.
User
.
AccountTypeEnum
.
Teacher
:
...
...
@@ -218,7 +219,8 @@ namespace Edu.Module.User
DirectSupervisor
=
extModel
.
DirectSupervisor
,
TeacherAccount
=
extModel
.
Account
,
Password
=
extModel
.
Password
,
Token
=
token
Token
=
token
,
UserRole
=
extModel
.
UserRole
,
});
break
;
case
Common
.
Enum
.
User
.
AccountTypeEnum
.
Assist
:
...
...
Edu.Module.User/ManagerModule.cs
View file @
c1834eb9
...
...
@@ -115,6 +115,7 @@ namespace Edu.Module.User
{
nameof
(
RB_Manager_ViewModel
.
LeaveTime
),
model
.
LeaveTime
},
{
nameof
(
RB_Manager_ViewModel
.
Education
),
model
.
Education
},
{
nameof
(
RB_Manager_ViewModel
.
Email
),
model
.
Email
},
{
nameof
(
RB_Manager_ViewModel
.
UserRole
),
model
.
UserRole
},
};
#
region
日志
...
...
@@ -163,6 +164,10 @@ namespace Edu.Module.User
{
logContent
+=
string
.
Format
(
",将邮箱由【{0}】修改为【{1}】。"
,
oldModel
.
Email
,
model
.
Email
);
}
if
(
model
.
UserRole
!=
oldModel
.
UserRole
)
{
logContent
+=
string
.
Format
(
",用户角色由【{0}】修改为【{1}】。"
,
oldModel
.
UserRole
.
ToName
(),
model
.
UserRole
.
ToName
());
}
if
(!
string
.
IsNullOrEmpty
(
logContent
))
{
//新增日志
...
...
Edu.Module.User/TeacherModule.cs
View file @
c1834eb9
...
...
@@ -180,6 +180,7 @@ namespace Edu.Module.User
fileds
.
Add
(
nameof
(
RB_Teacher_ViewModel
.
LeaveTime
),
model
.
LeaveTime
);
fileds
.
Add
(
nameof
(
RB_Teacher_ViewModel
.
Education
),
model
.
Education
);
fileds
.
Add
(
nameof
(
RB_Teacher_ViewModel
.
Email
),
model
.
Email
);
fileds
.
Add
(
nameof
(
RB_Teacher_ViewModel
.
UserRole
),
model
.
UserRole
);
}
#
region
修改日志
string
logContent
=
""
;
...
...
@@ -239,6 +240,10 @@ namespace Edu.Module.User
{
logContent
+=
string
.
Format
(
",将基础带班人数由【{0}】修改为【{1}】。"
,
oldModel
.
BaseStuNum
,
model
.
BaseStuNum
);
}
if
(
model
.
UserRole
!=
oldModel
.
UserRole
)
{
logContent
+=
string
.
Format
(
",将用户角色由【{0}】修改为【{1}】。"
,
oldModel
.
UserRole
,
model
.
UserRole
);
}
if
(!
string
.
IsNullOrEmpty
(
logContent
))
{
//新增日志
...
...
Edu.Repository/User/RB_AccountRepository.cs
View file @
c1834eb9
...
...
@@ -480,7 +480,7 @@ FROM
,b.School_Id,IFNULL(B.MName,'') AS EmployeeName,B.MHead AS UserIcon,B.Dept_Id,B.Post_Id,B.IDCard
,B.Sex,B.Education,B.EntryTime,B.Address,B.BirthDate
,B.LeaveStatus,B.LeaveTime,B.MTel AS EmployeeTel,IFNULL(B.Email,'') AS Email
,0 as BaseHourFee,0 as BaseHoursEnabled,'' as EnableTime
,0 as BaseHourFee,0 as BaseHoursEnabled,'' as EnableTime
,B.UserRole
FROM rb_manager AS B LEFT JOIN rb_account AS A ON A.AccountId=B.MId AND A.AccountType=1
WHERE 1=1 {0} {1}
UNION ALL
...
...
@@ -489,7 +489,7 @@ FROM
,b.School_Id,IFNULL(B.TeacherName,'') AS EmployeeName,B.TeacherIcon AS UserIcon,B.Dept_Id,B.Post_Id,B.IDCard
,B.Sex,B.Education,B.EntryTime,B.Address,B.BirthDate
,B.LeaveStatus,B.LeaveTime,B.TeacherTel AS EmployeeTel,IFNULL(B.Email,'') AS Email
,B.BaseHourFee,B.BaseHoursEnabled,B.EnableTime
,B.BaseHourFee,B.BaseHoursEnabled,B.EnableTime
,B.UserRole
FROM rb_teacher AS B LEFT JOIN rb_account AS A ON A.AccountId=B.TId AND A.AccountType=2
WHERE 1=1 {0} {2}
UNION ALL
...
...
@@ -498,7 +498,7 @@ FROM
,b.School_Id,IFNULL(B.AssistName,'') AS EmployeeName,B.AssistIcon AS UserIcon,B.Dept_Id,B.Post_Id,B.IDCard
,B.Sex,B.Education,B.EntryTime,B.Address,B.BirthDate
,B.LeaveStatus,B.LeaveTime,B.AssistTel AS EmployeeTel,IFNULL(B.Email,'') AS Email
,0 as BaseHourFee,0 as BaseHoursEnabled,'' as EnableTime
,0 as BaseHourFee,0 as BaseHoursEnabled,'' as EnableTime
,0 AS UserRole
FROM rb_assist AS B LEFT JOIN rb_account AS A ON A.AccountId=B.AId AND A.AccountType=3
WHERE 1=1 {0} {3}
) AS A LEFT JOIN rb_group AS g ON A.Group_Id=g.GId
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
c1834eb9
...
...
@@ -675,11 +675,11 @@ namespace Edu.WebApi.Controllers.User
StuStage
=
base
.
ParmJObj
.
GetInt
(
"StuStage"
),
StartTime
=
base
.
ParmJObj
.
GetStringValue
(
"StartTime"
),
EndTime
=
base
.
ParmJObj
.
GetStringValue
(
"EndTime"
),
BelongType
=
base
.
ParmJObj
.
GetInt
(
"BelongType"
),
BelongType
=
base
.
ParmJObj
.
GetInt
(
"BelongType"
),
QStudentType
=
base
.
ParmJObj
.
GetInt
(
"QStudentType"
,
-
1
),
QQ
=
base
.
ParmJObj
.
GetStringValue
(
"QQ"
),
WeChatNo
=
base
.
ParmJObj
.
GetStringValue
(
"WeChatNo"
),
StuType
=
base
.
ParmJObj
.
GetInt
(
"StuType"
),
QQ
=
base
.
ParmJObj
.
GetStringValue
(
"QQ"
),
WeChatNo
=
base
.
ParmJObj
.
GetStringValue
(
"WeChatNo"
),
StuType
=
base
.
ParmJObj
.
GetInt
(
"StuType"
),
};
if
(
query
.
IsQueryMyStu
==
1
)
{
...
...
@@ -722,7 +722,7 @@ namespace Edu.WebApi.Controllers.User
item
.
CreateType
,
CreateTypeStr
=
item
.
CreateType
.
ToName
(),
item
.
StuChannel
,
StuChannelName
=
item
.
StuChannel
.
ToName
(),
StuChannelName
=
item
.
StuChannel
.
ToName
(),
item
.
PlatformName
,
item
.
CustomerId
,
item
.
CustomerName
,
...
...
@@ -736,12 +736,12 @@ namespace Edu.WebApi.Controllers.User
AssistTypeName
=
qitem
.
AssistType
.
ToName
()
}),
item
.
JapanBaseInfo
,
JapanBaseInfoName
=
item
.
JapanBaseInfo
.
ToName
(),
JapanBaseInfoName
=
item
.
JapanBaseInfo
.
ToName
(),
item
.
StuProfession
,
item
.
StuEducation
,
StuEducationName
=
item
.
StuEducation
.
ToName
(),
StuEducationName
=
item
.
StuEducation
.
ToName
(),
item
.
StuPurpose
,
StuPurposeName
=
item
.
StuPurpose
.
ToName
(),
StuPurposeName
=
item
.
StuPurpose
.
ToName
(),
item
.
VisitCount
,
item
.
TrialLessonCount
,
item
.
StuSourceId
,
...
...
@@ -818,14 +818,14 @@ namespace Edu.WebApi.Controllers.User
StuStage
=
base
.
ParmJObj
.
GetInt
(
"StuStage"
),
StuChannel
=
(
StuChannelEnum
)
base
.
ParmJObj
.
GetInt
(
"StuChannel"
),
PlatformName
=
base
.
ParmJObj
.
GetStringValue
(
"PlatformName"
),
CreateType
=
(
StuCreateTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"CreateType"
),
StuSourceId
=
base
.
ParmJObj
.
GetInt
(
"StuSourceId"
),
CustomerId
=
base
.
ParmJObj
.
GetInt
(
"CustomerId"
),
CreateType
=
(
StuCreateTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"CreateType"
),
StuSourceId
=
base
.
ParmJObj
.
GetInt
(
"StuSourceId"
),
CustomerId
=
base
.
ParmJObj
.
GetInt
(
"CustomerId"
),
WeChatNo
=
base
.
ParmJObj
.
GetStringValue
(
"WeChatNo"
),
QQ
=
base
.
ParmJObj
.
GetStringValue
(
"QQ"
),
StuType
=
base
.
ParmJObj
.
GetInt
(
"StuType"
),
StuType
=
base
.
ParmJObj
.
GetInt
(
"StuType"
),
};
if
(
string
.
IsNullOrEmpty
(
extModel
.
StuTel
)
&&
string
.
IsNullOrEmpty
(
extModel
.
QQ
)&&
string
.
IsNullOrEmpty
(
extModel
.
WeChatNo
))
if
(
string
.
IsNullOrEmpty
(
extModel
.
StuTel
)
&&
string
.
IsNullOrEmpty
(
extModel
.
QQ
)
&&
string
.
IsNullOrEmpty
(
extModel
.
WeChatNo
))
{
return
ApiResult
.
Failed
(
"手机号码、QQ号码、微信号码至少填写一项!"
);
}
...
...
@@ -859,7 +859,7 @@ namespace Edu.WebApi.Controllers.User
}
bool
flag
=
studentModule
.
SetStudentModule
(
extModel
);
return
flag
?
ApiResult
.
Success
(
data
:
extModel
)
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
(
data
:
extModel
)
:
ApiResult
.
Failed
();
}
/// <summary>
...
...
@@ -872,14 +872,14 @@ namespace Edu.WebApi.Controllers.User
{
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
),
StuTel
=
base
.
ParmJObj
.
GetStringValue
(
"StuTel"
),
QQ
=
base
.
ParmJObj
.
GetStringValue
(
"QQ"
),
WeChatNo
=
base
.
ParmJObj
.
GetStringValue
(
"WeChatNo"
)
QQ
=
base
.
ParmJObj
.
GetStringValue
(
"QQ"
),
WeChatNo
=
base
.
ParmJObj
.
GetStringValue
(
"WeChatNo"
)
};
string
message
=
""
;
var
customer
=
base
.
AppletCustomerInfo
;
//是否是同行注册
bool
isB2B
=
false
;
if
(
customer
!=
null
&&
customer
.
GroupId
>
0
)
if
(
customer
!=
null
&&
customer
.
GroupId
>
0
)
{
query
.
Group_Id
=
customer
.
GroupId
;
isB2B
=
true
;
...
...
@@ -1080,9 +1080,9 @@ namespace Edu.WebApi.Controllers.User
StuContractMobile
=
base
.
ParmJObj
.
GetStringValue
(
"StuContractMobile"
),
StuIDCard
=
base
.
ParmJObj
.
GetStringValue
(
"StuIDCard"
),
StuIDCardAddress
=
base
.
ParmJObj
.
GetStringValue
(
"StuIDCardAddress"
),
WeChatNo
=
base
.
ParmJObj
.
GetStringValue
(
"WeChatNo"
),
QQ
=
base
.
ParmJObj
.
GetStringValue
(
"QQ"
),
StuType
=
base
.
ParmJObj
.
GetInt
(
"StuType"
),
WeChatNo
=
base
.
ParmJObj
.
GetStringValue
(
"WeChatNo"
),
QQ
=
base
.
ParmJObj
.
GetStringValue
(
"QQ"
),
StuType
=
base
.
ParmJObj
.
GetInt
(
"StuType"
),
};
extModel
.
CreateType
=
StuCreateTypeEnum
.
CustomerInput
;
extModel
.
Status
=
DateStateEnum
.
Normal
;
...
...
@@ -1100,7 +1100,7 @@ namespace Edu.WebApi.Controllers.User
{
return
ApiResult
.
Failed
(
"手机号码、QQ号码、微信号码至少填写一项!"
);
}
if
(!
string
.
IsNullOrEmpty
(
extModel
.
StuTel
)
&&
studentModule
.
CheckStudentModule
(
extModel
,
1
))
if
(!
string
.
IsNullOrEmpty
(
extModel
.
StuTel
)
&&
studentModule
.
CheckStudentModule
(
extModel
,
1
))
{
return
ApiResult
.
Failed
(
"此学员手机号已绑定同行!请重新录入!"
);
}
...
...
@@ -1142,7 +1142,7 @@ namespace Edu.WebApi.Controllers.User
{
KeyWords
=
base
.
ParmJObj
.
GetStringValue
(
"KeyWords"
),
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
),
StuStage
=
base
.
ParmJObj
.
GetInt
(
"StuStage"
)
StuStage
=
base
.
ParmJObj
.
GetInt
(
"StuStage"
)
};
var
customer
=
base
.
AppletCustomerInfo
;
query
.
Group_Id
=
customer
.
GroupId
;
...
...
@@ -1246,9 +1246,9 @@ namespace Edu.WebApi.Controllers.User
var
customer
=
base
.
AppletCustomerInfo
;
var
query
=
new
RB_Student_ViewModel
()
{
StuTel
=
base
.
ParmJObj
.
GetStringValue
(
"StuTel"
),
QQ
=
base
.
ParmJObj
.
GetStringValue
(
"QQ"
),
WeChatNo
=
base
.
ParmJObj
.
GetStringValue
(
"WeChatNo"
)
StuTel
=
base
.
ParmJObj
.
GetStringValue
(
"StuTel"
),
QQ
=
base
.
ParmJObj
.
GetStringValue
(
"QQ"
),
WeChatNo
=
base
.
ParmJObj
.
GetStringValue
(
"WeChatNo"
)
};
if
(
customer
!=
null
&&
customer
.
GroupId
>
0
)
{
...
...
@@ -1419,6 +1419,7 @@ namespace Edu.WebApi.Controllers.User
DirectSupervisor
=
base
.
ParmJObj
.
GetInt
(
"DirectSupervisor"
),
Account
=
base
.
ParmJObj
.
GetStringValue
(
"Account"
),
Password
=
base
.
ParmJObj
.
GetStringValue
(
"Password"
),
UserRole
=
(
UserRoleEnum
)
base
.
ParmJObj
.
GetInt
(
"UserRole"
),
};
if
(!
string
.
IsNullOrEmpty
(
extModel
.
Password
.
Trim
()))
{
...
...
@@ -1517,6 +1518,17 @@ namespace Edu.WebApi.Controllers.User
}
/// <summary>
/// 获取用户角色类型列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetUserRoleList
()
{
var
list
=
Common
.
Plugin
.
EnumHelper
.
EnumToList
(
typeof
(
UserRoleEnum
));
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 修改员工的部门
/// </summary>
...
...
@@ -1695,7 +1707,9 @@ namespace Edu.WebApi.Controllers.User
Status
=
extModel
?.
Status
??
0
,
Email
=
extModel
?.
Email
??
""
,
DirectSupervisor
=
extModel
?.
DirectSupervisor
??
0
,
DirectSupervisorName
=
base
.
GetUserInfo
(
extModel
?.
DirectSupervisor
??
0
)?.
AccountName
??
""
DirectSupervisorName
=
base
.
GetUserInfo
(
extModel
?.
DirectSupervisor
??
0
)?.
AccountName
??
""
,
UserRole
=
extModel
?.
UserRole
??
0
,
UserRoleName
=
extModel
?.
UserRole
.
ToName
()??
""
,
};
return
ApiResult
.
Success
(
data
:
obj
);
}
...
...
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