添加菜品套餐模块相关接口描述的功能和注释

lh_branch
Artyom 8 months ago
parent 8e7951b321
commit dc80acc219

@ -1,4 +1,88 @@
package com.sky.mapper;
import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Dish;
import com.sky.enumeration.OperationType;
import com.sky.vo.DishVO;
import org.apache.ibatis.annotations.*;
import java.util.List;
import java.util.Map;
@Mapper
public interface DishMapper {
/**
* id
* @param categoryId ID
* @return
*/
@Select("select count(id) from dish where category_id = #{categoryId}")
Integer countByCategoryId(Long categoryId);
/**
* 使
* @param dish
*/
@AutoFill(value = OperationType.INSERT)
void insert(Dish dish);
/**
*
* @param dishPageQueryDTO DTO
* @return
*/
Page<DishVO> pageQuery(DishPageQueryDTO dishPageQueryDTO);
/**
* ID
* @param id ID
* @return
*/
@Select("select * from dish where id = #{id}")
Dish getById(Long id);
/**
* ID
* @param id ID
*/
@Delete("delete from dish where id = #{id}")
void deleteById(Long id);
/**
* ID
* @param ids ID
*/
void deleteByIds(List<Long> ids);
/**
* ID使
* @param dish
*/
@AutoFill(value = OperationType.UPDATE)
void update(Dish dish);
/**
* ID
* @param dish ID
* @return
*/
List<Dish> getByCategoryId(Dish dish);
/**
*
* @param status 01
* @param id ID
*/
@Update("update dish set status = #{status} where id = #{id}")
void startOrStop(Integer status, Integer id);
/**
*
* @param map Map
* @return
*/
Integer countByMap(Map map);
}

@ -0,0 +1,51 @@
package com.sky.mapper;
import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface SetmealDishMapper {
/*
* idid
* IDID
* @param dishIds ID
* @return ID
*/
List<Long> getSetmealIdsByDishIds(List<Long> dishIds);
/*
*
* -
* @param setmealDishes -
*/
void insertBatch(List<SetmealDish> setmealDishes);
/*
* id
* ID
* @param setmealId ID
* @return
*/
@Select("select * from setmeal_dish where setmeal_id = #{setmealId}")
List<SetmealDish> getBySetmealId(Long setmealId);
/*
* id-
* ID-
* @param setmealIds ID
*/
void deleteBySetmealIds(List<Long> setmealIds);
/*
* id-
* ID-
* @param setmealId ID
*/
@Delete("delete from setmeal_dish where setmeal_id = #{setmealId}")
void deleteBySetmealId(Long setmealId);
}
Loading…
Cancel
Save