You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1022 B
49 lines
1022 B
package com.liuyanzhao.ssm.blog.service.impl;
|
|
|
|
import com.liuyanzhao.ssm.blog.entity.Menu;
|
|
import com.liuyanzhao.ssm.blog.mapper.MenuMapper;
|
|
import com.liuyanzhao.ssm.blog.service.MenuService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @author liuyanzhao
|
|
*/
|
|
@Service
|
|
public class MenuServiceImpl implements MenuService {
|
|
|
|
|
|
@Autowired
|
|
private MenuMapper menuMapper;
|
|
|
|
@Override
|
|
public List<Menu> listMenu() {
|
|
List<Menu> menuList = menuMapper.listMenu();
|
|
return menuList;
|
|
}
|
|
|
|
@Override
|
|
public Menu insertMenu(Menu menu) {
|
|
menuMapper.insert(menu);
|
|
return menu;
|
|
}
|
|
|
|
@Override
|
|
public void deleteMenu(Integer id) {
|
|
menuMapper.deleteById(id);
|
|
}
|
|
|
|
@Override
|
|
public void updateMenu(Menu menu) {
|
|
menuMapper.update(menu);
|
|
}
|
|
|
|
@Override
|
|
public Menu getMenuById(Integer id) {
|
|
return menuMapper.getMenuById(id);
|
|
}
|
|
}
|