package com.community.huiju.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.community.commom.mode.ResponseBean;
import com.community.commom.session.UserElement;
import com.community.huiju.model.TaSysMenu;
import com.community.huiju.dao.TaSysMenuMapper;
import com.community.huiju.service.ITaSysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * APP端菜单页面 服务实现类
 * </p>
 *
 * @author jobob
 * @since 2019-03-06
 */
@Service
public class TaSysMenuServiceImpl extends ServiceImpl<TaSysMenuMapper, TaSysMenu> implements ITaSysMenuService {

    @Autowired
    private TaSysMenuMapper taSysMenuMapper;

    @Override
    public ResponseBean getList(UserElement userElement) {
        ResponseBean responseBean = new ResponseBean();

        List<TaSysMenu> taSysMenus = taSysMenuMapper.selectList(userElement.getCommunityId());
        responseBean.addSuccess(taSysMenus);
        return responseBean;
    }
}
