--新增书评接口,端口修改
This commit is contained in:
@@ -10,4 +10,7 @@ public interface BookForumArticlesService extends IService<BookForumArticlesEn
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
PageUtils queryPages(Map<String, Object> params);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,4 +8,6 @@ import java.util.Map;
|
||||
|
||||
public interface BookForumCommenService extends IService<BookForumCommentEntity> {
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
PageUtils importlistqueryPages(Map<String, Object> params);
|
||||
}
|
||||
|
||||
@@ -27,5 +27,7 @@ public interface ShopProductService extends IService<ShopProductEntity> {
|
||||
PageUtils getNewBook(Map<String, Object> params);
|
||||
|
||||
PageUtils selectListqueryPage(Map<String, Object> params);
|
||||
|
||||
PageUtils queryPageproductSales(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,19 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.peanut.common.utils.PageUtils;
|
||||
import com.peanut.common.utils.Query;
|
||||
import com.peanut.modules.book.dao.BookForumArticlesDao;
|
||||
import com.peanut.modules.book.entity.AuthorEntity;
|
||||
import com.peanut.modules.book.entity.BookEntity;
|
||||
import com.peanut.modules.book.entity.BookForumArticlesEntity;
|
||||
import com.peanut.modules.book.entity.PublisherEntity;
|
||||
import com.peanut.modules.book.service.AuthorService;
|
||||
import com.peanut.modules.book.service.BookForumArticlesService;
|
||||
import com.peanut.modules.book.service.BookService;
|
||||
import com.peanut.modules.book.service.PublisherService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
@@ -26,17 +35,27 @@ public class BookForumArticlesServiceImpl extends ServiceImpl<BookForumArticlesD
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPages(Map<String, Object> params) {
|
||||
String bookid = (String) params.get("bookid");
|
||||
|
||||
IPage<BookForumArticlesEntity> page = this.page(
|
||||
new Query<BookForumArticlesEntity>().getPage(params),
|
||||
new QueryWrapper<BookForumArticlesEntity>().eq("bookid",bookid)
|
||||
|
||||
|
||||
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -28,4 +28,15 @@ public class BookForumCommenServiceImpl extends ServiceImpl<BookForumCommentDao,
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils importlistqueryPages(Map<String, Object> params) {
|
||||
Object b = params.get("bfid");
|
||||
IPage<BookForumCommentEntity> page = this.page(
|
||||
new Query<BookForumCommentEntity>().getPage(params),
|
||||
new QueryWrapper<BookForumCommentEntity>().eq("bfa_id",b).orderByDesc("create_time")
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,7 @@ import com.google.common.base.Joiner;
|
||||
import com.peanut.common.utils.*;
|
||||
import com.peanut.modules.book.entity.*;
|
||||
import com.peanut.modules.book.entity.SysDictDataEntity;
|
||||
import com.peanut.modules.book.service.BookChapterContentService;
|
||||
import com.peanut.modules.book.service.BookChapterService;
|
||||
import com.peanut.modules.book.service.PublisherService;
|
||||
import com.peanut.modules.book.service.*;
|
||||
import com.peanut.modules.book.vo.BookIndexVo;
|
||||
import com.peanut.modules.sys.service.SysDictDataService;
|
||||
import com.spire.doc.Document;
|
||||
@@ -35,7 +33,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import com.peanut.modules.book.dao.BookDao;
|
||||
import com.peanut.modules.book.service.BookService;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
|
||||
@@ -52,6 +49,8 @@ public class BookServiceImpl extends ServiceImpl<BookDao, BookEntity> implements
|
||||
private BookChapterService bookChapterService;
|
||||
@Autowired
|
||||
ConstantPropertiesUtils constantPropertiesUtils;
|
||||
@Autowired
|
||||
private BookForumArticlesService bookForumArticlesService;
|
||||
|
||||
|
||||
|
||||
@@ -108,6 +107,8 @@ public class BookServiceImpl extends ServiceImpl<BookDao, BookEntity> implements
|
||||
|
||||
|
||||
String[] split = type.split(",");
|
||||
|
||||
|
||||
for (String tp : split) {
|
||||
SysDictDataEntity dict = sysDictDataService.getBaseMapper().selectOne(new QueryWrapper<SysDictDataEntity>()
|
||||
.eq("dict_type", tp).eq("dict_label", "book_type"));
|
||||
@@ -659,7 +660,9 @@ public class BookServiceImpl extends ServiceImpl<BookDao, BookEntity> implements
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -65,5 +65,15 @@ public class ShopProductServiceImpl extends ServiceImpl<ShopProductDao, ShopProd
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPageproductSales(Map<String, Object> params) {
|
||||
|
||||
IPage<ShopProductEntity> page = this.page(
|
||||
new Query<ShopProductEntity>().getPage(params),
|
||||
new QueryWrapper<ShopProductEntity>().orderByDesc("sum_sales")
|
||||
);
|
||||
System.out.println("page"+page);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user