优化
This commit is contained in:
@ -80,8 +80,9 @@ public class AppDevuceController {
|
||||
@GetMapping("/dishes/list")
|
||||
@Operation(summary = "获得菜品列表")
|
||||
public CommonResult<List<DishesRespVO>> getDishesList(@RequestParam("carteenId") Long carteenId,
|
||||
@RequestParam("dishecType")Long dishecType) {
|
||||
List<DishesDO> dishesList = devuceService.getDishesList(carteenId,dishecType);
|
||||
@RequestParam("dishecType")Long dishecType,
|
||||
@RequestParam("dishesName")String dishesName) {
|
||||
List<DishesDO> dishesList = devuceService.getDishesList(carteenId,dishecType,dishesName);
|
||||
return success(BeanUtils.toBean(dishesList, DishesRespVO.class));
|
||||
}
|
||||
@GetMapping("/list")
|
||||
|
@ -65,7 +65,7 @@ public interface DevuceService {
|
||||
*/
|
||||
DishesDO getDevuceList();
|
||||
|
||||
List<DishesDO> getDishesList(Long carteenId,Long dishecType);
|
||||
List<DishesDO> getDishesList(Long carteenId,Long dishecType,String dishesName);
|
||||
/**
|
||||
* @Description: 获取菜品分类
|
||||
* @Author: qjq
|
||||
|
@ -160,7 +160,7 @@ public class DevuceServiceImpl implements DevuceService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DishesDO> getDishesList(Long carteenId,Long dishecType) {
|
||||
public List<DishesDO> getDishesList(Long carteenId,Long dishecType,String dishesName) {
|
||||
//获取已绑定的菜品id
|
||||
// List<Long> collect = devuceMapper.selectList(new LambdaQueryWrapperX<DevuceDO>()
|
||||
// .eq(DevuceDO::getBind, DevuceDO.BIND))
|
||||
@ -182,7 +182,8 @@ public class DevuceServiceImpl implements DevuceService {
|
||||
return dishesMapper.selectList(new LambdaQueryWrapperX<DishesDO>()
|
||||
.eq(DishesDO::getCarteenId,carteenId)
|
||||
.gt(DishesDO::getId,94)
|
||||
.eq(DishesDO::getDishecType,dishecType).orderByDesc(DishesDO::getId));
|
||||
.eq(DishesDO::getDishecType,dishecType).orderByDesc(DishesDO::getId)
|
||||
.like(StrUtil.isNotBlank(dishesName),DishesDO::getDishesName,dishesName));
|
||||
// }
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user