package cn.iocoder.yudao.module.system.dal.mysql.sys;


import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
import cn.iocoder.yudao.module.system.dal.dataobject.sys.BusinessParamsConfigDO;
import cn.iocoder.yudao.module.system.enums.NoticeConstants;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 系统业务参数配置 Mapper
 *
 * @author 系统管理员
 */
@Mapper
public interface BusinessParamsConfigMapper extends BaseMapperX<BusinessParamsConfigDO> {

    @TenantIgnore
    default List<BusinessParamsConfigDO> selectListByName(Long tenantId, String ... configNameList) {
        return selectList(new LambdaQueryWrapperX<BusinessParamsConfigDO>()
                .eq(BusinessParamsConfigDO::getTenantId, tenantId)
                .in(BusinessParamsConfigDO::getConfigName, configNameList));
    };

//    default PageResult<BusinessParamsConfigDO> selectPage(BusinessParamsConfigPageReqVO reqVO) {
//        return selectPage(reqVO, new LambdaQueryWrapperX<BusinessParamsConfigDO>()
//                .eqIfPresent(BusinessParamsConfigDO::getTitle, reqVO.getTitle())
//                .likeIfPresent(BusinessParamsConfigDO::getConfigName, reqVO.getConfigName())
//                .eqIfPresent(BusinessParamsConfigDO::getValue, reqVO.getValue())
//                .orderByDesc(BusinessParamsConfigDO::getId));
//    }

}