package com.github.wxiaoqi.security.admin.biz;

import com.ace.cache.annotation.Cache;
import com.github.wxiaoqi.security.admin.entity.BaseUserMemberLevel;
import com.github.wxiaoqi.security.admin.mapper.BaseUserMemberLevelMapper;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author keliii
 */
@Service
public class UserMemberLevelBiz extends BaseBiz<BaseUserMemberLevelMapper,BaseUserMemberLevel> {


    @Transactional
    @Cache(key="member")
    public List<BaseUserMemberLevel> getLevesls() {
        Example example=new Example(BaseUserMemberLevel.class);
        example.createCriteria().andEqualTo("isdel",0);
        example.setOrderByClause(" level asc ");
        return  mapper.selectByExample(example);
    }


}
