@Service public class DishServiceImpl extends com.baomidou.mybatisplus.extension.service.impl.ServiceImpl<DishMapper,Dish> implements DishService
| Constructor and Description |
|---|
DishServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
com.baomidou.mybatisplus.extension.plugins.pagination.Page<DishDto> |
getAll(com.baomidou.mybatisplus.extension.plugins.pagination.Page<Dish> pageInfo,
Integer page,
Integer pageSize,
String name)
分页查询菜品信息和菜品分类(操纵两张表)
|
DishDto |
getDishAndFlavors(Long id)
通过id回显菜品信息和口味(操纵两张表)
|
Boolean |
saveWithFlavor(DishDto dishDto)
新增菜品同时保存口味(操纵两张表)
|
Boolean |
updateDishAndFlavors(DishDto dishDto)
更新菜品和口味(操纵两张表)
每次更新先删除所有口味,重新插入
|
closeSqlSession, currentMapperClass, currentModelClass, executeBatch, executeBatch, executeBatch, getBaseMapper, getEntityClass, getMap, getObj, getOne, getSqlStatement, retBool, saveBatch, saveOrUpdate, saveOrUpdateBatch, sqlSessionBatch, sqlStatement, updateBatchByIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcount, count, getBaseMapper, getById, getEntityClass, getMap, getObj, getOne, getOne, ktQuery, ktUpdate, lambdaQuery, lambdaUpdate, list, list, listByIds, listByMap, listMaps, listMaps, listObjs, listObjs, listObjs, listObjs, page, page, pageMaps, pageMaps, query, remove, removeById, removeByIds, removeByMap, save, saveBatch, saveBatch, saveOrUpdate, saveOrUpdate, saveOrUpdateBatch, saveOrUpdateBatch, update, update, update, updateBatchById, updateBatchById, updateById@Transactional public Boolean saveWithFlavor(DishDto dishDto)
saveWithFlavor in interface DishServicedishDto - public DishDto getDishAndFlavors(Long id)
getDishAndFlavors in interface DishServiceid - public com.baomidou.mybatisplus.extension.plugins.pagination.Page<DishDto> getAll(com.baomidou.mybatisplus.extension.plugins.pagination.Page<Dish> pageInfo, Integer page, Integer pageSize, String name)
getAll in interface DishServicepage - pageSize - name - @Transactional public Boolean updateDishAndFlavors(DishDto dishDto)
updateDishAndFlavors in interface DishServicedishDto - Copyright © 2022. All rights reserved.