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
6a6483ec
Commit
6a6483ec
authored
Dec 28, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
创建账号修改
parent
55983cd2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
8 deletions
+29
-8
TeacherModule.cs
Edu.Module.User/TeacherModule.cs
+25
-1
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+4
-7
No files found.
Edu.Module.User/TeacherModule.cs
View file @
6a6483ec
...
@@ -208,8 +208,32 @@ namespace Edu.Module.User
...
@@ -208,8 +208,32 @@ namespace Edu.Module.User
{
{
var
newId
=
teacherRepository
.
Insert
(
model
);
var
newId
=
teacherRepository
.
Insert
(
model
);
model
.
TId
=
newId
;
model
.
TId
=
newId
;
userChangeLogModule
.
SetUserChangeLogModule
(
model
.
CreateBy
,
model
.
Group_Id
,
model
.
School_Id
,
"新建用户"
,
newId
,
AccountTypeEnum
.
Teacher
);
userChangeLogModule
.
SetUserChangeLogModule
(
model
.
CreateBy
,
model
.
Group_Id
,
model
.
School_Id
,
"新建
教师
用户"
,
newId
,
AccountTypeEnum
.
Teacher
);
flag
=
newId
>
0
;
flag
=
newId
>
0
;
if
(
model
.
AuditStatus
==
AccountStatusEnum
.
Pass
&&
flag
)
{
var
accountList
=
accountModule
.
GetAccountListExtModule
(
new
RB_Account_ViewModel
()
{
Account
=
model
.
TeacherTel
,
AccountType
=
AccountTypeEnum
.
Teacher
});
if
(
accountList
==
null
||
(
accountList
!=
null
&&
accountList
.
Count
==
0
))
{
flag
=
accountModule
.
SetAccountModule
(
new
RB_Account_ViewModel
()
{
Account
=
model
.
TeacherTel
,
Password
=
Common
.
DES
.
Encrypt
(
Common
.
Config
.
DefaultPwd
),
AccountType
=
AccountTypeEnum
.
Teacher
,
AccountId
=
model
.
TId
,
CreateBy
=
model
.
CreateBy
,
UpdateBy
=
model
.
CreateBy
,
CreateTime
=
DateTime
.
Now
,
UpdateTime
=
DateTime
.
Now
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
model
.
School_Id
,
});
}
}
}
}
return
flag
;
return
flag
;
}
}
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
6a6483ec
...
@@ -356,13 +356,13 @@ namespace Edu.WebApi.Controllers.User
...
@@ -356,13 +356,13 @@ namespace Edu.WebApi.Controllers.User
Post_Id
=
base
.
ParmJObj
.
GetInt
(
"Post_Id"
),
Post_Id
=
base
.
ParmJObj
.
GetInt
(
"Post_Id"
),
BaseStuNum
=
base
.
ParmJObj
.
GetInt
(
"BaseStuNum"
),
BaseStuNum
=
base
.
ParmJObj
.
GetInt
(
"BaseStuNum"
),
BaseHourFee
=
base
.
ParmJObj
.
GetDecimal
(
"BaseHourFee"
),
BaseHourFee
=
base
.
ParmJObj
.
GetDecimal
(
"BaseHourFee"
),
AuditStatus
=
AccountStatusEnum
.
Pass
};
};
extModel
.
TeachTag
=
base
.
ParmJObj
.
GetStringValue
(
"TeachTag"
);
extModel
.
TeachTag
=
base
.
ParmJObj
.
GetStringValue
(
"TeachTag"
);
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
extModel
.
AuditStatus
=
Common
.
Enum
.
User
.
AccountStatusEnum
.
Normal
;
extModel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
extModel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
bool
flag
=
teacherModule
.
SetTeacherModule
(
extModel
,
isUpdateBasic
:
true
);
bool
flag
=
teacherModule
.
SetTeacherModule
(
extModel
,
isUpdateBasic
:
true
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
...
@@ -478,14 +478,15 @@ namespace Edu.WebApi.Controllers.User
...
@@ -478,14 +478,15 @@ namespace Edu.WebApi.Controllers.User
AssistIcon
=
base
.
ParmJObj
.
GetStringValue
(
"AssistIcon"
),
AssistIcon
=
base
.
ParmJObj
.
GetStringValue
(
"AssistIcon"
),
AssistIntro
=
base
.
ParmJObj
.
GetStringValue
(
"AssistIntro"
),
AssistIntro
=
base
.
ParmJObj
.
GetStringValue
(
"AssistIntro"
),
Dept_Id
=
base
.
ParmJObj
.
GetInt
(
"Dept_Id"
),
Dept_Id
=
base
.
ParmJObj
.
GetInt
(
"Dept_Id"
),
Post_Id
=
base
.
ParmJObj
.
GetInt
(
"Post_Id"
)
Post_Id
=
base
.
ParmJObj
.
GetInt
(
"Post_Id"
),
AuditStatus
=
AccountStatusEnum
.
Pass
};
};
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
extModel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
extModel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
extModel
.
AuditStatus
=
Common
.
Enum
.
User
.
AccountStatusEnum
.
Normal
;
bool
flag
=
assistModule
.
SetAssistModule
(
extModel
,
isUpdateBasic
:
true
);
bool
flag
=
assistModule
.
SetAssistModule
(
extModel
,
isUpdateBasic
:
true
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
...
@@ -808,9 +809,6 @@ namespace Edu.WebApi.Controllers.User
...
@@ -808,9 +809,6 @@ namespace Edu.WebApi.Controllers.User
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
/// <summary>
/// <summary>
/// 批量重置用户密码信息
/// 批量重置用户密码信息
/// </summary>
/// </summary>
...
@@ -832,7 +830,6 @@ namespace Edu.WebApi.Controllers.User
...
@@ -832,7 +830,6 @@ namespace Edu.WebApi.Controllers.User
{
{
viewList
.
ForEach
(
x
=>
x
.
Group_Id
=
UserReidsCache
.
GetUserLoginInfo
(
uid
).
Group_Id
);
viewList
.
ForEach
(
x
=>
x
.
Group_Id
=
UserReidsCache
.
GetUserLoginInfo
(
uid
).
Group_Id
);
//判断账户信息是否存在,不存在就不去更新密码
//判断账户信息是否存在,不存在就不去更新密码
var
list
=
accountModule
.
GetUpdateAccountListRepository
(
viewList
);
var
list
=
accountModule
.
GetUpdateAccountListRepository
(
viewList
);
if
(
list
!=
null
&&
list
.
Any
())
if
(
list
!=
null
&&
list
.
Any
())
{
{
...
...
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