package com.unis.crk.basic.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.unis.crk.basic.entity.ButtonInfo;
import com.unis.crk.basic.mapper.ButtonInfoMapper;
import com.unis.crk.basic.mapper.FuncInfoMapper;
import com.unis.crk.basic.service.IButtonInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 按钮信息表 服务实现类
 * </p>
 *
 * @author ghh
 * @since 2021-09-26
 */
@Service
public class ButtonInfoServiceImpl extends ServiceImpl<ButtonInfoMapper, ButtonInfo> implements IButtonInfoService {
    @Resource
    private ButtonInfoMapper buttonInfoMapper;
    @Override
    public List<ButtonInfo> getByFuncId(String funcId) {
        QueryWrapper<ButtonInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("func_id",funcId);
        queryWrapper.orderByAsc("createtime");
//        return buttonInfoMapper.getByFuncId(funcId);
        return buttonInfoMapper.selectList(queryWrapper);
    }
}
