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
a0fbef9d
Commit
a0fbef9d
authored
Jan 22, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
0dcb5b00
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
469 additions
and
29 deletions
+469
-29
GlobalKey.cs
Edu.Common/GlobalKey.cs
+4
-0
StringHelper.cs
Edu.Common/Plugin/StringHelper.cs
+1
-1
AppStudentInfo.cs
Edu.Model/CacheModel/AppStudentInfo.cs
+83
-0
UserInfo.cs
Edu.Model/CacheModel/UserInfo.cs
+7
-0
RB_Class_LessonComment.cs
Edu.Model/Entity/Course/RB_Class_LessonComment.cs
+63
-0
Class_LessonPlan_ViewModel.cs
Edu.Model/ViewModel/Course/Class_LessonPlan_ViewModel.cs
+6
-0
RB_Class_LessonComment_ViewModel.cs
...odel/ViewModel/Course/RB_Class_LessonComment_ViewModel.cs
+21
-0
RB_Class_LessonPlanDetails_ViewModel.cs
.../ViewModel/Course/RB_Class_LessonPlanDetails_ViewModel.cs
+6
-1
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+63
-0
RB_Class_LessonCommentRepository.cs
Edu.Repository/Course/RB_Class_LessonCommentRepository.cs
+51
-0
RB_Class_LessonPlanDetailsRepository.cs
...Repository/Course/RB_Class_LessonPlanDetailsRepository.cs
+1
-1
RB_Class_LessonPlanProjectsRepository.cs
...epository/Course/RB_Class_LessonPlanProjectsRepository.cs
+1
-1
RB_Class_LessonPlanRepository.cs
Edu.Repository/Course/RB_Class_LessonPlanRepository.cs
+4
-0
APPStudentLoginController.cs
Edu.WebApi/Controllers/APP/APPStudentLoginController.cs
+9
-9
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+141
-10
LoginController.cs
Edu.WebApi/Controllers/User/LoginController.cs
+8
-6
No files found.
Edu.Common/GlobalKey.cs
View file @
a0fbef9d
...
...
@@ -24,5 +24,9 @@
/// ERP用户TokenKey
/// </summary>
public
const
string
JWT_ERP_User_Key
=
"userInfo"
;
/// <summary>
/// app学生用户TokenKey
/// </summary>
public
const
string
JWT_App_Student_Key
=
"App_Student"
;
}
}
Edu.Common/Plugin/StringHelper.cs
View file @
a0fbef9d
...
...
@@ -113,7 +113,7 @@ namespace Edu.Common.Plugin
{
string
[]
str
=
new
string
[]
{
"日"
,
"月"
,
"火"
,
"水"
,
"木"
,
"金"
,
"土"
};
int
week
=
int
.
Parse
(
day
.
DayOfWeek
.
ToString
(
"D"
));
return
"星期"
+
str
[
week
];
return
str
[
week
];
}
...
...
Edu.Model/CacheModel/AppStudentInfo.cs
0 → 100644
View file @
a0fbef9d
using
Edu.Common.Enum
;
using
Edu.Common.Enum.User
;
using
Edu.Model.ViewModel.System
;
using
System.Collections.Generic
;
namespace
Edu.Model.CacheModel
{
/// <summary>
/// app学生用户缓存
/// </summary>
public
class
AppStudentInfo
{
/// <summary>
/// 账号编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 学校编号
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 账号名称
/// </summary>
public
string
AccountName
{
get
;
set
;
}
/// <summary>
/// 请求来源
/// </summary>
public
ApiRequestFromEnum
ApiRequestFromEnum
{
get
;
set
;
}
/// <summary>
/// 账号类型(1-管理端,2,-教师端,3-助教,4-学生)
/// </summary>
public
AccountTypeEnum
AccountType
{
get
;
set
;
}
/// <summary>
/// 对应的账户id
/// </summary>
public
int
AccountId
{
get
;
set
;
}
/// <summary>
/// 学校名称
/// </summary>
public
string
SchoolName
{
get
;
set
;
}
/// <summary>
/// 集团名称
/// </summary>
public
string
GroupName
{
get
;
set
;
}
/// <summary>
/// Token验证
/// </summary>
public
string
Token
{
get
;
set
;
}
/// <summary>
/// 集团Logo
/// </summary>
public
string
GroupLogo
{
get
;
set
;
}
/// <summary>
/// 用户头像
/// </summary>
public
string
UserIcon
{
get
;
set
;
}
/// <summary>
/// 上传配置
/// </summary>
public
object
UploadConfig
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/CacheModel/UserInfo.cs
View file @
a0fbef9d
...
...
@@ -30,6 +30,7 @@ namespace Edu.Model.CacheModel
/// </summary>
public
string
AccountName
{
get
;
set
;
}
/// <summary>
/// 请求来源
/// </summary>
...
...
@@ -40,6 +41,12 @@ namespace Edu.Model.CacheModel
/// </summary>
public
AccountTypeEnum
AccountType
{
get
;
set
;
}
/// <summary>
/// 对应的账户id
/// </summary>
public
int
AccountId
{
get
;
set
;
}
/// <summary>
/// 学校名称
/// </summary>
...
...
Edu.Model/Entity/Course/RB_Class_LessonComment.cs
0 → 100644
View file @
a0fbef9d
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Edu.Common.Enum
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
{
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Class_LessonComment
{
/// <summary>
/// 教案评论id
/// </summary>
public
int
LessonCommentId
{
get
;
set
;
}
/// <summary>
/// 教案id
/// </summary>
public
int
LessonPlanId
{
get
;
set
;
}
/// <summary>
/// 班级编号
/// </summary>
public
int
ClassId
{
get
;
set
;
}
/// <summary>
/// 分数
/// </summary>
public
int
Score
{
get
;
set
;
}
public
string
Comment
{
get
;
set
;
}
/// <summary>
/// 上课计划编号
/// </summary>
public
int
ClassPlanId
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 学校编号
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 删除状态(0-正常,1-禁用)
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Course/Class_LessonPlan_ViewModel.cs
View file @
a0fbef9d
...
...
@@ -67,6 +67,12 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
/// <summary>
/// 中途休息时间
/// </summary>
public
string
RestTime
{
get
;
set
;
}
/// <summary>
/// 老师教案详情
/// </summary>
...
...
Edu.Model/ViewModel/Course/RB_Class_LessonComment_ViewModel.cs
0 → 100644
View file @
a0fbef9d
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Edu.Model.Entity.Course
;
namespace
Edu.Model.ViewModel.Course
{
public
class
RB_Class_LessonComment_ViewModel
:
RB_Class_LessonComment
{
/// <summary>
/// 创建时间字符串
/// </summary>
public
string
CreateTimeStr
{
get
{
return
Common
.
ConvertHelper
.
FormatTime
(
this
.
CreateTime
);
}
}
/// <summary>
/// 创建人
/// </summary>
public
string
CreateByName
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Course/RB_Class_LessonPlanDetails_ViewModel.cs
View file @
a0fbef9d
...
...
@@ -8,8 +8,13 @@ namespace Edu.Model.ViewModel.Course
/// <summary>
/// 老师教案详细内容
/// </summary>
public
class
RB_Class_LessonPlanDetails_ViewModel
:
RB_Class_LessonPlanDetails
public
class
RB_Class_LessonPlanDetails_ViewModel
:
RB_Class_LessonPlanDetails
{
public
string
LessonPlanIds
{
get
;
set
;
}
/// <summary>
/// 结束时间
/// </summary>
public
string
DurationEndTime
{
get
;
set
;
}
}
}
Edu.Module.Course/ClassModule.cs
View file @
a0fbef9d
...
...
@@ -103,6 +103,9 @@ namespace Edu.Module.Course
/// 课程基础配置
/// </summary>
private
readonly
RB_Class_LessonPlanProjectsRepository
ClassLessonPlanProjectsRepository
=
new
RB_Class_LessonPlanProjectsRepository
();
private
readonly
RB_Class_LessonCommentRepository
classLessonCommentRepository
=
new
RB_Class_LessonCommentRepository
();
/// <summary>
/// 课程基础配置
...
...
@@ -1264,7 +1267,33 @@ namespace Edu.Module.Course
return
flag
;
}
/// <summary>
/// 新增/修改老师教案
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[
TransactionCallHandler
]
public
bool
UpdateClassLessPlan
(
Class_LessonPlan_ViewModel
model
)
{
bool
flag
=
false
;
if
(
model
.
LessonPlanList
!=
null
&&
model
.
LessonPlanList
.
Any
())
{
foreach
(
var
item
in
model
.
LessonPlanList
)
{
foreach
(
var
itemDetails
in
item
.
LessonPlanDetailsList
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Class_LessonPlanDetails_ViewModel
.
Summary
),
itemDetails
.
Summary
}
};
ClassLessonPlanDetailsRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_LessonPlanDetails_ViewModel
.
LessonPlanDetailsId
),
itemDetails
.
LessonPlanDetailsId
));
}
}
return
true
;
}
return
flag
;
}
/// <summary>
/// 获取老师教案详情分页列表
...
...
@@ -1359,6 +1388,40 @@ namespace Edu.Module.Course
return
planList
;
}
/// <summary>
/// 获取备案评论分页列表
/// </summary>
/// <param name="pageIndex">当前页</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowsCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Class_LessonComment_ViewModel
>
GetLessonCommentList
(
RB_Class_LessonComment_ViewModel
query
)
{
return
classLessonCommentRepository
.
GetLessonCommentList
(
query
);
}
/// <summary>
/// 评论/删除评论
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetLessonComment
(
RB_Class_LessonComment_ViewModel
model
)
{
if
(
model
.
LessonCommentId
==
0
)
{
return
classLessonCommentRepository
.
Insert
(
model
)
>
0
;
}
else
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Class_LessonComment_ViewModel
.
Status
),
1
}
};
return
classLessonCommentRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_LessonComment_ViewModel
.
LessonCommentId
),
model
.
LessonCommentId
));
}
}
#
endregion
}
}
Edu.Repository/Course/RB_Class_LessonCommentRepository.cs
0 → 100644
View file @
a0fbef9d
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
namespace
Edu.Repository.Course
{
public
class
RB_Class_LessonCommentRepository
:
BaseRepository
<
RB_Class_LessonComment
>
{
/// <summary>
/// 获取备案分页列表
/// </summary>
/// <param name="pageIndex">当前页</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowsCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Class_LessonComment_ViewModel
>
GetLessonCommentList
(
RB_Class_LessonComment_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"SELECT * FROM RB_Class_LessonComment WHERE 1=1 AND Status=0"
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Class_LessonComment_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
if
(
query
.
School_Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Class_LessonComment_ViewModel
.
School_Id
),
query
.
School_Id
);
}
if
(
query
.
ClassId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Class_LessonComment_ViewModel
.
ClassId
),
query
.
ClassId
);
}
if
(
query
.
ClassPlanId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Class_LessonComment_ViewModel
.
ClassPlanId
),
query
.
ClassPlanId
);
}
if
(
query
.
LessonPlanId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Class_LessonComment_ViewModel
.
LessonPlanId
),
query
.
LessonPlanId
);
}
}
builder
.
Append
(
" ORDER BY CreateTime DESC "
);
return
Get
<
RB_Class_LessonComment_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
}
Edu.Repository/Course/RB_Class_LessonPlanDetailsRepository.cs
View file @
a0fbef9d
...
...
@@ -67,7 +67,7 @@ namespace Edu.Repository.Course
}
if
(
!
string
.
IsNullOrWhiteSpace
(
query
.
LessonPlanIds
))
{
builder
.
AppendFormat
(
" AND {0} in ({1}) "
,
nameof
(
RB_Class_LessonPlanDetails
.
LessonPlanId
),
query
.
LessonPlanId
);
builder
.
AppendFormat
(
" AND {0} in ({1}) "
,
nameof
(
RB_Class_LessonPlanDetails
.
LessonPlanId
),
query
.
LessonPlanId
s
);
}
}
return
Get
<
RB_Class_LessonPlanDetails_ViewModel
>(
builder
.
ToString
()).
ToList
();
...
...
Edu.Repository/Course/RB_Class_LessonPlanProjectsRepository.cs
View file @
a0fbef9d
...
...
@@ -67,7 +67,7 @@ namespace Edu.Repository.Course
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
LessonPlanIds
))
{
builder
.
AppendFormat
(
" AND {0} in ({1}) "
,
nameof
(
RB_Class_LessonPlanProjects
.
LessonPlanId
),
query
.
LessonPlanId
);
builder
.
AppendFormat
(
" AND {0} in ({1}) "
,
nameof
(
RB_Class_LessonPlanProjects
.
LessonPlanId
),
query
.
LessonPlanId
s
);
}
}
return
Get
<
RB_Class_LessonPlanProjects_ViewModel
>(
builder
.
ToString
()).
ToList
();
...
...
Edu.Repository/Course/RB_Class_LessonPlanRepository.cs
View file @
a0fbef9d
...
...
@@ -73,6 +73,10 @@ namespace Edu.Repository.Course
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Class_LessonPlan
.
LessonPlanId
),
query
.
LessonPlanId
);
}
if
(
query
.
CreateBy
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Class_LessonPlan
.
CreateBy
),
query
.
CreateBy
);
}
if
(
query
.
ClassId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Class_LessonPlan
.
ClassId
),
query
.
ClassId
);
...
...
Edu.WebApi/Controllers/APP/APPStudentLoginController.cs
View file @
a0fbef9d
...
...
@@ -67,14 +67,14 @@ namespace Edu.WebApi.Controllers.APP
return
ApiResult
.
Failed
(
message
:
$"此账号【
{
account
}
】已禁用"
);
}
//生成教育token
IUserInfoToken
eduUserInfo
=
new
EduUser
InfoToken
()
{
requestFrom
=
Common
.
Enum
.
ApiRequestFromEnum
.
AppStudent
,
uid
=
model
.
Id
.
ToString
()
};
//上传配置
var
uploadConfig
=
publicModule
.
GetFileStoreList
(
new
Model
.
Public
.
RB_File_Store
()
{
Group_Id
=
model
.
Group_Id
,
IsDefault
=
1
})?.
FirstOrDefault
();
string
token
=
WebApiTokenHelper
.
CreateToken
(
Common
.
GlobalKey
.
JWT_User
_Key
,
eduUserInfo
);
//IUserInfoToken eduUserInfo = new AppStudent
InfoToken()
//
{
//
requestFrom = Common.Enum.ApiRequestFromEnum.AppStudent,
//
uid = model.Id.ToString()
//
};
//
//
上传配置
//
var uploadConfig = publicModule.GetFileStoreList(new Model.Public.RB_File_Store() { Group_Id = model.Group_Id, IsDefault = 1 })?.FirstOrDefault();
//string token = WebApiTokenHelper.CreateToken(Common.GlobalKey.JWT_App_Student
_Key, eduUserInfo);
//UserInfo obj = new UserInfo
//{
// Id = model.Id,
...
...
@@ -101,7 +101,7 @@ namespace Edu.WebApi.Controllers.APP
// uploadConfig?.UploadDomain
// }
//};
//UserReidsCache.UserInfoSet(Cache.CacheKey.User_Login_Key + model.Id, obj, Common.Config.JwtExpirTime);
//
Cache.User.
UserReidsCache.UserInfoSet(Cache.CacheKey.User_Login_Key + model.Id, obj, Common.Config.JwtExpirTime);
return
ApiResult
.
Success
();
}
// return ApiResult.Success();
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
a0fbef9d
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/User/LoginController.cs
View file @
a0fbef9d
...
...
@@ -103,11 +103,11 @@ namespace Edu.WebApi.Controllers.User
string
token
=
WebApiTokenHelper
.
CreateToken
(
Common
.
GlobalKey
.
JWT_User_Key
,
eduUserInfo
);
string
erpToken
=
WebApiTokenHelper
.
CreateToken
(
Common
.
GlobalKey
.
JWT_ERP_User_Key
,
erpUserInfo
);
var
treeList
=
menuModule
.
GetPostMenuTreeModule
(
new
Model
.
ViewModel
.
System
.
RB_Menu_ViewModel
()
{
MenuType
=
accountType
},
out
List
<
RB_Menu_ViewModel
>
userCenterList
,
postIds
:
model
.
Post_Id
.
ToString
());
},
out
List
<
RB_Menu_ViewModel
>
userCenterList
,
postIds
:
model
.
Post_Id
.
ToString
());
//获取功能权限列表
var
actionList
=
menuModule
.
GetPostMenuFunctionListModule
(
model
.
Post_Id
.
ToString
());
//上传配置
...
...
@@ -115,7 +115,8 @@ namespace Edu.WebApi.Controllers.User
UserInfo
obj
=
new
UserInfo
{
Id
=
model
.
Id
,
AccountType
=
model
.
AccountType
,
AccountId
=
model
.
AccountId
,
AccountType
=
model
.
AccountType
,
Group_Id
=
model
.
Group_Id
,
GroupName
=
model
.
GroupName
,
School_Id
=
model
.
School_Id
,
...
...
@@ -124,7 +125,7 @@ namespace Edu.WebApi.Controllers.User
Token
=
token
,
ErpToken
=
erpToken
,
MenuList
=
treeList
,
UserCenterList
=
userCenterList
,
UserCenterList
=
userCenterList
,
GroupLogo
=
model
.
GroupLogo
,
UserIcon
=
model
.
UserIcon
,
ApiRequestFromEnum
=
Common
.
Enum
.
ApiRequestFromEnum
.
WebAdmin
,
...
...
@@ -132,8 +133,9 @@ namespace Edu.WebApi.Controllers.User
DeptName
=
model
.
DeptName
,
PostId
=
model
.
Post_Id
,
PostName
=
model
.
PostName
,
ActionMenuList
=
actionList
?.
Select
(
qitem
=>
new
{
qitem
.
FunctionCode
,
qitem
.
FunctionName
,
qitem
.
MenuName
,
qitem
.
MenuUrl
}),
UploadConfig
=
new
{
ActionMenuList
=
actionList
?.
Select
(
qitem
=>
new
{
qitem
.
FunctionCode
,
qitem
.
FunctionName
,
qitem
.
MenuName
,
qitem
.
MenuUrl
}),
UploadConfig
=
new
{
uploadConfig
?.
Bucket
,
uploadConfig
?.
StoreType
,
uploadConfig
?.
Region
,
...
...
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