songshuai 5 years ago
parent
commit
993044ed35

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

@@ -69,4 +69,9 @@ public class ResWare {
 
     @Column(name = "gmt_modified")
     private Date gmtModified;
+
+    public boolean getDownLoadFlag(){
+        return "0".equals(this.getDbDownLoadFlag())?true:false;
+    }
+
 }

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

@@ -102,7 +102,7 @@ public class ChapterUpdateListServiceImpl implements ChapterUpdateListService {
         String format1 = format.format(gmtModified);
         chapterVO.setUpdatetime(format1);
         chapterVO.setMediaType(resWare.getMediaType());
-        chapterVO.setDownLoadFlag("0".equals(resWare.getDbDownLoadFlag())?true:false);
+        chapterVO.setDownLoadFlag(resWare.getDownLoadFlag());
         ResAlbum resAlbum = resAlbumRepository.find(resWare.getContentId());
         chapterVO.setContentId(resWare.getContentId());
         chapterVO.setContentName(resAlbum.getContentName());

+ 0 - 3
src/main/java/cn/efunbox/audio/impl/res/ResWareServiceImpl.java

@@ -74,9 +74,6 @@ public class ResWareServiceImpl implements ResWareService {
         if(wareList == null || wareList.size() == 0){
             return ResApiResult.error(ResApiCode.NOT_FOUND);
         }
-        wareList.stream().forEach(obj->{
-            obj.setDownLoadFlag("0".equals(obj.getDbDownLoadFlag())?true:false);
-        });
 
         onePage.setChapterList(wareList);