173 次代码提交 5fa24cd667 ... 4c01188741

作者 SHA1 备注 提交日期
  bing.li 4c01188741 asdf 5 年之前
  bing.li bedfe5fab8 asdf 5 年之前
  songshuai 705c05cf74 Commit. 5 年之前
  songshuai e8bff9430e Commit. 5 年之前
  songshuai 5f032fbd9c Commit. 5 年之前
  songshuai f6dfaec610 Commit. 5 年之前
  songshuai 4e1353cecd Commit. 5 年之前
  songshuai da1be1fd6d 新增获取分类下的专辑列表接口 5 年之前
  songshuai fa5780e8fc Commit. 5 年之前
  songshuai 2d56a4f545 Commit. 5 年之前
  songshuai 551c12a518 新增获取分类列表接口 5 年之前
  songshuai 3294ac0c96 新增分类、专辑、节目Dao层 5 年之前
  songshuai d431b6f863 新增分类、专辑、节目实体类 5 年之前
  songshuai a4006b18c2 杭研接口使用。 5 年之前
  xushengqiang 1dcfca2586 error code 5 年之前
  xushengqiang 55478915d9 error code 5 年之前
  xushengqiang 5819711150 error code 5 年之前
  songshuai 858ce87945 更换image地址域名。 5 年之前
  xushengqiang 3efaa10d91 error code 5 年之前
  xushengqiang 6f6a93eca9 bug fix 5 年之前
  xushengqiang b0de7cfb45 bug fix 5 年之前
  xushengqiang a893dba915 bug fix 5 年之前
  xushengqiang ac9d78f14d bug fix 5 年之前
  xushengqiang ef8cabf6f8 bug fix 5 年之前
  xushengqiang ed8ca4bf20 bug fix 5 年之前
  xushengqiang e43c593f8e 专辑 课件搜索 5 年之前
  xushengqiang 533a169190 专辑 课件搜索 5 年之前
  xushengqiang a91d9093ba 专辑 课件搜索 5 年之前
  wangys c3c9bf1807 拦截bug 5 年之前
  wangys 2c5f1a7ae3 修改拦截 5 年之前
  wangys bfb69f3dfe 配置 5 年之前
  wangys a7cedf34b7 线上配置 5 年之前
  wangys f03ec46776 解决冲突 5 年之前
  wangys 43c9ca3f67 修改/findAlbum接口 5 年之前
  wangys ccc72bdbab bugfix 5 年之前
  wangys 72b62158d0 根据deviceId获取专辑列表 5 年之前
  wangys 33678640f4 修改资源文件访问域名 5 年之前
  xushengqiang 670651afd8 add keyword 5 年之前
  xushengqiang ba0290c154 bugfix 5 年之前
  xushengqiang f771239365 bugfix 5 年之前
  xushengqiang 87787f05b8 bugfix 6 年之前
  xushengqiang 84ad5782d4 bugfix 6 年之前
  xushengqiang ead50273a9 bugfix 6 年之前
  xushengqiang 1d1a4d2a04 将md5加密改成sha256 6 年之前
  xushengqiang de1d87cd3b 将md5加密改成sha256 6 年之前
  xushengqiang 3a39fce394 获取用户token 添加签名验证 6 年之前
  xushengqiang 71854ec95a 获取用户token 6 年之前
  xushengqiang 04be4cce2c 获取用户token 6 年之前
  xushengqiang 8bd1797e46 bugfix 6 年之前
  xushengqiang fc5fcb19c7 bugfix 6 年之前
  xushengqiang 886d07e6d4 统计相关 6 年之前
  xushengqiang 530fdc0646 权限验证 6 年之前
  xushengqiang 4779fd9b93 bugfix 6 年之前
  xushengqiang 07c489a7a5 bugfix 6 年之前
  xushengqiang cddda468b1 config 6 年之前
  xushengqiang 8852eacbc3 获取单个音频信息 6 年之前
  xushengqiang cb0d1be449 获取音频列表 6 年之前
  xushengqiang 8a2730fc99 获取音频列表 6 年之前
  xushengqiang 63092cb8c5 bugfix 6 年之前
  xushengqiang 1de76cbe86 url update 6 年之前
  xushengqiang bb40c53297 url update 6 年之前
  xushengqiang 605815b1fc 音频检索接口 6 年之前
  xushengqiang 3d49c2f179 album page list 6 年之前
  xushengqiang b58ee2b768 img path 6 年之前
  xushengqiang 1a9520fedd device id修改 6 年之前
  xushengqiang 07b34aaaba album 6 年之前
  xushengqiang d2fee5072b 添加专题 6 年之前
  yaobo 53f9358fc0 自动根据url路径检测并开始oss授权 7 年之前
  yaobo 78cf303c33 搜索视频时,优先返回mp4或标清格式的 7 年之前
  yaobo 17e10e24cc fixbug 7 年之前
  yaobo b41c2f6702 fixbug 7 年之前
  yaobo 08e1583fa2 device/trail的都是都增加时间起始点的判断 7 年之前
  yaobo 320dc803c1 点播记录搜索时增加时间起始点的判断 7 年之前
  yaobo e1796b0810 管理员根据idAudio来搜索音频 7 年之前
  yaobo cb1557d2c4 模糊搜索 7 年之前
  yaobo fd2bf29620 搜索资源平台的page从0开始,0表示第一页 7 年之前
  yaobo bcbeac4519 根据id、no,title来搜索资源平台 7 年之前
  yaobo 79a1d31e56 增加发票类型 7 年之前
  yaobo 8c8c84fb92 增加渠道的属性信息 7 年之前
  yaobo f3e67d4950 fixbug 7 年之前
  yaobo 743f9f7c84 记录管理员的操作日志 7 年之前
  yaobo e816ec2f16 增加对视频格式的支持 7 年之前
  yaobo 2f39346df6 增加退出登录接口 7 年之前
  yaobo 420ac69a44 fixbug 7 年之前
  yaobo a2cba81570 testcode 7 年之前
  yaobo 3d0567300a test code 7 年之前
  yaobo d419394d64 修改域名 7 年之前
  yaobo 4848a7ea1f 修改正式服务器的配置 7 年之前
  yaobo 43d1246999 修改正式服务器链接的redis信息 7 年之前
  yaobo bd42e6b59d 增加多运行环境的配置 7 年之前
  yaobo 6376f845da 分页功能返回总数 7 年之前
  yaobo 82fdcaef07 分页搜索 7 年之前
  yaobo 01d58523ef 搜索接口增加page,size,pageable分页检索功能 7 年之前
  yaobo 471ebeb68e 减少返回信息 7 年之前
  yaobo 3f87ddfe10 修改接口返回方式 7 年之前
  yaobo 769763769b fixbug 7 年之前
  yaobo a01cdfa60a 修改返回结果 7 年之前
  yaobo 173574ce45 与资源平台对接,根据资源id获取url 7 年之前
  yaobo 777be89bfd 新设备注册的同时,向数据资源云平台注册 7 年之前
  yaobo be05dda653 fixbug 7 年之前
  yaobo f807f6b7f6 屏蔽feignclient 7 年之前
  yaobo 51decc0700 删除无用代码 7 年之前
  yaobo e480e6f909 通过RestTemplate调用远程用户接口,测试feignclient调用,但是返回错误 7 年之前
  yaobo ba7a398bb6 修改entity中变量类型为对象,不能是基本数据类型,如int,boolean,否则利用java反射进行对象拷贝时会出错 7 年之前
  yaobo bb15ae4ec9 insert和update返回接口增加code 7 年之前
  yaobo a93bfaeaf8 渠道支撑查询第一级结果 7 年之前
  yaobo d143820fe1 fixbug 7 年之前
  yaobo 2298135dfd 为渠道、资源组增加子节点标记,并在新增、删除时动态修改标记 7 年之前
  yaobo fa16924d27 fixbug 7 年之前
  yaobo f20d63939d 屏蔽账号信息 7 年之前
  yaobo 63ac3f0dcc fixbug 7 年之前
  yaobo 5e8126a399 增加更新、删除接口 7 年之前
  yaobo 99d51d6ff8 将同类型的两个对象的数据进行合并,objTarget中为null的数据用objSource中的元素代替 7 年之前
  yaobo f8d6691d95 fixbug 7 年之前
  yaobo 36069d0824 测试拦截器 7 年之前
  yaobo 810ef5d9c1 开启权限验证 7 年之前
  yaobo 2419536b4e test 7 年之前
  yaobo 700167d333 header 7 年之前
  yaobo 5451a257ef test1 7 年之前
  yaobo 3938d9d258 test9 7 年之前
  yaobo 6a97f1717d test8 7 年之前
  yaobo 3b25670d4b test7 7 年之前
  yaobo 01aa2a1384 test6 7 年之前
  yaobo d634bdfc3f test5 7 年之前
  yaobo ab091f6cd8 test4 7 年之前
  yaobo 4c47a9c7a1 test3 7 年之前
  yaobo aa5c43eca1 test2 7 年之前
  yaobo 052c001e06 test 7 年之前
  yaobo 21421a44cb 测试 7 年之前
  yaobo ca8bbe12ee 更换filter 7 年之前
  yaobo d2c789224e 增加返回值 7 年之前
  yaobo 5835544a39 判断请求类型 7 年之前
  yaobo 7afc212201 允许header 7 年之前
  yaobo a0233a20a8 允许在header中增加id、token 7 年之前
  yaobo 2efbec0b9f OPTIONS 7 年之前
  yaobo 2f290dc385 增加数据库的更新功能,支持账号禁用 7 年之前
  yaobo 5bd4e190ab 增加创建时间 7 年之前
  yaobo 1f78f743d0 增加搜索全部的接口 7 年之前
  yaobo 0cbd6770a4 修改参数名称 7 年之前
  yaobo 76d9ed0a21 修改参数名称 7 年之前
  yaobo 515df62206 新增数据时将id/token放入header,主参数体放入body 7 年之前
  yaobo fc792bbfbf 音频所属资源组 7 年之前
  yaobo 84332081c4 区分用户、管理员接口进行鉴权,增加设备的搜索接口 7 年之前
  yaobo 19d471ccb1 测试新的跨域访问 7 年之前
  yaobo 3a20e58f18 fix 7 年之前
  yaobo 52baffcc2a test 7 年之前
  yaobo 15b5c7a222 屏蔽跨域测试代码 7 年之前
  yaobo e81a95dea1 test 7 年之前
  yaobo 334b1866c4 跨域过滤器 7 年之前
  yaobo 2bc90a70f2 测试机的redis信息 7 年之前
  yaobo 3e2180114e 设置跨域访问 7 年之前
  yaobo d925e743ff 修改包名 7 年之前
  yaobo a18434de00 修改db连接为测试机 7 年之前
  yaobo f44309a1c6 增加rid 7 年之前
  yaobo 47bd6b8719 增加管理员登陆验证的过滤器,接口分设备调用、管理员调用进行分别鉴权 7 年之前
  yaobo c36cb642e1 登陆后将admin的token保存至redis 7 年之前
  yaobo ede081a50d 增加md5加密、管理员的注册、登陆功能 7 年之前
  yaobo 3146f8cf15 屏蔽调试信息 7 年之前
  yaobo 8d97bc73ef 设备请求音频资源时,判断设备所属渠道是否有该音频所属资源组的权限,有则随机返回其中一个音频 7 年之前
  yaobo c5a90c58b1 增加资源组、权限组,及相应的创建、搜素等接口 7 年之前
  yaobo 573fe3a387 通过配置文件来对oss进行授权,并将token、url放入redis,设置过期时间 7 年之前
  yaobo 9023fad1ca 以注解bean的方式调用,增加redis的有效时间 7 年之前
  yaobo bcb56c08f4 支持redis 7 年之前
  yaobo 49096f4d17 完成对阿里云oss资源的动态加密,未加密的不能访问 7 年之前
  yaobo 4da796af4d 生成阿里sts验证token 7 年之前
  yaobo c6e067260f 连接测试服务器的数据库 7 年之前
  yaobo 3f6dc9b90e 搜索音频时增加点播记录 7 年之前
  yaobo 5fdf9f71d8 增加对渠道、合作商户的管理接口 7 年之前
  yaobo 6f7fd04379 简化返回结果的处理 7 年之前
  yaobo 6aaef87543 通过interceptor实现用户登录权限的验证 7 年之前
  yaobo b6a76cfc6b 音频资源、接口、服务的实现 7 年之前
  yaobo 9e29c0fd0e 修改id类型 7 年之前
  yaobo f49ab28aa3 智能语音项目初始化,完成设备的登陆、注册 7 年之前
