菜品排序

This commit is contained in:
zjf committed 2025-01-19 17:07:04 +08:00
1 parent 6089c0251e
commit d9e6881339
3 files changed
+3

No files matched your search

@@ -57,6 +57,7 @@ public class CanteenSpuController {
LambdaQueryWrapper<CanteenSpuEntity> wrapper = Wrappers.lambdaQuery();
wrapper.like(StrUtil.isNotBlank(canteenSpu.getName()), CanteenSpuEntity::getName, canteenSpu.getName());
wrapper.eq(Objects.nonNull(canteenSpu.getCategoryId()), CanteenSpuEntity::getCategoryId, canteenSpu.getCategoryId());
wrapper.orderByAsc(CanteenSpuEntity::getSort);
return R.ok(canteenSpuService.pageScope(page, wrapper));
}
@@ -122,6 +122,7 @@ public class CanteenSpuServiceImpl extends ServiceImpl<CanteenSpuMapper, Canteen
List<Long> caIds = canteenCategoryEntities.stream().map(CanteenCategoryEntity::getId).collect(Collectors.toList());
wrapper.in(!CollectionUtils.isEmpty(caIds), CanteenSpuEntity::getCategoryId, caIds);
wrapper.orderByAsc(CanteenSpuEntity::getSort);
return baseMapper.selectPageByScope(page, wrapper, DataScope.of());
}
@@ -50,6 +50,7 @@
AND t.start_time = #{time}
And t.del_flag = 0
</where>
order by sp.sort asc
</select>
<select id="getCanteenMenuList" resultMap="adCanteenDailyMenuListVO">
SELECT