Commit b9a4c096 authored by liuyang's avatar liuyang

update

parent 7dc47c16
...@@ -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>
......
...@@ -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){
......
...@@ -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);
......
...@@ -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天
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment