This commit is contained in:
wangjinlei
2023-11-20 16:18:07 +08:00
parent d9d6ee68da
commit 5402c28b31
4 changed files with 17 additions and 10 deletions

View File

@@ -70,7 +70,7 @@ public class BookForumArticlesServiceController {
wrapper.leftJoin(AuthorEntity.class,AuthorEntity::getId,BookEntity::getAuthorId);
wrapper.eq(BookForumArticlesEntity::getDelflag,0);
wrapper.eq(BookEntity::getDelFlag,0);
wrapper.eq(BookEntity::getState,0);
wrapper.eq(BookEntity::getState,1);
Page<BookForumArticlesEntity> bookForumArticlesEntityPage = bookForumArticlesDao.selectJoinPage(new Page<>(page, limit), BookForumArticlesEntity.class, wrapper);
for (BookForumArticlesEntity b : bookForumArticlesEntityPage.getRecords()){
@@ -102,7 +102,7 @@ public class BookForumArticlesServiceController {
wrapper.leftJoin(AuthorEntity.class,AuthorEntity::getId,BookEntity::getAuthorId);
wrapper.eq(BookForumArticlesEntity::getDelflag,0);
wrapper.eq(BookEntity::getDelFlag,0);
wrapper.eq(BookEntity::getState,0);
wrapper.eq(BookEntity::getState,1);
wrapper.orderByDesc(BookForumArticlesEntity::getContlike);
Page<BookForumArticlesEntity> bookForumArticlesEntityPage = bookForumArticlesDao.selectJoinPage(new Page<>(page, limit), BookForumArticlesEntity.class, wrapper);

View File

@@ -384,6 +384,13 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
public Page<BuyOrder> getUserOrderList(UserOrderDto userOrderDto) {
LambdaQueryWrapper<BuyOrder> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(BuyOrder::getUserId,userOrderDto.getUserId());
wrapper.eq(BuyOrder::getOrderType,"order");
if(userOrderDto.getOrderStatus()==null){
Integer[] sts = {0,1,2,3};
wrapper.in(BuyOrder::getOrderStatus,sts);
}else{
wrapper.eq(BuyOrder::getOrderStatus,userOrderDto.getOrderStatus());
}
wrapper.eq(userOrderDto.getOrderStatus()!=null,BuyOrder::getOrderStatus,userOrderDto.getOrderStatus());
wrapper.orderByDesc(BuyOrder::getCreateTime);
Page<BuyOrder> buyOrderPage = this.getBaseMapper().selectPage(new Page<>(userOrderDto.getPage(), userOrderDto.getLimit()), wrapper);