package com.bonus.sgzb.app.service.impl;

import com.bonus.sgzb.app.domain.AppMenu;
import com.bonus.sgzb.app.mapper.AppMenuMapper;
import com.bonus.sgzb.app.service.AppMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author c liu
 * @date 2024/1/17
 */
@Service
public class AppMenuServiceImpl implements AppMenuService {

    @Autowired
    private AppMenuMapper mapper;

    @Override
    public List<AppMenu> getAllMenu() {
        return mapper.getAllMenu();
    }

    @Override
    public List<AppMenu> getMenuById(Long userId) {
        return mapper.getMenuById(userId);
    }

    @Override
    public int addMenuById(Long appMenuId, Long userId) {
        return mapper.addMenuById(appMenuId,userId);
    }

    @Override
    public int delMenuById(Long appMenuId, Long userId) {
        return mapper.delMenuById(appMenuId,userId);
    }
}