共有 21 个文件被更改,包括 617 次插入13 次删除
  1. 7 0
      pom.xml
  2. 18 13
      src/main/java/cn/efunbox/audio/config/Config.java
  3. 33 0
      src/main/java/cn/efunbox/audio/controller/res/ChapterUpdateListController.java
  4. 33 0
      src/main/java/cn/efunbox/audio/controller/res/ContentUpdateController.java
  5. 33 0
      src/main/java/cn/efunbox/audio/controller/res/GetTypeController.java
  6. 5 0
      src/main/java/cn/efunbox/audio/entity/res/ResAlbum.java
  7. 112 0
      src/main/java/cn/efunbox/audio/impl/res/ChapterUpdateListServiceImpl.java
  8. 111 0
      src/main/java/cn/efunbox/audio/impl/res/ContenUpdateServiceImpl.java
  9. 64 0
      src/main/java/cn/efunbox/audio/impl/res/GetTypeServiceImpl.java
  10. 20 0
      src/main/java/cn/efunbox/audio/repository/res/ResAlbumRepository.java
  11. 14 0
      src/main/java/cn/efunbox/audio/repository/res/ResCategoryRepository.java
  12. 14 0
      src/main/java/cn/efunbox/audio/repository/res/ResWareRepository.java
  13. 9 0
      src/main/java/cn/efunbox/audio/service/res/ChapterUpdateListService.java
  14. 11 0
      src/main/java/cn/efunbox/audio/service/res/ContenUpdateService.java
  15. 13 0
      src/main/java/cn/efunbox/audio/service/res/GetTypeService.java
  16. 17 0
      src/main/java/cn/efunbox/audio/vo/res/ChapterUpdateVO.java
  17. 26 0
      src/main/java/cn/efunbox/audio/vo/res/ChapterVO.java
  18. 17 0
      src/main/java/cn/efunbox/audio/vo/res/ContentUpdateVO.java
  19. 27 0
      src/main/java/cn/efunbox/audio/vo/res/ContentVO.java
  20. 14 0
      src/main/java/cn/efunbox/audio/vo/res/TypeUpdateListVO.java
  21. 19 0
      src/main/java/cn/efunbox/audio/vo/res/TypeUpdateVO.java

+ 7 - 0
pom.xml

@@ -20,6 +20,13 @@
 		<relativePath/> <!-- lookup parent from repository -->
 	</parent>
 
+	<!--<parent>
+		<groupId>org.springframework.boot</groupId>
+		<artifactId>spring-boot-starter-parent</artifactId>
+		<version>2.1.3.RELEASE</version>
+		<relativePath/> &lt;!&ndash; lookup parent from repository &ndash;&gt;
+	</parent>-->
+
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

+ 18 - 13
src/main/java/cn/efunbox/audio/config/Config.java

@@ -13,60 +13,65 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
  */
 @Configuration
 @EnableWebMvc
-public class Config extends WebMvcConfigurerAdapter{
+public class Config extends WebMvcConfigurerAdapter {
 
     /**
      * 直接采用new interceptor或Autowired注入拦截器会导致dao为null的错误
+     *
      * @return
      */
     @Bean
-    AuthInterceptor authInterceptor(){
+    AuthInterceptor authInterceptor() {
         return new AuthInterceptor();
     }
 
     @Bean
-    AdminInterceptor adminInterceptor(){
+    AdminInterceptor adminInterceptor() {
         return new AdminInterceptor();
     }
 
     @Bean
-    AllowOriginIntercepter allowOriginIntercepter(){
+    AllowOriginIntercepter allowOriginIntercepter() {
         return new AllowOriginIntercepter();
     }
 
     @Bean
-    IgnoreOptionsInterceptor ignoreOptionsInterceptor(){
+    IgnoreOptionsInterceptor ignoreOptionsInterceptor() {
         return new IgnoreOptionsInterceptor();
     }
 
     @Bean
-    ResLogInterceptor resLogInterceptor(){
+    ResLogInterceptor resLogInterceptor() {
         return new ResLogInterceptor();
     }
 
     @Override
     public void addInterceptors(InterceptorRegistry registry) {
         registry.addInterceptor(authInterceptor())
-                .addPathPatterns("/audio/search","/audio/searchList","/audio/info/{audioId}","/album","/album/{albumId}")
-                .excludePathPatterns("/device/**", "/error","/audio/*");
+                .addPathPatterns("/audio/search", "/audio/searchList", "/audio/info/{audioId}", "/album", "/album/{albumId}")
+                .excludePathPatterns("/device/**", "/error", "/audio/*");
 
         registry.addInterceptor(adminInterceptor())
                 .addPathPatterns("/**", "/device/update", "/device/delete")
-                .excludePathPatterns("/device/**","/audio/info/{audioId}", "/error", "/admin/login", "/audio/search","/file/**","/audio/searchList","/statistics","/album","/album/{albumId}")
-                //杭研开放接口
-                .excludePathPatterns("/getTypeList","/getTypeContentList","/getContentDetail","/getContentChapterList","/getChapterDetail","/getTypeUpdateList","/getContentUpdateList","/getChapterUpdateList");
+                .excludePathPatterns("/device/**", "/audio/info/{audioId}", "/error", "/admin/login", "/audio/search", "/file/**", "/audio/searchList", "/statistics", "/album", "/album/{albumId}")
+
+                .excludePathPatterns("/getTypeList", "/getTypeContentList", "/getContentDetail", "/getContentChapterList", "/getChapterDetail", "/getTypeUpdateList", "/getContentUpdateList", "/getChapterUpdateList", "/getTypeUpdateList/**", "/getContentUpdateList/**", "/getChapterUpdateList/**");
+
+        //杭研开放接口
+        //.excludePathPatterns("/getTypeList","/getTypeContentList","/getContentDetail","/getContentChapterList","/getChapterDetail","/getTypeUpdateList","/getContentUpdateList","/getChapterUpdateList");
+
 
         registry.addInterceptor(ignoreOptionsInterceptor())
                 .addPathPatterns("/**")
                 //杭研开放接口
-                .excludePathPatterns("/getTypeList","/getTypeContentList","/getContentDetail","/getContentChapterList","/getChapterDetail","/getTypeUpdateList","/getContentUpdateList","/getChapterUpdateList");
+                .excludePathPatterns("/getTypeList", "/getTypeContentList", "/getContentDetail", "/getContentChapterList", "/getChapterDetail", "/getTypeUpdateList", "/getContentUpdateList", "/getChapterUpdateList");
 
         registry.addInterceptor(allowOriginIntercepter())
                 .addPathPatterns("/**");
 
         //杭研接口日志拦截器
         registry.addInterceptor(resLogInterceptor())
-                .addPathPatterns("/getTypeList","/getTypeContentList","/getContentDetail","/getContentChapterList","/getChapterDetail","/getTypeUpdateList","/getContentUpdateList","/getChapterUpdateList");
+                .addPathPatterns("/getTypeList", "/getTypeContentList", "/getContentDetail", "/getContentChapterList", "/getChapterDetail", "/getTypeUpdateList", "/getContentUpdateList", "/getChapterUpdateList");
     }
 
 //    /**

+ 33 - 0
src/main/java/cn/efunbox/audio/controller/res/ChapterUpdateListController.java

@@ -0,0 +1,33 @@
+package cn.efunbox.audio.controller.res;
+
+import cn.efunbox.audio.service.res.ChapterUpdateListService;
+import cn.efunbox.audio.utils.ResApiCode;
+import cn.efunbox.audio.utils.ResApiResult;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.text.ParseException;
+
+/**
+ * ChapterUpdateListController
+ * Created by wangys on
+ */
+@RestController
+@RequestMapping
+public class ChapterUpdateListController {
+
+    @Autowired
+    private ChapterUpdateListService chapterUpdateListService;
+
+    @RequestMapping(value = "/getChapterUpdateList")
+    public ResApiResult getChapterUpdateList(@RequestHeader(value = "USERID",required = false) String USERID, String beginTime, String order, Integer pageNum, Integer pageSize) {
+        try {
+            return chapterUpdateListService.getChapterUpdateList(beginTime,order,pageNum,pageSize);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return ResApiResult.error(ResApiCode.NOT_FOUND);
+    }
+}

+ 33 - 0
src/main/java/cn/efunbox/audio/controller/res/ContentUpdateController.java

@@ -0,0 +1,33 @@
+package cn.efunbox.audio.controller.res;
+
+import cn.efunbox.audio.service.res.ContenUpdateService;
+import cn.efunbox.audio.utils.ResApiCode;
+import cn.efunbox.audio.utils.ResApiResult;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.text.ParseException;
+
+/**
+ * ContentUpdateController
+ * Created by wangys on
+ */
+@RestController
+@RequestMapping
+public class ContentUpdateController {
+
+    @Autowired
+    private ContenUpdateService contenUpdateService;
+
+    @RequestMapping(value = "/getContentUpdateList")
+    public ResApiResult getContentUpdateList(@RequestHeader(value = "USERID",required = false) String USERID, String beginTime, String order, Integer pageNum, Integer pageSize){
+        try {
+            return contenUpdateService.getContentUpdateList(beginTime,order,pageNum,pageSize);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return ResApiResult.error(ResApiCode.NOT_FOUND);
+    }
+}

+ 33 - 0
src/main/java/cn/efunbox/audio/controller/res/GetTypeController.java

@@ -0,0 +1,33 @@
+package cn.efunbox.audio.controller.res;
+
+import cn.efunbox.audio.service.res.GetTypeService;
+import cn.efunbox.audio.utils.ResApiCode;
+import cn.efunbox.audio.utils.ResApiResult;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.text.ParseException;
+
+/**
+ * GetTypeController
+ * Created by wangys on
+ */
+@RestController
+@RequestMapping
+public class GetTypeController {
+
+    @Autowired
+    private GetTypeService getTypeService;
+
+    @RequestMapping(value = "/getTypeUpdateList")
+    public ResApiResult getTypeUpdateList(@RequestHeader(value = "USERID",required = false) String USERID, String beginTime, String order) {
+        try {
+            return getTypeService.getTypeUpdateList(beginTime, order);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return ResApiResult.error(ResApiCode.NOT_FOUND);
+    }
+}

+ 5 - 0
src/main/java/cn/efunbox/audio/entity/res/ResAlbum.java

@@ -64,6 +64,11 @@ public class ResAlbum {
     @Column(name = "type_id")
     private String typeId;
 
+    @Column(name = "is_del")
+    private String isDel;
+    @Column(name = "renewal")
+    private String renewal;
+
     @Column(name = "publish_time")
     private String publishTime;
 

+ 112 - 0
src/main/java/cn/efunbox/audio/impl/res/ChapterUpdateListServiceImpl.java

@@ -0,0 +1,112 @@
+package cn.efunbox.audio.impl.res;
+
+import cn.efunbox.audio.entity.res.ResAlbum;
+import cn.efunbox.audio.entity.res.ResWare;
+import cn.efunbox.audio.repository.res.ResAlbumRepository;
+import cn.efunbox.audio.repository.res.ResWareRepository;
+import cn.efunbox.audio.service.res.ChapterUpdateListService;
+import cn.efunbox.audio.utils.ResApiCode;
+import cn.efunbox.audio.utils.ResApiResult;
+import cn.efunbox.audio.vo.res.ChapterUpdateVO;
+import cn.efunbox.audio.vo.res.ChapterVO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * ChapterUpdateListServiceImpl
+ * Created by wangys on
+ */
+@Service
+public class ChapterUpdateListServiceImpl implements ChapterUpdateListService {
+    @Autowired
+    private ResWareRepository resWareRepository;
+    @Autowired
+    private ResAlbumRepository resAlbumRepository;
+    @Override
+    public ResApiResult getChapterUpdateList(String beginTime, String order, Integer pageNum, Integer pageSize) throws ParseException {
+        if (StringUtils.isNotBlank(order)) {
+            if (StringUtils.equals(order, "asc") || StringUtils.equals(order, "desc")) {
+            } else {
+                return ResApiResult.error(ResApiCode.NOT_FOUND);
+            }
+        }
+        int startNum = 0;
+        int startSize = 20;
+        if (pageNum != null || pageSize != null) {
+            if (pageNum < 0 || pageSize < 0) {
+                return ResApiResult.error(ResApiCode.NOT_FOUND);
+            }
+            startNum = (pageNum - 1) * pageSize;
+            startSize = pageNum * pageSize;
+        }
+        DateFormat dateFormat = new SimpleDateFormat("yyyymmddhhmmss");
+        Date parse = null;
+        if (StringUtils.isNotBlank(beginTime)) {
+            parse = dateFormat.parse(beginTime);
+        } else {
+            long time = 24 * 60 * 60 * 1000;
+            time = System.currentTimeMillis() - time;
+            parse = new Date(time);
+        }
+        DateFormat dateFormat2 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+        String format = dateFormat2.format(parse);
+        List<ResWare> resCategoryLimit3 = resWareRepository.getResCategoryLimit3(format);
+        if (Objects.isNull(resCategoryLimit3))
+            return ResApiResult.error(ResApiCode.NOT_FOUND);
+        int size = resCategoryLimit3.size();
+        List<ResWare> resCategoryLimit = null;
+        if (StringUtils.equals(order, "desc")) {
+            resCategoryLimit = resWareRepository.getResCategoryLimit(format, startNum, startSize);
+        }else {
+            resCategoryLimit = resWareRepository.getResCategoryLimit2(format, startNum, startSize);
+        }
+        ChapterUpdateVO chapterUpdateVO = new ChapterUpdateVO();
+        List<ChapterVO> list = new ArrayList<>();
+        resCategoryLimit.forEach(resWare -> {
+            ChapterVO chapterVO = getChapterVO(resWare);
+            list.add(chapterVO);
+        });
+        if (Objects.isNull(pageNum)){
+            chapterUpdateVO.setPageNum(1);
+        }else {
+            chapterUpdateVO.setPageNum(pageNum);
+        }
+        chapterUpdateVO.setPageSize(resCategoryLimit.size());
+        chapterUpdateVO.setPageTotal(size);
+        chapterUpdateVO.setChapterList(list);
+        return ResApiResult.ok(chapterUpdateVO);
+    }
+
+    private ChapterVO getChapterVO(ResWare resWare) {
+        ChapterVO chapterVO = new ChapterVO();
+        chapterVO.setChapterId(resWare.getChapterId());
+        chapterVO.setChapterName(resWare.getChapterName());
+        chapterVO.setChapterRanking(resWare.getChapterRanking());
+        chapterVO.setChapterDuration(resWare.getChapterDuration());
+        chapterVO.setChapterPicUrl(resWare.getChapterPicUrl());
+        chapterVO.setChapterRecommend(resWare.getChapterRecommend());
+        chapterVO.setPayMode(resWare.getPayMode());
+        chapterVO.setUpdateType(resWare.getRenewal());
+        chapterVO.setStatus(resWare.getIsDel());
+        Date gmtModified = resWare.getGmtModified();
+        DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+        String format1 = format.format(gmtModified);
+        chapterVO.setUpdatetime(format1);
+        chapterVO.setMediaType(resWare.getMediaType());
+        chapterVO.setDownLoadFlag(resWare.getDownLoadFlag());
+        ResAlbum resAlbum = resAlbumRepository.find(resWare.getContentId());
+        chapterVO.setContentId(resWare.getContentId());
+        chapterVO.setContentName(resAlbum.getContentName());
+        chapterVO.setContentPicUrl(resAlbum.getContentPicUrl());
+        return chapterVO;
+    }
+}

+ 111 - 0
src/main/java/cn/efunbox/audio/impl/res/ContenUpdateServiceImpl.java

@@ -0,0 +1,111 @@
+package cn.efunbox.audio.impl.res;
+
+import cn.efunbox.audio.entity.res.ResAlbum;
+import cn.efunbox.audio.page.ResOnePage;
+import cn.efunbox.audio.repository.res.ResAlbumRepository;
+import cn.efunbox.audio.service.res.ContenUpdateService;
+import cn.efunbox.audio.utils.ResApiCode;
+import cn.efunbox.audio.utils.ResApiResult;
+import cn.efunbox.audio.vo.res.ContentUpdateVO;
+import cn.efunbox.audio.vo.res.ContentVO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * ContenUpdateServiceImpl
+ * Created by wangys on
+ */
+@Service
+public class ContenUpdateServiceImpl implements ContenUpdateService {
+    @Autowired
+    private ResAlbumRepository resAlbumRepository;
+    @Override
+    public ResApiResult getContentUpdateList(String beginTime, String order, Integer pageNum, Integer pageSize) throws ParseException {
+        if (StringUtils.isNotBlank(order)) {
+            if (StringUtils.equals(order, "asc") || StringUtils.equals(order, "desc")) {
+            } else {
+                return ResApiResult.error(ResApiCode.NOT_FOUND);
+            }
+        }
+        int startNum = 0;
+        int startSize = 20;
+        if (pageNum != null || pageSize != null) {
+            if (pageNum < 0 || pageSize < 0) {
+                return ResApiResult.error(ResApiCode.NOT_FOUND);
+            }
+            startNum = (pageNum - 1) * pageSize;
+            startSize = pageNum * pageSize;
+        }
+        DateFormat dateFormat = new SimpleDateFormat("yyyymmddhhmmss");
+        Date parse = null;
+        if (StringUtils.isNotBlank(beginTime)) {
+            parse = dateFormat.parse(beginTime);
+        } else {
+            long time = 24 * 60 * 60 * 1000;
+            time = System.currentTimeMillis() - time;
+            parse = new Date(time);
+        }
+        DateFormat dateFormat2 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+        String format = dateFormat2.format(parse);
+        List<ResAlbum> resCategoryLimit3 = resAlbumRepository.getResCategoryLimit3(format);
+        if (Objects.isNull(resCategoryLimit3)) {
+            return ResApiResult.error(ResApiCode.NOT_FOUND);
+        }
+        int size = resCategoryLimit3.size();
+        List<ResAlbum> resCategoryLimit = null;
+        if (StringUtils.equals(order, "desc")) {
+            resCategoryLimit = resAlbumRepository.getResCategoryLimit(format, startNum, startSize);
+        } else {
+            resCategoryLimit = resAlbumRepository.getResCategoryLimit2(format, startNum, startSize);
+        }
+        ContentUpdateVO contentUpdateVO = new ContentUpdateVO();
+        List<ContentVO> list = new ArrayList<>();
+        resCategoryLimit.forEach(resAlbum -> {
+            ContentVO contentVO = getContentVO(resAlbum);
+            list.add(contentVO);
+        });
+        if (Objects.isNull(pageNum)){
+            contentUpdateVO.setPageNum(1);
+        }else {
+            contentUpdateVO.setPageNum(pageNum);
+        }
+        contentUpdateVO.setPageSize(resCategoryLimit.size());
+        contentUpdateVO.setPageTotal(size);
+        contentUpdateVO.setContentList(list);
+        return ResApiResult.ok(contentUpdateVO);
+    }
+    private ContentVO getContentVO(ResAlbum resAlbum) {
+        ContentVO contentVO = new ContentVO();
+        contentVO.setContentId(resAlbum.getContentId());
+        contentVO.setContentName(resAlbum.getContentName());
+        contentVO.setShortrecommend(resAlbum.getShortrecommend());
+        contentVO.setLongrecommend(resAlbum.getLongrecommend());
+        contentVO.setAuthor(resAlbum.getAuthor());
+        contentVO.setReaderName(resAlbum.getReaderName());
+        contentVO.setContentPicUrl(resAlbum.getContentPicUrl());
+        contentVO.setChapterCount(resAlbum.getChapterCount());
+        contentVO.setPayMode(resAlbum.getPayMode());
+        contentVO.setPrice(resAlbum.getPrice());
+        contentVO.setPlaycount(resAlbum.getPlaycount());
+        contentVO.setUpdateType(resAlbum.getRenewal());
+        contentVO.setStatus(resAlbum.getIsDel());
+        Date getModified = resAlbum.getGmtModified();
+        DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+        String format1 = format.format(getModified);
+        contentVO.setUpdatetime(format1);
+        contentVO.setMediaType(resAlbum.getMediaType());
+        Date gmtCreated = resAlbum.getGmtCreated();
+        String format2 = format.format(gmtCreated);
+        contentVO.setPublishTime(format2);
+        return contentVO;
+    }
+}

+ 64 - 0
src/main/java/cn/efunbox/audio/impl/res/GetTypeServiceImpl.java

@@ -0,0 +1,64 @@
+package cn.efunbox.audio.impl.res;
+
+import cn.efunbox.audio.entity.res.ResCategory;
+import cn.efunbox.audio.repository.res.ResCategoryRepository;
+import cn.efunbox.audio.service.res.GetTypeService;
+import cn.efunbox.audio.utils.ResApiResult;
+import cn.efunbox.audio.vo.res.TypeUpdateListVO;
+import cn.efunbox.audio.vo.res.TypeUpdateVO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * GetTypeServiceImpl
+ * Created by wangys on
+ */
+@Service
+public class GetTypeServiceImpl implements GetTypeService {
+    @Autowired
+    private ResCategoryRepository resCategoryRepository;
+    @Override
+    public ResApiResult getTypeUpdateList(String beginTime, String order) throws ParseException {
+        DateFormat dateFormat = new SimpleDateFormat("yyyymmddhhmmss");
+        Date parse = null;
+        if (StringUtils.isNotBlank(beginTime)){
+            parse = dateFormat.parse(beginTime);
+        }else {
+            long time = 24*60*60*1000;
+            time = System.currentTimeMillis() - time;
+            parse = new Date(time);
+        }
+        List<ResCategory> resCategories = null;
+        if (StringUtils.equals("desc",order)){
+            resCategories = resCategoryRepository.getByGmtModifiedAfterOrderByGmtCreatedDesc(parse);
+        }else {
+            resCategories = resCategoryRepository.getByGmtModifiedAfterOrderByGmtCreated(parse);
+        }
+        List<TypeUpdateVO> updateVOList = getResAlbums(resCategories);
+        TypeUpdateListVO typeUpdateListVO = new TypeUpdateListVO();
+        typeUpdateListVO.setTypeList(updateVOList);
+        return ResApiResult.ok(typeUpdateListVO);
+    }
+    private List<TypeUpdateVO> getResAlbums(List<ResCategory> resCategories) {
+        List<TypeUpdateVO> updateVOList = new ArrayList<>();
+        resCategories.forEach( resCategorie -> {
+            TypeUpdateVO typeUpdateVO = new TypeUpdateVO();
+            typeUpdateVO.setTypeId(resCategorie.getTypeId());
+            typeUpdateVO.setTypeName(resCategorie.getTypeName());
+            typeUpdateVO.setParentId(resCategorie.getParentId());
+            typeUpdateVO.setTypeUpdatetime(resCategorie.getGmtCreated()+"");
+            typeUpdateVO.setUpdateType(resCategorie.getRenewal());
+            typeUpdateVO.setStatus(resCategorie.getIsDel());
+            updateVOList.add(typeUpdateVO);
+        });
+        return updateVOList;
+    }
+}

+ 20 - 0
src/main/java/cn/efunbox/audio/repository/res/ResAlbumRepository.java

@@ -1,8 +1,28 @@
 package cn.efunbox.audio.repository.res;
 
 import cn.efunbox.audio.entity.res.ResAlbum;
+import cn.efunbox.audio.entity.res.ResCategory;
 import cn.efunbox.audio.repository.base.BasicRepository;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
+
+import java.util.Date;
+import java.util.List;
 
 public interface ResAlbumRepository extends BasicRepository<ResAlbum> {
 
+    List<ResAlbum> getByGmtCreatedAfterOrderByGmtCreated(@Param(value = "gmt_created") Date gmtCreated);
+
+
+    List<ResAlbum> getByGmtCreatedAfterOrderByGmtCreatedDesc(@Param(value = "gmt_created") Date gmtCreated);
+
+
+    @Query(value = "select * from res_album where gmt_modified > ?1 order by gmt_modified desc limit ?2,?3",nativeQuery = true)
+    List<ResAlbum> getResCategoryLimit(@Param(value = "gmt_created") String gmtModified, @Param(value = "i") Integer i, @Param("n") Integer n);
+
+    @Query(value = "select * from res_album where gmt_modified > ?1 order by gmt_modified asc limit ?2,?3",nativeQuery = true)
+    List<ResAlbum> getResCategoryLimit2(@Param(value = "gmt_created") String gmtModified,@Param(value = "i") Integer i,@Param("n") Integer n);
+
+    @Query(value = "select * from res_album where gmt_modified > ?1",nativeQuery = true)
+    List<ResAlbum> getResCategoryLimit3(@Param(value = "gmt_modified") String gmtModified);
 }

+ 14 - 0
src/main/java/cn/efunbox/audio/repository/res/ResCategoryRepository.java

@@ -5,10 +5,24 @@ import cn.efunbox.audio.repository.base.BasicRepository;
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.repository.query.Param;
 
+import java.util.Date;
 import java.util.List;
 
 public interface ResCategoryRepository extends BasicRepository<ResCategory> {
 
     @Query(value = "select * from res_category where is_del = 0",nativeQuery = true)
     public List<ResCategory> getResCategoryList();
+
+    List<ResCategory> getByGmtModifiedAfterOrderByGmtCreated(@Param(value = "gmt_created") Date gmtCreated);
+
+    List<ResCategory> getByGmtModifiedAfterOrderByGmtCreatedDesc(@Param(value = "gmt_created") Date gmtCreated);
+
+    @Query(value = "select * from res_category where gmt_created > ?1 order by gmt_created desc limit ?2,?3",nativeQuery = true)
+    List<ResCategory> getResCategoryLimit(@Param(value = "gmt_created") String gmtCreated,@Param(value = "i") Integer i,@Param("n") Integer n);
+
+    @Query(value = "select * from res_category where gmt_created > ?1 order by gmt_created asc limit ?2,?3",nativeQuery = true)
+    List<ResCategory> getResCategoryLimit2(@Param(value = "gmt_created") String gmtCreated,@Param(value = "i") Integer i,@Param("n") Integer n);
+
+    @Query(value = "select * from res_category where gmt_created > ?1",nativeQuery = true)
+    List<ResCategory> getResCategoryLimit3(@Param(value = "gmt_created") String gmtCreated);
 }

+ 14 - 0
src/main/java/cn/efunbox/audio/repository/res/ResWareRepository.java

@@ -1,7 +1,21 @@
 package cn.efunbox.audio.repository.res;
 
+import cn.efunbox.audio.entity.res.ResAlbum;
 import cn.efunbox.audio.entity.res.ResWare;
 import cn.efunbox.audio.repository.base.BasicRepository;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
+
+import java.util.List;
 
 public interface ResWareRepository extends BasicRepository<ResWare> {
+    @Query(value = "select * from res_ware where gmt_modified > ?1 order by gmt_modified desc limit ?2,?3",nativeQuery = true)
+    List<ResWare> getResCategoryLimit(@Param(value = "gmt_modified") String gmtModified, @Param(value = "i") Integer i, @Param("n") Integer n);
+
+    @Query(value = "select * from res_ware where gmt_modified > ?1 order by gmt_modified asc limit ?2,?3",nativeQuery = true)
+    List<ResWare> getResCategoryLimit2(@Param(value = "gmt_modified") String gmtModified,@Param(value = "i") Integer i,@Param("n") Integer n);
+
+    @Query(value = "select * from res_ware where gmt_modified > ?1",nativeQuery = true)
+    List<ResWare> getResCategoryLimit3(@Param(value = "gmt_modified") String gmtModified);
 }
+

+ 9 - 0
src/main/java/cn/efunbox/audio/service/res/ChapterUpdateListService.java

@@ -0,0 +1,9 @@
+package cn.efunbox.audio.service.res;
+
+import cn.efunbox.audio.utils.ResApiResult;
+
+import java.text.ParseException;
+
+public interface ChapterUpdateListService {
+    ResApiResult getChapterUpdateList(String beginTime, String order, Integer pageNum, Integer pageSize) throws ParseException;
+}

+ 11 - 0
src/main/java/cn/efunbox/audio/service/res/ContenUpdateService.java

@@ -0,0 +1,11 @@
+package cn.efunbox.audio.service.res;
+
+import cn.efunbox.audio.page.ResOnePage;
+import cn.efunbox.audio.utils.ResApiResult;
+import cn.efunbox.audio.vo.res.ContentUpdateVO;
+
+import java.text.ParseException;
+
+public interface ContenUpdateService {
+    ResApiResult getContentUpdateList(String beginTime, String order, Integer pageNum, Integer pageSize) throws ParseException;
+}

+ 13 - 0
src/main/java/cn/efunbox/audio/service/res/GetTypeService.java

@@ -0,0 +1,13 @@
+package cn.efunbox.audio.service.res;
+
+import cn.efunbox.audio.utils.ResApiResult;
+
+import java.text.ParseException;
+
+/**
+ * GetTypeService
+ * Created by wangys on
+ */
+public interface GetTypeService {
+    ResApiResult getTypeUpdateList(String beginTime, String order) throws ParseException;
+}

+ 17 - 0
src/main/java/cn/efunbox/audio/vo/res/ChapterUpdateVO.java

@@ -0,0 +1,17 @@
+package cn.efunbox.audio.vo.res;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * ChapterUpdateVO
+ * Created by wangys on
+ */
+@Data
+public class ChapterUpdateVO {
+    private Integer pageTotal;
+    private Integer pageNum;
+    private Integer pageSize;
+    private List<ChapterVO> chapterList;
+}

+ 26 - 0
src/main/java/cn/efunbox/audio/vo/res/ChapterVO.java

@@ -0,0 +1,26 @@
+package cn.efunbox.audio.vo.res;
+
+import lombok.Data;
+
+/**
+ * ChapterVO
+ * Created by wangys on
+ */
+@Data
+public class ChapterVO {
+    private String chapterId;
+    private String chapterName;
+    private String chapterRanking;
+    private String chapterDuration;
+    private String downLoadFlag;
+    private String chapterPicUrl;
+    private String chapterRecommend;
+    private String payMode;
+    private String contentId;
+    private String contentName;
+    private String contentPicUrl;
+    private String updateType;
+    private String status;
+    private String updatetime;
+    private String mediaType;
+}

+ 17 - 0
src/main/java/cn/efunbox/audio/vo/res/ContentUpdateVO.java

@@ -0,0 +1,17 @@
+package cn.efunbox.audio.vo.res;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * ContentUpdateVO
+ * Created by wangys on
+ */
+@Data
+public class ContentUpdateVO {
+    private Integer pageTotal;
+    private Integer pageNum;
+    private Integer pageSize;
+    private List<ContentVO> contentList;
+}

+ 27 - 0
src/main/java/cn/efunbox/audio/vo/res/ContentVO.java

@@ -0,0 +1,27 @@
+package cn.efunbox.audio.vo.res;
+
+import lombok.Data;
+
+/**
+ * ContentVO
+ * Created by wangys on
+ */
+@Data
+public class ContentVO {
+    private String contentId;
+    private String contentName;
+    private String shortrecommend;
+    private String longrecommend;
+    private String author;
+    private String readerName;
+    private String contentPicUrl;
+    private String chapterCount;
+    private String payMode;
+    private String price;
+    private String playcount;
+    private String updateType;
+    private String status;
+    private String updatetime;
+    private String mediaType;
+    private String publishTime;
+}

+ 14 - 0
src/main/java/cn/efunbox/audio/vo/res/TypeUpdateListVO.java

@@ -0,0 +1,14 @@
+package cn.efunbox.audio.vo.res;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * TypeUpdateListVO
+ * Created by wangys on
+ */
+@Data
+public class TypeUpdateListVO {
+    private List<TypeUpdateVO> typeList;
+}

+ 19 - 0
src/main/java/cn/efunbox/audio/vo/res/TypeUpdateVO.java

@@ -0,0 +1,19 @@
+package cn.efunbox.audio.vo.res;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * TypeUpdateVO
+ * Created by wangys on
+ */
+@Data
+public class TypeUpdateVO {
+    private String typeId;
+    private String typeName;
+    private String parentId;
+    private String typeUpdatetime;
+    private String updateType;
+    private String status;
+}