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
d1fff1db
Commit
d1fff1db
authored
Nov 29, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1消息+课程调整
parent
821f1d41
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
326 additions
and
1 deletion
+326
-1
CourseEmphasisEnum.cs
Edu.Common/Enum/Course/CourseEmphasisEnum.cs
+44
-0
RB_Course.cs
Edu.Model/Entity/Course/RB_Course.cs
+15
-0
RB_Customer_BalanceDetail.cs
Edu.Model/Entity/Customer/RB_Customer_BalanceDetail.cs
+15
-0
RB_B2B_StudentNotice.cs
Edu.Model/Entity/Log/RB_B2B_StudentNotice.cs
+75
-0
RB_Course_Chapter_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Course_Chapter_ViewModel.cs
+3
-1
RB_B2B_StudentNotice_ViewModel.cs
Edu.Model/ViewModel/Log/RB_B2B_StudentNotice_ViewModel.cs
+15
-0
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+85
-0
CourseModule.cs
Edu.Module.Course/CourseModule.cs
+3
-0
RB_B2B_StudentNoticeRepository.cs
Edu.Repository/Log/RB_B2B_StudentNoticeRepository.cs
+54
-0
CourseController.cs
Edu.WebApi/Controllers/Course/CourseController.cs
+17
-0
No files found.
Edu.Common/Enum/Course/CourseEmphasisEnum.cs
0 → 100644
View file @
d1fff1db
using
Edu.Common.Plugin
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Common.Enum.Course
{
/// <summary>
/// 课程重点枚举
/// </summary>
public
enum
CourseEmphasisEnum
{
/// <summary>
/// 词汇
/// </summary>
[
EnumField
(
"词汇"
)]
Vocabulary
=
1
,
/// <summary>
/// 口语
/// </summary>
[
EnumField
(
"口语"
)]
Speaking
=
2
,
/// <summary>
/// 语法
/// </summary>
[
EnumField
(
"语法"
)]
Grammar
=
3
,
/// <summary>
/// 听力
/// </summary>
[
EnumField
(
"听力"
)]
Hearing
=
4
,
/// <summary>
/// 阅读
/// </summary>
[
EnumField
(
"阅读"
)]
Read
=
5
}
}
Edu.Model/Entity/Course/RB_Course.cs
View file @
d1fff1db
...
...
@@ -146,5 +146,20 @@ namespace Edu.Model.Entity.Course
/// 所属科目
/// </summary>
public
int
CourseSubject
{
get
;
set
;
}
/// <summary>
/// 同业课程图标
/// </summary>
public
string
B2BIcon
{
get
;
set
;
}
/// <summary>
/// 背景颜色(前端无法实现自动识别时启用)
/// </summary>
public
string
B2BBackground
{
get
;
set
;
}
/// <summary>
/// 课程重点, 多个英文逗号分隔 枚举
/// </summary>
public
string
CourseEmphasis
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/Entity/Customer/RB_Customer_BalanceDetail.cs
View file @
d1fff1db
...
...
@@ -86,5 +86,20 @@ namespace Edu.Model.Entity.Customer
/// 班级编号
/// </summary>
public
int
ClassId
{
get
;
set
;
}
/// <summary>
/// 学生ID
/// </summary>
public
int
GuestId
{
get
;
set
;
}
/// <summary>
/// 状态 1已返佣 2待返佣
/// </summary>
public
int
BalanceState
{
get
;
set
;
}
/// <summary>
/// 是否已提现 1是 2否
/// </summary>
public
int
IsRemit
{
get
;
set
;
}
}
}
Edu.Model/Entity/Log/RB_B2B_StudentNotice.cs
0 → 100644
View file @
d1fff1db
using
Edu.Common.Enum.Course
;
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Log
{
/// <summary>
/// B2B同业学生消息通知实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_B2B_StudentNotice
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 类型 1即将欠费 2即将结课 3已停课 4已结课
/// </summary>
public
int
Type
{
get
;
set
;
}
/// <summary>
/// 学生ID
/// </summary>
public
int
StudentId
{
get
;
set
;
}
/// <summary>
/// 同业ID
/// </summary>
public
int
CustomerId
{
get
;
set
;
}
/// <summary>
/// 标题
/// </summary>
public
string
Title
{
get
;
set
;
}
/// <summary>
/// 内容
/// </summary>
public
string
Content
{
get
;
set
;
}
/// <summary>
/// 是否已查看 1是 2否
/// </summary>
public
int
IsLook
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建日期
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 创建日期
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Course/RB_Course_Chapter_ViewModel.cs
View file @
d1fff1db
...
...
@@ -28,7 +28,9 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
public
int
NewCourseId
{
get
;
set
;
}
/// <summary>
/// 课程名称
/// </summary>
public
string
CourseName
{
get
;
set
;
}
}
...
...
Edu.Model/ViewModel/Log/RB_B2B_StudentNotice_ViewModel.cs
0 → 100644
View file @
d1fff1db
using
Edu.Model.Entity.Log
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Log
{
/// <summary>
/// b2b同业学生消息通知扩展类
/// </summary>
public
class
RB_B2B_StudentNotice_ViewModel
:
RB_B2B_StudentNotice
{
}
}
Edu.Module.Course/ClassModule.cs
View file @
d1fff1db
...
...
@@ -168,6 +168,11 @@ namespace Edu.Module.Course
/// </summary>
private
readonly
RB_User_ChangeLogRepository
user_ChangeLogRepository
=
new
RB_User_ChangeLogRepository
();
/// <summary>
/// b2b同业学生消息推送
/// </summary>
private
readonly
RB_B2B_StudentNoticeRepository
b2B_StudentNoticeRepository
=
new
RB_B2B_StudentNoticeRepository
();
/// <summary>
/// 商品规格
/// </summary>
...
...
@@ -2332,6 +2337,86 @@ namespace Edu.Module.Course
{
flag
=
CalcGuestHoursModule
(
guestModel
,
item
);
}
#
region
B2B
同业推送
//最后5个课时做处理
if
(
completeHours
>
guestModel
.
ValidClassHours
)
{
//已停课
b2B_StudentNoticeRepository
.
Insert
(
new
Model
.
Entity
.
Log
.
RB_B2B_StudentNotice
()
{
Id
=
0
,
Type
=
3
,
StudentId
=
guestModel
.
Id
,
CustomerId
=
1
,
Title
=
"停课通知"
,
Content
=
"学员"
+
guestModel
.
GuestName
+
" 有效课时消耗完毕,已自动停课,关联单号:"
+
guestModel
.
OrderId
+
"!"
,
IsLook
=
2
,
Status
=
0
,
CreateBy
=
item
.
CreateBy
,
CreateTime
=
DateTime
.
Now
,
Group_Id
=
item
.
Group_Id
,
UpdateTime
=
DateTime
.
Now
});
}
else
if
(
guestModel
.
TotalHours
>
guestModel
.
ValidClassHours
&&
shenyuHours
<=
5
)
{
//即将欠费
b2B_StudentNoticeRepository
.
Insert
(
new
Model
.
Entity
.
Log
.
RB_B2B_StudentNotice
()
{
Id
=
0
,
Type
=
3
,
StudentId
=
guestModel
.
Id
,
CustomerId
=
1
,
Title
=
"欠费预警"
,
Content
=
"学员"
+
guestModel
.
GuestName
+
" 即将欠费,剩余课时"
+
shenyuHours
+
",关联单号:"
+
guestModel
.
OrderId
+
"!"
,
IsLook
=
2
,
Status
=
0
,
CreateBy
=
item
.
CreateBy
,
CreateTime
=
DateTime
.
Now
,
Group_Id
=
item
.
Group_Id
,
UpdateTime
=
DateTime
.
Now
});
}
else
if
(
guestModel
.
TotalHours
==
guestModel
.
ValidClassHours
&&
shenyuHours
<=
5
&&
shenyuHours
>=
0
)
{
//即将结课
b2B_StudentNoticeRepository
.
Insert
(
new
Model
.
Entity
.
Log
.
RB_B2B_StudentNotice
()
{
Id
=
0
,
Type
=
3
,
StudentId
=
guestModel
.
Id
,
CustomerId
=
1
,
Title
=
"结课预警"
,
Content
=
"学员"
+
guestModel
.
GuestName
+
" 即将结课,剩余课时"
+
shenyuHours
+
",关联单号:"
+
guestModel
.
OrderId
+
"!"
,
IsLook
=
2
,
Status
=
0
,
CreateBy
=
item
.
CreateBy
,
CreateTime
=
DateTime
.
Now
,
Group_Id
=
item
.
Group_Id
,
UpdateTime
=
DateTime
.
Now
});
}
else
if
(
guestModel
.
TotalHours
==
guestModel
.
ValidClassHours
&&
shenyuHours
==
0
)
{
//已经结课
b2B_StudentNoticeRepository
.
Insert
(
new
Model
.
Entity
.
Log
.
RB_B2B_StudentNotice
()
{
Id
=
0
,
Type
=
3
,
StudentId
=
guestModel
.
Id
,
CustomerId
=
1
,
Title
=
"结课通知"
,
Content
=
"学员"
+
guestModel
.
GuestName
+
" 已结课,关联单号:"
+
guestModel
.
OrderId
+
"!"
,
IsLook
=
2
,
Status
=
0
,
CreateBy
=
item
.
CreateBy
,
CreateTime
=
DateTime
.
Now
,
Group_Id
=
item
.
Group_Id
,
UpdateTime
=
DateTime
.
Now
});
}
#
endregion
}
}
}
...
...
Edu.Module.Course/CourseModule.cs
View file @
d1fff1db
...
...
@@ -296,6 +296,9 @@ namespace Edu.Module.Course
{
nameof
(
RB_Course_ViewModel
.
ClassHours
),
model
.
ClassHours
},
{
nameof
(
RB_Course_ViewModel
.
CourseRate
),
model
.
CourseRate
},
{
nameof
(
RB_Course_ViewModel
.
CourseSubject
),
model
.
CourseSubject
},
{
nameof
(
RB_Course_ViewModel
.
B2BIcon
),
model
.
B2BIcon
},
{
nameof
(
RB_Course_ViewModel
.
B2BBackground
),
model
.
B2BBackground
},
{
nameof
(
RB_Course_ViewModel
.
CourseEmphasis
),
model
.
CourseEmphasis
},
};
flag
=
courseRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Course_ViewModel
.
CourseId
),
model
.
CourseId
));
}
...
...
Edu.Repository/Log/RB_B2B_StudentNoticeRepository.cs
0 → 100644
View file @
d1fff1db
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
Edu.Model.Entity.Log
;
using
Edu.Model.ViewModel.Log
;
namespace
Edu.Repository.Log
{
/// <summary>
/// b2b同业学生信息通知仓储
/// </summary>
public
class
RB_B2B_StudentNoticeRepository
:
BaseRepository
<
RB_B2B_StudentNotice
>
{
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex">当前页</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowsCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_B2B_StudentNotice_ViewModel
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_B2B_StudentNotice_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_B2B_StudentNotice
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_B2B_StudentNotice_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
if
(
query
.
Type
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_B2B_StudentNotice_ViewModel
.
Type
),
query
.
Type
);
}
if
(
query
.
CustomerId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_B2B_StudentNotice_ViewModel
.
CustomerId
),
query
.
CustomerId
);
}
if
(
query
.
StudentId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_B2B_StudentNotice_ViewModel
.
StudentId
),
query
.
StudentId
);
}
}
builder
.
Append
(
" ORDER BY Id DESC "
);
return
GetPage
<
RB_B2B_StudentNotice_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
}
}
Edu.WebApi/Controllers/Course/CourseController.cs
View file @
d1fff1db
...
...
@@ -129,6 +129,20 @@ namespace Edu.WebApi.Controllers.Course
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取课程重点枚举列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetCourseEmphasisEnumList
()
{
var
list
=
EnumHelper
.
EnumToList
(
typeof
(
CourseEmphasisEnum
));
return
ApiResult
.
Success
(
""
,
list
.
OrderBy
(
x
=>
x
.
Id
).
Select
(
x
=>
new
{
x
.
Name
,
x
.
Id
}));
}
#
endregion
#
region
课程分类管理
...
...
@@ -385,6 +399,9 @@ namespace Edu.WebApi.Controllers.Course
ClassHours
=
base
.
ParmJObj
.
GetDecimal
(
"ClassHours"
),
CourseRate
=
(
CourseRateEnum
)
base
.
ParmJObj
.
GetInt
(
"CourseRate"
),
CourseSubject
=
base
.
ParmJObj
.
GetInt
(
"CourseSubject"
),
B2BIcon
=
base
.
ParmJObj
.
GetStringValue
(
"B2BIcon"
),
B2BBackground
=
base
.
ParmJObj
.
GetStringValue
(
"B2BBackground"
),
CourseEmphasis
=
base
.
ParmJObj
.
GetStringValue
(
"CourseEmphasis"
)
};
try
{
...
...
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