package cn.ey.biz.module.system.dal.mapper.permission;

import cn.ey.biz.framework.mybatis.core.mapper.BaseMapperX;
import cn.ey.biz.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.ey.biz.module.system.controller.admin.codeblock.vo.CodeBlockUserGpnVO;
import cn.ey.biz.module.system.dal.dataobject.permission.RoleCodeblockDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface RoleCodeblockMapper extends BaseMapperX<RoleCodeblockDO> {

    default List<RoleCodeblockDO> selectList(RoleCodeblockDO reqDO) {
        return selectList(new LambdaQueryWrapperX<RoleCodeblockDO>()
                .eqIfPresent(RoleCodeblockDO::getCodeBlock, reqDO.getCodeBlock())
                .orderByDesc(RoleCodeblockDO::getId));
    }

    List<CodeBlockUserGpnVO> getCodeLockUserGpnList(@Param("list") List<String> list,@Param("app") String app);

}
