bug
This commit is contained in:
@@ -786,7 +786,7 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
||||
List<BookEntity> bookByProductId = shopProductBookService.getBookByProductId(buyOrderProduct.getProductId());
|
||||
goodsResponseVo.setBooks(bookByProductId);
|
||||
|
||||
//设置商品对应的课程目录
|
||||
//设置商品对应的课程
|
||||
List<Integer> collect = shopProductCourseDao.selectList(new LambdaQueryWrapper<ShopProductCourseEntity>().eq(ShopProductCourseEntity::getProductId, buyOrderProduct.getProductId())).stream().map(ShopProductCourseEntity::getCatalogueId).collect(Collectors.toList());
|
||||
if(collect.size()>0){
|
||||
MPJLambdaWrapper<CourseCatalogueEntity> courseCatalogueEntityMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
||||
|
||||
@@ -11,6 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -25,27 +27,14 @@ public class MessageController {
|
||||
private MessageService messageService;
|
||||
|
||||
@RequestMapping("/listByPage")
|
||||
public R listByPage(@RequestBody Map<String, Object> params) {
|
||||
public R listByPage(@RequestBody Message message) {
|
||||
LambdaQueryWrapper<Message> wrapper = new LambdaQueryWrapper();
|
||||
if (params.containsKey("title")&& StringUtils.isNotEmpty(params.get("title").toString())) {
|
||||
wrapper.like(Message::getTitle,params.get("title"));
|
||||
}
|
||||
if (params.containsKey("type")&& StringUtils.isNotEmpty(params.get("type").toString())) {
|
||||
wrapper.eq(Message::getType,params.get("type"));
|
||||
}
|
||||
if (params.containsKey("isBook")&& StringUtils.isNotEmpty(params.get("isBook").toString())) {
|
||||
wrapper.eq(Message::getIsBook,params.get("isBook"));
|
||||
}
|
||||
if (params.containsKey("isMedical")&& StringUtils.isNotEmpty(params.get("isMedical").toString())) {
|
||||
wrapper.eq(Message::getIsBook,params.get("isMedical"));
|
||||
}
|
||||
if (params.containsKey("isSociology")&& StringUtils.isNotEmpty(params.get("isSociology").toString())) {
|
||||
wrapper.eq(Message::getIsBook,params.get("isSociology"));
|
||||
}
|
||||
wrapper.eq(message.getIsBook()==1,Message::getIsBook,1);
|
||||
wrapper.eq(message.getIsMedical()==1,Message::getIsMedical,1);
|
||||
wrapper.eq(message.getIsSociology()==1,Message::getIsSociology,1);
|
||||
wrapper.orderByDesc(Message::getCreateTime);
|
||||
Page<Message> page = messageService.page(new Page<>(
|
||||
Long.parseLong(params.get("current").toString()), Long.parseLong(params.get("limit").toString())), wrapper);
|
||||
return R.ok().put("result", page);
|
||||
List<Message> messages = messageService.getBaseMapper().selectList(wrapper);
|
||||
return R.ok().put("messages", messages);
|
||||
}
|
||||
|
||||
@RequestMapping("/getMessageById")
|
||||
|
||||
Reference in New Issue
Block a user