|
@@ -309,8 +309,9 @@ public class BookServiceImpl implements BookService {
|
|
if (bookContentVO.getContentId() > freeChapterNum) { //收费
|
|
if (bookContentVO.getContentId() > freeChapterNum) { //收费
|
|
//是否已购买
|
|
//是否已购买
|
|
Consume consume = consumeMapper.selectOneByExample(ConsumeExample.newAndCreateCriteria()
|
|
Consume consume = consumeMapper.selectOneByExample(ConsumeExample.newAndCreateCriteria()
|
|
- .andBookIdEqualTo(bookContentVO.getBookId())
|
|
|
|
.andUserIdEqualTo(bookContentVO.getUserId())
|
|
.andUserIdEqualTo(bookContentVO.getUserId())
|
|
|
|
+ .andBookIdEqualTo(bookContentVO.getBookId())
|
|
|
|
+ .andChapterIdEqualTo(bookContentVO.getContentId())
|
|
.example()
|
|
.example()
|
|
);
|
|
);
|
|
if (consume == null) { // 没有购买记录
|
|
if (consume == null) { // 没有购买记录
|
|
@@ -387,7 +388,7 @@ public class BookServiceImpl implements BookService {
|
|
int i = userRecentlyReadMapper.insert(UserRecentlyRead.builder()
|
|
int i = userRecentlyReadMapper.insert(UserRecentlyRead.builder()
|
|
.userId(bookContentVO.getUserId())
|
|
.userId(bookContentVO.getUserId())
|
|
.bookId(book.getId())
|
|
.bookId(book.getId())
|
|
- .chapterId(Long.valueOf(bookContentVO.getContentId()))
|
|
|
|
|
|
+ .chapterId(bookContentVO.getContentId())
|
|
.chapterName(bookContentVO.getContentName())
|
|
.chapterName(bookContentVO.getContentName())
|
|
.createtime(DateUtils.getNow())
|
|
.createtime(DateUtils.getNow())
|
|
.updatetime(DateUtils.getNow())
|
|
.updatetime(DateUtils.getNow())
|
|
@@ -396,7 +397,7 @@ public class BookServiceImpl implements BookService {
|
|
.build());
|
|
.build());
|
|
//checkUpdate(i);
|
|
//checkUpdate(i);
|
|
} else {
|
|
} else {
|
|
- userRecentlyRead.setChapterId(Long.valueOf(bookContentVO.getContentId()));
|
|
|
|
|
|
+ userRecentlyRead.setChapterId(bookContentVO.getContentId());
|
|
userRecentlyRead.setChapterName(bookContentVO.getContentName());
|
|
userRecentlyRead.setChapterName(bookContentVO.getContentName());
|
|
userRecentlyRead.setUpdatetime(DateUtils.getNow());
|
|
userRecentlyRead.setUpdatetime(DateUtils.getNow());
|
|
int i = userRecentlyReadMapper.updateByPrimaryKeySelective(userRecentlyRead,
|
|
int i = userRecentlyReadMapper.updateByPrimaryKeySelective(userRecentlyRead,
|
|
@@ -432,7 +433,7 @@ public class BookServiceImpl implements BookService {
|
|
.type("1") // 订购章节
|
|
.type("1") // 订购章节
|
|
.bookId(book.getId())
|
|
.bookId(book.getId())
|
|
.bookName(book.getName())
|
|
.bookName(book.getName())
|
|
- .chapterId(Long.valueOf(bookContentVO.getContentId()))
|
|
|
|
|
|
+ .chapterId(bookContentVO.getContentId())
|
|
.chapterName(bookContentVO.getContentName())
|
|
.chapterName(bookContentVO.getContentName())
|
|
.ddKandian(kandian)
|
|
.ddKandian(kandian)
|
|
.ddFreeKandian(freeKandian)
|
|
.ddFreeKandian(freeKandian)
|
|
@@ -486,7 +487,7 @@ public class BookServiceImpl implements BookService {
|
|
*/
|
|
*/
|
|
private BookContent getBookContentFromRemote(BookContentVO bookContentVO) {
|
|
private BookContent getBookContentFromRemote(BookContentVO bookContentVO) {
|
|
Long bookId = bookContentVO.getBookId();
|
|
Long bookId = bookContentVO.getBookId();
|
|
- Integer contentId = bookContentVO.getContentId();
|
|
|
|
|
|
+ Long contentId = bookContentVO.getContentId();
|
|
String contentUrl = "http://new.emeixs.com/index.php/Home/Interface/content/bid/%s/cid/%s";
|
|
String contentUrl = "http://new.emeixs.com/index.php/Home/Interface/content/bid/%s/cid/%s";
|
|
if (bookId == null || contentId == null) {
|
|
if (bookId == null || contentId == null) {
|
|
return null;
|
|
return null;
|