diff --git a/pom.xml b/pom.xml index c3565667..f805dfc1 100644 --- a/pom.xml +++ b/pom.xml @@ -135,11 +135,11 @@ 3.12.5 - - org.bytedeco - javacv-platform - 1.5.6 - + + + + + com.aliyun diff --git a/src/main/java/com/peanut/common/service/AsyncService.java b/src/main/java/com/peanut/common/service/AsyncService.java index 82925b23..45b3365c 100644 --- a/src/main/java/com/peanut/common/service/AsyncService.java +++ b/src/main/java/com/peanut/common/service/AsyncService.java @@ -21,8 +21,8 @@ public class AsyncService { int i = p.getBody().getVideoMeta().getDuration().intValue(); courseCatalogueChapterVideoEntity.setDuration(i); }else{ - Integer mp4Duration = SpdbUtil.getMp4Duration("https://ehh-private-01.oss-cn-beijing.aliyuncs.com/video/taiHuClass/" + courseCatalogueChapterVideoEntity.getVideo()); - courseCatalogueChapterVideoEntity.setDuration(mp4Duration); +// Integer mp4Duration = SpdbUtil.getMp4Duration("https://ehh-private-01.oss-cn-beijing.aliyuncs.com/video/taiHuClass/" + courseCatalogueChapterVideoEntity.getVideo()); +// courseCatalogueChapterVideoEntity.setDuration(mp4Duration); } courseCatalogueChapterVideoDao.updateById(courseCatalogueChapterVideoEntity); } diff --git a/src/main/java/com/peanut/common/utils/SpdbUtil.java b/src/main/java/com/peanut/common/utils/SpdbUtil.java index 1080f6bd..00530312 100644 --- a/src/main/java/com/peanut/common/utils/SpdbUtil.java +++ b/src/main/java/com/peanut/common/utils/SpdbUtil.java @@ -5,24 +5,24 @@ import com.aliyun.teautil.models.RuntimeOptions; import com.aliyun.vod20170321.Client; import com.aliyun.vod20170321.models.GetVideoPlayAuthRequest; import com.aliyun.vod20170321.models.GetVideoPlayAuthResponse; -import org.bytedeco.javacv.FFmpegFrameGrabber; -import org.bytedeco.javacv.FrameGrabber; +//import org.bytedeco.javacv.FFmpegFrameGrabber; +//import org.bytedeco.javacv.FrameGrabber; import java.util.HashMap; public class SpdbUtil { - public static Integer getMp4Duration(String url){ - double duration = 0; - try (FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber(url)) { - frameGrabber.start(); - duration = frameGrabber.getLengthInTime()/1000000; - frameGrabber.stop(); - } catch (FrameGrabber.Exception e) { - e.printStackTrace(); - } - return (int)duration; - }; +// public static Integer getMp4Duration(String url){ +// double duration = 0; +// try (FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber(url)) { +// frameGrabber.start(); +// duration = frameGrabber.getLengthInTime()/1000000; +// frameGrabber.stop(); +// } catch (FrameGrabber.Exception e) { +// e.printStackTrace(); +// } +// return (int)duration; +// }; public static GetVideoPlayAuthResponse getPlayAuth(String vid) throws Exception { com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config() diff --git a/src/main/java/com/peanut/modules/master/controller/ShopProductController.java b/src/main/java/com/peanut/modules/master/controller/ShopProductController.java index 2435907e..add27c2e 100644 --- a/src/main/java/com/peanut/modules/master/controller/ShopProductController.java +++ b/src/main/java/com/peanut/modules/master/controller/ShopProductController.java @@ -39,7 +39,7 @@ public class ShopProductController { if (StringUtils.isNotEmpty(params.get("productName").toString())) { wrapper.like(ShopProduct::getProductName, params.get("productName")); } - wrapper.eq(StringUtils.isNotBlank(params.get("goodsType").toString())&¶ms.get("goodsType").toString()!="00",ShopProduct::getGoodsType,params.get("goodsType").toString()); + wrapper.eq((StringUtils.isNotBlank(params.get("goodsType").toString())&&!params.get("goodsType").toString().equals("00")),ShopProduct::getGoodsType,params.get("goodsType").toString()); wrapper.orderByAsc(ShopProduct::getSort); wrapper.orderByAsc(ShopProduct::getCreateTime); Page res = shopProductService.page(new Page<>( diff --git a/src/main/java/com/peanut/modules/master/service/impl/CourseCatalogueChapterVideoServiceImpl.java b/src/main/java/com/peanut/modules/master/service/impl/CourseCatalogueChapterVideoServiceImpl.java index c050bb5e..97e3e045 100644 --- a/src/main/java/com/peanut/modules/master/service/impl/CourseCatalogueChapterVideoServiceImpl.java +++ b/src/main/java/com/peanut/modules/master/service/impl/CourseCatalogueChapterVideoServiceImpl.java @@ -48,7 +48,7 @@ public class CourseCatalogueChapterVideoServiceImpl extends ServiceImpl impl wrapper.selectAll(CourseEntity.class); wrapper.leftJoin(CourseToSociologyEntity.class,CourseToSociologyEntity::getCourseId,CourseEntity::getId); wrapper.eq(CourseToSociologyEntity::getSociologyId,param.getId()); + wrapper.orderByAsc(CourseToSociologyEntity::getSort); Page courseEntityPage = this.getBaseMapper().selectJoinPage(new Page<>(param.getPage(), param.getLimit()),CourseEntity.class, wrapper); return courseEntityPage; } @@ -78,6 +79,7 @@ public class CourseServiceImpl extends ServiceImpl impl wrapper.selectAll(CourseEntity.class); wrapper.leftJoin(CourseToMarketEntity.class,CourseToMarketEntity::getCourseId,CourseEntity::getId); wrapper.eq(CourseToMarketEntity::getMarketId,param.getId()); + wrapper.orderByAsc(CourseToSociologyEntity::getSort); Page courseEntityPage = this.getBaseMapper().selectJoinPage(new Page<>(param.getPage(), param.getLimit()), CourseEntity.class, wrapper); return courseEntityPage; }