Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
online-edu-backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
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
online-edu
online-edu-backend
Commits
b9a4c096
Commit
b9a4c096
authored
Jun 01, 2021
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
7dc47c16
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
21 deletions
+43
-21
pom.xml
pom.xml
+31
-0
CourseService.java
...java/com/qkdata/biz/management/service/CourseService.java
+6
-18
MainPageController.java
...ava/com/qkdata/biz/web/controller/MainPageController.java
+0
-3
application.yml
src/main/resources/application.yml
+6
-0
No files found.
pom.xml
View file @
b9a4c096
...
@@ -338,6 +338,37 @@
...
@@ -338,6 +338,37 @@
</goals>
</goals>
</execution>
</execution>
</executions>
</executions>
<execution>
<id>
tag-image
</id>
<phase>
install
</phase>
<goals>
<goal>
tag
</goal>
</goals>
<configuration>
<image>
${docker.image.prefix}/${project.artifactId}:${project.version}
</image>
<newName>
${docker.registry}/${docker.image.prefix}/${project.artifactId}:${project.version}
</newName>
</configuration>
</execution>
<execution>
<id>
push-image
</id>
<phase>
install
</phase>
<goals>
<goal>
push
</goal>
</goals>
<configuration>
<imageName>
${docker.registry}/${docker.image.prefix}/${project.artifactId}:${project.version}
</imageName>
</configuration>
</execution>
<execution>
<id>
remove-image
</id>
<phase>
install
</phase>
<goals>
<goal>
removeImage
</goal>
</goals>
<configuration>
<imageName>
${docker.image.prefix}/${project.artifactId}:${project.version}
</imageName>
</configuration>
</execution>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
...
...
src/main/java/com/qkdata/biz/management/service/CourseService.java
View file @
b9a4c096
...
@@ -17,6 +17,7 @@ import com.qkdata.biz.enums.CourseStatusEnum;
...
@@ -17,6 +17,7 @@ import com.qkdata.biz.enums.CourseStatusEnum;
import
com.qkdata.biz.management.entity.*
;
import
com.qkdata.biz.management.entity.*
;
import
com.qkdata.biz.management.mapper.*
;
import
com.qkdata.biz.management.mapper.*
;
import
com.qkdata.biz.management.vo.*
;
import
com.qkdata.biz.management.vo.*
;
import
com.qkdata.biz.sys.entity.SysUserPO
;
import
com.qkdata.biz.sys.service.SysUserService
;
import
com.qkdata.biz.sys.service.SysUserService
;
import
com.qkdata.biz.web.vo.FullUserInfo
;
import
com.qkdata.biz.web.vo.FullUserInfo
;
import
com.qkdata.biz.web.vo.SearchCourseConditionModel
;
import
com.qkdata.biz.web.vo.SearchCourseConditionModel
;
...
@@ -383,6 +384,10 @@ public class CourseService extends ServiceImpl<CourseMapper, CoursePO> {
...
@@ -383,6 +384,10 @@ public class CourseService extends ServiceImpl<CourseMapper, CoursePO> {
throw
new
BusinessException
(
"该课程已下架"
);
throw
new
BusinessException
(
"该课程已下架"
);
}
}
if
(
coursePO
.
getAllow
()
==
CourseAllowEnum
.
SPECIFY
){
if
(
coursePO
.
getAllow
()
==
CourseAllowEnum
.
SPECIFY
){
SysUserPO
sysUserPO
=
UserContext
.
getUser
();
if
(
sysUserPO
==
null
){
throw
new
BusinessException
(
"请登陆后查看"
);
}
List
<
Long
>
allowOrgIds
=
getAllowEnterpriseList
(
courseId
);
List
<
Long
>
allowOrgIds
=
getAllowEnterpriseList
(
courseId
);
if
(
CollUtil
.
isNotEmpty
(
allowOrgIds
)){
if
(
CollUtil
.
isNotEmpty
(
allowOrgIds
)){
String
username
=
UserContext
.
getUser
().
getUsername
();
String
username
=
UserContext
.
getUser
().
getUsername
();
...
@@ -405,24 +410,7 @@ public class CourseService extends ServiceImpl<CourseMapper, CoursePO> {
...
@@ -405,24 +410,7 @@ public class CourseService extends ServiceImpl<CourseMapper, CoursePO> {
}
}
}
}
// public String getVideoPlayUrl(Long courseId, Long chaperId) {
// CourseChapterPO po = chapterMapper.selectById(chaperId);
// if (po != null){
// ResourcePO resourcePO = resourceService.getById(po.getResourceId());
// if (resourcePO != null && StrUtil.isNotBlank(resourcePO.getVideoId())){
// try {
// GetPlayInfoResponse response = aliyunService.getVideoPlayInfo(resourcePO.getVideoId());
// if (CollUtil.isNotEmpty(response.getPlayInfoList())){
// GetPlayInfoResponse.PlayInfo playInfo = response.getPlayInfoList().get(0);
// return playInfo.getPlayURL();
// }
// } catch (ClientException e) {
// e.printStackTrace();
// }
// }
// }
// return "";
// }
public
GetVideoPlayAuthResponse
getVideoPlayAuth
(
Long
courseId
,
Long
chaperId
){
public
GetVideoPlayAuthResponse
getVideoPlayAuth
(
Long
courseId
,
Long
chaperId
){
CourseChapterPO
po
=
chapterMapper
.
selectById
(
chaperId
);
CourseChapterPO
po
=
chapterMapper
.
selectById
(
chaperId
);
if
(
po
!=
null
){
if
(
po
!=
null
){
...
...
src/main/java/com/qkdata/biz/web/controller/MainPageController.java
View file @
b9a4c096
...
@@ -47,7 +47,6 @@ public class MainPageController {
...
@@ -47,7 +47,6 @@ public class MainPageController {
@ApiOperation
(
"获取配置信息"
)
@ApiOperation
(
"获取配置信息"
)
@GetMapping
(
""
)
@GetMapping
(
""
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
public
Result
<
MainPageModel
>
get
(){
public
Result
<
MainPageModel
>
get
(){
List
<
SwiperConfigModel
>
swiperConfigModels
=
swiperConfigService
.
listConfig
(
SwiperStatusEnum
.
ENABLE
);
List
<
SwiperConfigModel
>
swiperConfigModels
=
swiperConfigService
.
listConfig
(
SwiperStatusEnum
.
ENABLE
);
List
<
CourseTagPO
>
tagList
=
courseTagService
.
list
(
Wrappers
.<
CourseTagPO
>
lambdaQuery
().
eq
(
CourseTagPO:
:
getRecommend
,
true
));
List
<
CourseTagPO
>
tagList
=
courseTagService
.
list
(
Wrappers
.<
CourseTagPO
>
lambdaQuery
().
eq
(
CourseTagPO:
:
getRecommend
,
true
));
...
@@ -82,7 +81,6 @@ public class MainPageController {
...
@@ -82,7 +81,6 @@ public class MainPageController {
@ApiOperation
(
"详情页关联课程推荐"
)
@ApiOperation
(
"详情页关联课程推荐"
)
@GetMapping
(
"/course/recommend/{courseId}"
)
@GetMapping
(
"/course/recommend/{courseId}"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
public
Result
<
List
<
SearchCourseResultModel
>>
courseRecommend
(
Long
courseId
){
public
Result
<
List
<
SearchCourseResultModel
>>
courseRecommend
(
Long
courseId
){
List
<
SearchCourseResultModel
>
list
=
courseService
.
relationRecommend
(
courseId
);
List
<
SearchCourseResultModel
>
list
=
courseService
.
relationRecommend
(
courseId
);
return
Result
.
succeed
(
list
);
return
Result
.
succeed
(
list
);
...
@@ -90,7 +88,6 @@ public class MainPageController {
...
@@ -90,7 +88,6 @@ public class MainPageController {
@ApiOperation
(
"获取课程详情"
)
@ApiOperation
(
"获取课程详情"
)
@GetMapping
(
"/course/{id}"
)
@GetMapping
(
"/course/{id}"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
@SysLog
(
"获取课程详情"
)
@SysLog
(
"获取课程详情"
)
public
Result
<
CourseDetailModel
>
getCourseDetail
(
@PathVariable
Long
id
){
public
Result
<
CourseDetailModel
>
getCourseDetail
(
@PathVariable
Long
id
){
courseService
.
checkPerm
(
id
);
courseService
.
checkPerm
(
id
);
...
...
src/main/resources/application.yml
View file @
b9a4c096
...
@@ -91,6 +91,12 @@ jwt:
...
@@ -91,6 +91,12 @@ jwt:
-
/api/sys/login
-
/api/sys/login
-
/api/sms/sendCode
-
/api/sms/sendCode
-
/api/web/login/**
-
/api/web/login/**
-
/api/web/mainPage
-
/api/web/mainPage/course/recommend/list
-
/api/web/mainPage/course/search
-
/api/web/mainPage/course/tags
-
/api/web/mainPage/course/recommend/*
-
/api/web/mainPage/course/*
aud
:
qkdata
aud
:
qkdata
exp
:
720
#24*30 30天
exp
:
720
#24*30 30天
...
...
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