DishMapper.java 378 B

1234567891011121314151617
  1. package com.sky.mapper;
  2. import org.apache.ibatis.annotations.Mapper;
  3. import org.apache.ibatis.annotations.Select;
  4. @Mapper
  5. public interface DishMapper {
  6. /**
  7. * 根据分类id查询菜品数量
  8. * @param categoryId
  9. * @return
  10. */
  11. @Select("select count(id) from dish where category_id = #{categoryId}")
  12. Integer countByCategoryId(Long categoryId);
  13. }