Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
涂亚平
/
subsidy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 99eb06b2
authored
Jan 26, 2022
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
年前上线版本
1 parent
1babf734
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
8 deletions
src/main/java/com/subsidy/mapper/VodPlayHistoryMapper.java
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
src/main/java/com/subsidy/vo/vod/ClassMemberPlayLengthVO.java
src/main/resources/mapper/VodPlayHistoryMapper.xml
src/main/java/com/subsidy/mapper/VodPlayHistoryMapper.java
View file @
99eb06b
...
...
@@ -6,6 +6,7 @@ import com.subsidy.model.VodPlayHistoryDO;
import
com.subsidy.vo.administer.MemberStudyLogVO
;
import
com.subsidy.vo.member.ContentVodNewVO
;
import
com.subsidy.vo.sign.ClassSignInfoVO
;
import
com.subsidy.vo.vod.ClassMemberPlayLengthVO
;
import
com.subsidy.vo.vod.GetMemberStudyInfoVO
;
import
com.subsidy.vo.vod.StudyHistoryVO
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -84,7 +85,7 @@ public interface VodPlayHistoryMapper extends BaseMapper<VodPlayHistoryDO> {
/**
* 以班级、人的维度查询某个人的视频观看时长
*/
List
<
VodPlayHistoryD
O
>
classMemberPlayLength
(
Long
classId
);
List
<
ClassMemberPlayLengthV
O
>
classMemberPlayLength
(
Long
classId
);
}
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
View file @
99eb06b
...
...
@@ -68,6 +68,7 @@ import com.subsidy.vo.done.GetMaxScoreVO;
import
com.subsidy.vo.done.TestScoreInfoVO
;
import
com.subsidy.vo.member.ClassSignVO
;
import
com.subsidy.vo.sign.AnswerRecordVO
;
import
com.subsidy.vo.vod.ClassMemberPlayLengthVO
;
import
com.subsidy.vo.vod.ClassVodCompleteInfoVO
;
import
com.subsidy.vo.vod.DayInfoItemVO
;
import
com.subsidy.vo.vod.GetMemberStudyInfoVO
;
...
...
@@ -927,16 +928,22 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
public
void
exportClassVodDailyInfo
(
ClassVodDailyInfoDTO
classVodDailyInfoDTO
){
//查看班级里有多少人
Page
pager
=
new
Page
(
1
,-
1L
);
Page
pager
=
new
Page
(
1
,
-
1L
);
ClassDictDO
classDictDO
=
classDictMapper
.
selectById
(
classVodDailyInfoDTO
.
getClassId
());
//查询所有视频
List
<
VodDictDO
>
vodDictDOS
=
vodDictMapper
.
getCourseVods
(
classVodDailyInfoDTO
.
getClassId
(),
null
);
List
<
VodDictDO
>
vodDictDOS
=
vodDictMapper
.
getCourseVods
(
classDictDO
.
getCourseId
(),
null
);
HashMap
<
String
,
Integer
>
vodHashmap
=
new
HashMap
<>();
for
(
VodDictDO
vodDictDO
:
vodDictDOS
)
{
vodHashmap
.
put
(
vodDictDO
.
getVodName
(),
vodDictDO
.
getVodLength
());
}
// 表头
List
<
String
>
title
=
new
ArrayList
<>();
title
.
add
(
"姓名"
);
title
.
add
(
"合计完成率"
);
for
(
VodDictDO
vodDictDO
:
vodDictDOS
){
for
(
VodDictDO
vodDictDO
:
vodDictDOS
)
{
title
.
add
(
vodDictDO
.
getVodName
());
}
...
...
@@ -946,15 +953,16 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
List
<
ClassDailyInfoVO
>
classDailyInfoVOS
=
classDailyInfoVOIPage
.
getRecords
();
//获取班级、每个学员维度的视频播放总时长
List
<
VodPlayHistoryDO
>
vodPlayHistoryD
OS
=
vodPlayHistoryMapper
.
classMemberPlayLength
(
classVodDailyInfoDTO
.
getClassId
());
List
<
ClassMemberPlayLengthVO
>
classMemberPlayLengthV
OS
=
vodPlayHistoryMapper
.
classMemberPlayLength
(
classVodDailyInfoDTO
.
getClassId
());
HashMap
<
String
,
Integer
>
hashMap
=
new
HashMap
<>();
//存在一个map里
for
(
VodPlayHistoryDO
vodPlayHistoryDO
:
vodPlayHistoryD
OS
)
{
hashMap
.
put
(
vodPlayHistoryDO
.
getMemberId
()
+
"-"
+
vodPlayHistoryDO
.
getVodId
(),
vodPlayHistoryD
O
.
getPlayLength
());
for
(
ClassMemberPlayLengthVO
classMemberPlayLengthVO
:
classMemberPlayLengthV
OS
)
{
hashMap
.
put
(
classMemberPlayLengthVO
.
getMemberId
()
+
"-"
+
classMemberPlayLengthVO
.
getVodName
(),
classMemberPlayLengthV
O
.
getPlayLength
());
}
writeVodExcel
(
classDailyInfoVOS
,
hashMap
,
title
,
vodHashmap
);
}
...
...
src/main/java/com/subsidy/vo/vod/ClassMemberPlayLengthVO.java
0 → 100644
View file @
99eb06b
package
com
.
subsidy
.
vo
.
vod
;
import
lombok.Data
;
@Data
public
class
ClassMemberPlayLengthVO
{
private
Long
id
;
/**
* 班级id
*/
private
Long
classId
;
/**
* 视频id
*/
private
Long
vodId
;
/**
* 学生id
*/
private
Long
memberId
;
/**
* 观看时长
*/
private
Integer
playLength
;
private
String
vodName
;
}
src/main/resources/mapper/VodPlayHistoryMapper.xml
View file @
99eb06b
...
...
@@ -317,7 +317,7 @@
order by t.play_date desc
</select>
<select
id=
"classMemberPlayLength"
parameterType=
"long"
resultType=
"com.subsidy.
model.VodPlayHistoryD
O"
>
<select
id=
"classMemberPlayLength"
parameterType=
"long"
resultType=
"com.subsidy.
vo.vod.ClassMemberPlayLengthV
O"
>
SELECT
t.member_id,
t.vod_id,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment