bing.li 5 gadi atpakaļ
vecāks
revīzija
bedfe5fab8
21 mainītis faili ar 600 papildinājumiem un 1 dzēšanām
  1. 7 0
      pom.xml
  2. 1 1
      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>

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

@@ -51,7 +51,7 @@ public class Config extends WebMvcConfigurerAdapter{
         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");
+                .excludePathPatterns("/getTypeList","/getTypeContentList","/getContentDetail","/getContentChapterList","/getChapterDetail","/test/**","/getTypeUpdateList/**","/getContentUpdateList/**","/getChapterUpdateList/**");
 
         registry.addInterceptor(ignoreOptionsInterceptor())
                 .addPathPatterns("/**");

+ 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;
+}