package com.cf.imes.module.system.dal.mysql.systemconfig;

import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.organ.core.context.OrganContextHolder;
import com.cf.imes.module.system.dal.dataobject.systemconfig.SystemConfigDO;
import com.cf.imes.module.system.dal.dataobject.systemconfig.SystemConfigSealedgeDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author 封边条对应配置 Mapper
 */
@Mapper
public interface SystemConfigSealedgeMapper extends BaseMapperX<SystemConfigSealedgeDO> {

    default List<SystemConfigSealedgeDO> selectSystemConfigList(Integer type, Integer status) {
        return selectList(new LambdaQueryWrapperX<SystemConfigSealedgeDO>()
                .eqIfPresent(SystemConfigSealedgeDO::getOrganId, OrganContextHolder.getOrganId())
                .eq(SystemConfigSealedgeDO::getDeleted,false)
                .eq(SystemConfigSealedgeDO::getType, type)
                .eqIfPresent(SystemConfigSealedgeDO::getStatus,status)
                .orderByAsc(SystemConfigSealedgeDO::getSort, SystemConfigDO::getCreateTime));
    }



}
