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
b03f9d31
Commit
b03f9d31
authored
4 years ago
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
35663d95
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
237 additions
and
57 deletions
+237
-57
PwHelper.cs
Edu.Common/Encrypt/PwHelper.cs
+0
-2
RB_Assist_ViewModel.cs
Edu.Model/ViewModel/User/RB_Assist_ViewModel.cs
+5
-0
RB_Student_ViewModel.cs
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
+5
-0
RB_Teacher_ViewModel.cs
Edu.Model/ViewModel/User/RB_Teacher_ViewModel.cs
+5
-0
AccountModule.cs
Edu.Module.User/AccountModule.cs
+28
-5
AssistModule.cs
Edu.Module.User/AssistModule.cs
+48
-18
StudentModule.cs
Edu.Module.User/StudentModule.cs
+74
-7
TeacherModule.cs
Edu.Module.User/TeacherModule.cs
+49
-19
RB_AccountRepository.cs
Edu.Repository/User/RB_AccountRepository.cs
+4
-0
RB_AssistRepository.cs
Edu.Repository/User/RB_AssistRepository.cs
+2
-1
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+2
-1
RB_TeacherRepository.cs
Edu.Repository/User/RB_TeacherRepository.cs
+2
-1
LoginController.cs
Edu.WebApi/Controllers/User/LoginController.cs
+1
-3
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+12
-0
No files found.
Edu.Common/Encrypt/PwHelper.cs
View file @
b03f9d31
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Common.Encrypt
{
...
...
This diff is collapsed.
Click to expand it.
Edu.Model/ViewModel/User/RB_Assist_ViewModel.cs
View file @
b03f9d31
...
...
@@ -59,5 +59,10 @@ namespace Edu.Model.ViewModel.User
/// 网课订单
/// </summary>
public
int
OnlineOrderCount
{
get
;
set
;
}
/// <summary>
/// 助教登录账号
/// </summary>
public
string
AssistAccount
{
get
;
set
;
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
View file @
b03f9d31
...
...
@@ -65,5 +65,10 @@ namespace Edu.Model.ViewModel.User
/// 地区名称【省/市/区县】
/// </summary>
public
string
AreaName
{
get
;
set
;
}
/// <summary>
/// 学生账号
/// </summary>
public
string
StudentAccount
{
get
;
set
;
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Edu.Model/ViewModel/User/RB_Teacher_ViewModel.cs
View file @
b03f9d31
...
...
@@ -59,5 +59,10 @@ namespace Edu.Model.ViewModel.User
/// 网课订单
/// </summary>
public
int
OnlineOrderCount
{
get
;
set
;
}
/// <summary>
/// 教师账号
/// </summary>
public
string
TeacherAccount
{
get
;
set
;
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Edu.Module.User/AccountModule.cs
View file @
b03f9d31
...
...
@@ -79,6 +79,28 @@ namespace Edu.Module.User
return
flag
;
}
/// <summary>
/// 修改账号状态
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetAccountStatusModule
(
RB_Account_ViewModel
model
)
{
bool
flag
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Account_ViewModel
.
Status
),(
int
)
model
.
Status
},
{
nameof
(
RB_Account_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
};
List
<
WhereHelper
>
list
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(
nameof
(
RB_Account_ViewModel
.
AccountId
),
model
.
AccountId
),
new
WhereHelper
(
nameof
(
RB_Account_ViewModel
.
AccountType
),(
int
)
model
.
AccountType
),
};
flag
=
accountRepository
.
Update
(
fileds
,
list
);
return
flag
;
}
/// <summary>
/// 重置密码
/// </summary>
...
...
@@ -93,12 +115,13 @@ namespace Edu.Module.User
{
{
nameof
(
RB_Account_ViewModel
.
Password
),
Common
.
DES
.
Encrypt
(
newPwd
)}
};
var
wheres
=
new
List
<
WhereHelper
>();
wheres
.
Add
(
new
WhereHelper
(
nameof
(
RB_Account_ViewModel
.
AccountId
),
model
.
AccountId
));
wheres
.
Add
(
new
WhereHelper
(
nameof
(
RB_Account_ViewModel
.
AccountType
),
model
.
AccountType
));
wheres
.
Add
(
new
WhereHelper
(
nameof
(
RB_Account_ViewModel
.
Group_Id
),
model
.
Group_Id
));
var
wheres
=
new
List
<
WhereHelper
>
{
new
WhereHelper
(
nameof
(
RB_Account_ViewModel
.
AccountId
),
model
.
AccountId
),
new
WhereHelper
(
nameof
(
RB_Account_ViewModel
.
AccountType
),
model
.
AccountType
),
new
WhereHelper
(
nameof
(
RB_Account_ViewModel
.
Group_Id
),
model
.
Group_Id
)
};
flag
=
accountRepository
.
Update
(
fileds
,
wheres
);
return
(
flag
,
newPwd
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Edu.Module.User/AssistModule.cs
View file @
b03f9d31
...
...
@@ -90,7 +90,7 @@ namespace Edu.Module.User
/// <returns></returns>
public
RB_Assist_ViewModel
GetAssistModule
(
int
AId
)
{
return
GetAssistListModule
(
new
RB_Assist_ViewModel
()
{
AId
=
AId
})?.
FirstOrDefault
()
??
new
RB_Assist_ViewModel
(
);
return
assistRepository
.
GetEntity
<
RB_Assist_ViewModel
>(
AId
);
}
/// <summary>
...
...
@@ -98,13 +98,35 @@ namespace Edu.Module.User
/// </summary>
/// <param name="AId"></param>
/// <returns></returns>
public
bool
RemoveAssistModule
(
object
AId
)
[
TransactionCallHandler
]
public
virtual
bool
RemoveAssistModule
(
int
AId
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
bool
flag
=
false
;
var
model
=
GetAssistModule
(
AId
);
if
(
model
!=
null
&&
model
.
AId
>
0
)
{
{
nameof
(
RB_Assist
.
Status
),(
int
)
DateStateEnum
.
Delete
},
};
bool
flag
=
assistRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Assist
.
AId
),
AId
));
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Assist
.
Status
),(
int
)
DateStateEnum
.
Delete
},
};
flag
=
assistRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Assist
.
AId
),
AId
));
var
accountList
=
accountModule
.
GetAccountListExtModule
(
new
RB_Account_ViewModel
()
{
AccountId
=
model
.
AId
,
Account
=
model
.
AssistTel
,
AccountType
=
AccountTypeEnum
.
Assist
});
if
(
accountList
!=
null
&&
accountList
.
Count
>
0
)
{
flag
=
accountModule
.
SetAccountStatusModule
(
new
RB_Account_ViewModel
()
{
AccountType
=
AccountTypeEnum
.
Assist
,
AccountId
=
model
.
AId
,
UpdateTime
=
DateTime
.
Now
,
Status
=
DateStateEnum
.
Delete
});
}
}
return
flag
;
}
...
...
@@ -136,7 +158,7 @@ namespace Edu.Module.User
{
bool
flag
=
false
;
var
model
=
GetAssistModule
(
AId
);
if
(
model
!=
null
)
if
(
model
!=
null
&&
model
.
AId
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
...
...
@@ -147,22 +169,30 @@ namespace Edu.Module.User
AccountStatusEnum
statusEnum
=
(
AccountStatusEnum
)
AuditStatus
;
if
(
statusEnum
==
AccountStatusEnum
.
Pass
&&
flag
)
{
flag
=
accountModule
.
SetAccoun
tModule
(
new
RB_Account_ViewModel
()
var
accountList
=
accountModule
.
GetAccountListEx
tModule
(
new
RB_Account_ViewModel
()
{
Account
=
model
.
AssistTel
,
Password
=
Common
.
DES
.
Encrypt
(
Common
.
Config
.
DefaultPwd
),
AccountType
=
AccountTypeEnum
.
Assist
,
AccountId
=
model
.
AId
,
CreateBy
=
user
.
Id
,
UpdateBy
=
user
.
Id
,
CreateTime
=
DateTime
.
Now
,
UpdateTime
=
DateTime
.
Now
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
model
.
School_Id
,
AccountType
=
AccountTypeEnum
.
Assist
});
if
(
accountList
==
null
||
(
accountList
!=
null
&&
accountList
.
Count
==
0
))
{
flag
=
accountModule
.
SetAccountModule
(
new
RB_Account_ViewModel
()
{
Account
=
model
.
AssistTel
,
Password
=
Common
.
DES
.
Encrypt
(
Common
.
Config
.
DefaultPwd
),
AccountType
=
AccountTypeEnum
.
Assist
,
AccountId
=
model
.
AId
,
CreateBy
=
user
.
Id
,
UpdateBy
=
user
.
Id
,
CreateTime
=
DateTime
.
Now
,
UpdateTime
=
DateTime
.
Now
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
model
.
School_Id
,
});
}
}
}
return
flag
;
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Edu.Module.User/StudentModule.cs
View file @
b03f9d31
using
Edu.Common.Enum
;
using
Edu.AOP.CustomerAttribute
;
using
Edu.Common.Enum
;
using
Edu.Common.Enum.User
;
using
Edu.Model.CacheModel
;
using
Edu.Model.ViewModel.User
;
using
Edu.Repository.System
;
using
Edu.Repository.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
VT.FW.DB
;
...
...
@@ -23,6 +27,11 @@ namespace Edu.Module.User
/// </summary>
private
readonly
RB_DestinationRepository
destinationRepository
=
new
RB_DestinationRepository
();
/// <summary>
/// 账号处理类
/// </summary>
private
readonly
AccountModule
accountModule
=
new
AccountModule
();
/// <summary>
/// 获取学生列表
/// </summary>
...
...
@@ -130,14 +139,34 @@ namespace Edu.Module.User
/// <param name="StuId"></param>
/// <param name="Status"></param>
/// <returns></returns>
public
bool
RemoveStudentModule
(
objec
t
StuId
,
int
Status
)
public
bool
RemoveStudentModule
(
in
t
StuId
,
int
Status
)
{
bool
flag
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
bool
flag
=
false
;
var
model
=
GetStudentModule
(
StuId
);
if
(
model
!=
null
&&
model
.
StuId
>
0
)
{
{
nameof
(
RB_Student_ViewModel
.
Status
),
Status
},
};
flag
=
studentRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
StuId
),
StuId
));
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_ViewModel
.
Status
),
Status
},
};
flag
=
studentRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
StuId
),
StuId
));
var
accountList
=
accountModule
.
GetAccountListExtModule
(
new
RB_Account_ViewModel
()
{
AccountId
=
model
.
StuId
,
Account
=
model
.
StuTel
,
AccountType
=
AccountTypeEnum
.
Student
});
if
(
accountList
!=
null
&&
accountList
.
Count
>
0
)
{
flag
=
accountModule
.
SetAccountStatusModule
(
new
RB_Account_ViewModel
()
{
AccountType
=
AccountTypeEnum
.
Student
,
AccountId
=
model
.
StuId
,
UpdateTime
=
DateTime
.
Now
,
Status
=
(
DateStateEnum
)
Status
});
}
}
return
flag
;
}
...
...
@@ -157,5 +186,43 @@ namespace Edu.Module.User
flag
=
studentRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
StuId
),
StuId
));
return
flag
;
}
/// <summary>
/// 创建学生账号
/// </summary>
/// <param name="StuId"></param>
/// <param name="UserInfo"></param>
/// <returns></returns>
[
TransactionCallHandler
]
public
virtual
bool
CreateStudentAccountModule
(
int
StuId
,
UserInfo
user
)
{
bool
flag
=
false
;
var
model
=
GetStudentModule
(
StuId
);
if
(
model
!=
null
&&
model
.
StuId
>
0
)
{
var
accountList
=
accountModule
.
GetAccountListExtModule
(
new
RB_Account_ViewModel
()
{
Account
=
model
.
StuTel
,
AccountType
=
AccountTypeEnum
.
Student
});
if
(
accountList
==
null
||
(
accountList
!=
null
&&
accountList
.
Count
==
0
))
{
flag
=
accountModule
.
SetAccountModule
(
new
RB_Account_ViewModel
()
{
Account
=
model
.
StuTel
,
Password
=
Common
.
DES
.
Encrypt
(
Common
.
Config
.
DefaultPwd
),
AccountType
=
AccountTypeEnum
.
Student
,
AccountId
=
model
.
StuId
,
CreateBy
=
user
.
Id
,
UpdateBy
=
user
.
Id
,
CreateTime
=
DateTime
.
Now
,
UpdateTime
=
DateTime
.
Now
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
model
.
School_Id
,
});
}
}
return
flag
;
}
}
}
This diff is collapsed.
Click to expand it.
Edu.Module.User/TeacherModule.cs
View file @
b03f9d31
...
...
@@ -96,7 +96,7 @@ namespace Edu.Module.User
/// <returns></returns>
public
RB_Teacher_ViewModel
GetTeacherModule
(
int
TId
)
{
return
GetTeacherListModule
(
new
RB_Teacher_ViewModel
()
{
TId
=
TId
})?.
FirstOrDefault
()
??
new
RB_Teacher_ViewModel
(
);
return
teacherRepository
.
GetEntity
<
RB_Teacher_ViewModel
>(
TId
);
}
/// <summary>
...
...
@@ -104,14 +104,35 @@ namespace Edu.Module.User
/// </summary>
/// <param name="TId"></param>
/// <returns></returns>
public
bool
RemoveTeacherModule
(
object
TId
)
[
TransactionCallHandler
]
public
virtual
bool
RemoveTeacherModule
(
int
TId
)
{
bool
flag
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
bool
flag
=
false
;
var
model
=
GetTeacherModule
(
TId
);
if
(
model
!=
null
&&
model
.
TId
>
0
)
{
{
nameof
(
RB_Teacher_ViewModel
.
Status
),(
int
)
DateStateEnum
.
Delete
},
};
flag
=
teacherRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Teacher_ViewModel
.
TId
),
TId
));
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Teacher_ViewModel
.
Status
),(
int
)
DateStateEnum
.
Delete
},
};
flag
=
teacherRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Teacher_ViewModel
.
TId
),
TId
));
var
accountList
=
accountModule
.
GetAccountListExtModule
(
new
RB_Account_ViewModel
()
{
AccountId
=
model
.
TId
,
Account
=
model
.
TeacherTel
,
AccountType
=
AccountTypeEnum
.
Teacher
});
if
(
accountList
!=
null
&&
accountList
.
Count
>
0
)
{
flag
=
accountModule
.
SetAccountStatusModule
(
new
RB_Account_ViewModel
()
{
AccountType
=
AccountTypeEnum
.
Teacher
,
AccountId
=
model
.
TId
,
UpdateTime
=
DateTime
.
Now
,
Status
=
DateStateEnum
.
Delete
});
}
}
return
flag
;
}
...
...
@@ -139,11 +160,11 @@ namespace Edu.Module.User
/// <param name="user">用户信息</param>
/// <returns></returns>
[
TransactionCallHandler
]
public
virtual
bool
AuditTeacherModule
(
int
TId
,
int
AuditStatus
,
string
AuditRemark
,
UserInfo
user
)
public
virtual
bool
AuditTeacherModule
(
int
TId
,
int
AuditStatus
,
string
AuditRemark
,
UserInfo
user
)
{
bool
flag
=
false
;
var
model
=
GetTeacherModule
(
TId
);
if
(
model
!=
null
)
if
(
model
!=
null
&&
model
.
TId
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
...
...
@@ -151,22 +172,31 @@ namespace Edu.Module.User
{
nameof
(
RB_Teacher_ViewModel
.
AuditRemark
),
AuditRemark
},
};
flag
=
teacherRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Teacher_ViewModel
.
TId
),
TId
));
AccountStatusEnum
statusEnum
=
(
AccountStatusEnum
)
AuditStatus
;
if
(
statusEnum
==
AccountStatusEnum
.
Pass
&&
flag
)
{
flag
=
accountModule
.
SetAccoun
tModule
(
new
RB_Account_ViewModel
()
var
accountList
=
accountModule
.
GetAccountListEx
tModule
(
new
RB_Account_ViewModel
()
{
Account
=
model
.
TeacherTel
,
Password
=
Common
.
DES
.
Encrypt
(
Common
.
Config
.
DefaultPwd
),
AccountType
=
AccountTypeEnum
.
Teacher
,
AccountId
=
model
.
TId
,
CreateBy
=
user
.
Id
,
UpdateBy
=
user
.
Id
,
CreateTime
=
DateTime
.
Now
,
UpdateTime
=
DateTime
.
Now
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
model
.
School_Id
,
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
=
user
.
Id
,
UpdateBy
=
user
.
Id
,
CreateTime
=
DateTime
.
Now
,
UpdateTime
=
DateTime
.
Now
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
model
.
School_Id
,
});
}
}
}
return
flag
;
...
...
This diff is collapsed.
Click to expand it.
Edu.Repository/User/RB_AccountRepository.cs
View file @
b03f9d31
...
...
@@ -121,6 +121,10 @@ WHERE 1=1
{
where
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Account_ViewModel
.
Id
),
query
.
Id
);
}
if
(
query
.
AccountId
>
0
)
{
where
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Account_ViewModel
.
AccountId
),
query
.
AccountId
);
}
}
StringBuilder
builder
=
new
StringBuilder
();
...
...
This diff is collapsed.
Click to expand it.
Edu.Repository/User/RB_AssistRepository.cs
View file @
b03f9d31
...
...
@@ -81,9 +81,10 @@ WHERE 1=1
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT a.*,g.GroupName,s.SName
SELECT a.*,g.GroupName,s.SName
,IFNULL(account.Account,'') AS AssistAccount
FROM rb_assist AS a LEFT JOIN rb_group AS g ON a.Group_Id=g.GId
LEFT JOIN rb_school AS s ON a.School_Id=s.SId
LEFT JOIN rb_account as account ON (a.AId=account.AccountId AND account.AccountType=3 )
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Assist_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
...
...
This diff is collapsed.
Click to expand it.
Edu.Repository/User/RB_StudentRepository.cs
View file @
b03f9d31
...
...
@@ -77,9 +77,10 @@ WHERE 1=1
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT t.*,g.GroupName,s.SName
SELECT t.*,g.GroupName,s.SName
,IFNULL(a.Account,'') AS StudentAccount
FROM rb_student AS t LEFT JOIN rb_group AS g ON t.Group_Id=g.GId
LEFT JOIN rb_school AS s ON t.School_Id=s.SId
LEFT JOIN rb_account as a ON (t.StuId=a.AccountId AND a.AccountType=4 )
WHERE 1=1
"
);
if
(
query
!=
null
)
...
...
This diff is collapsed.
Click to expand it.
Edu.Repository/User/RB_TeacherRepository.cs
View file @
b03f9d31
...
...
@@ -87,9 +87,10 @@ WHERE 1=1
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT t.*,g.GroupName,s.SName
SELECT t.*,g.GroupName,s.SName
,IFNULL(a.Account,'') AS TeacherAccount
FROM rb_teacher AS t LEFT JOIN rb_group AS g ON t.Group_Id=g.GId
LEFT JOIN rb_school AS s ON t.School_Id=s.SId
LEFT JOIN rb_account as a ON (t.TId=a.AccountId AND a.AccountType=2)
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Teacher_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
...
...
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/User/LoginController.cs
View file @
b03f9d31
...
...
@@ -70,7 +70,7 @@ namespace Edu.WebApi.Controllers.User
}
if
(
model
.
Status
==
Common
.
Enum
.
DateStateEnum
.
Delete
)
{
return
ApiResult
.
Failed
(
message
:
$"此账号【
{
account
}
】已
删除
!"
);
return
ApiResult
.
Failed
(
message
:
$"此账号【
{
account
}
】已
禁用,如需使用请联系管理员
!"
);
}
//生成token
string
token
=
WebApiTokenHelper
.
CreateToken
(
model
.
Id
.
ToString
(),
Common
.
Enum
.
ApiRequestFromEnum
.
WebAdmin
);
...
...
@@ -132,7 +132,5 @@ namespace Edu.WebApi.Controllers.User
return
ApiResult
.
Failed
();
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/User/UserController.cs
View file @
b03f9d31
...
...
@@ -583,6 +583,18 @@ namespace Edu.WebApi.Controllers.User
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 生成学生账号
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
CreateStudentAccount
()
{
var
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
,
0
);
var
flag
=
studentModule
.
CreateStudentAccountModule
(
StuId
,
base
.
UserInfo
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
region
管理者管理
...
...
This diff is collapsed.
Click to expand it.
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