package com.zt.plat.module.base.dal.dao.businessdepartmentindicator;

import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import com.zt.plat.module.base.dal.dataobject.businessdepartmentindicator.BusinessDepartmentIndicatorDO;
import org.apache.ibatis.annotations.Mapper;
import com.zt.plat.module.base.controller.admin.businessdepartmentindicator.vo.*;

/**
 * 部门持有指标 Mapper
 *
 * @author YangXiaofeng
 */
@Mapper
public interface BusinessDepartmentIndicatorMapper extends BaseMapperX<BusinessDepartmentIndicatorDO> {

    default PageResult<BusinessDepartmentIndicatorDO> selectPage(BusinessDepartmentIndicatorPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<BusinessDepartmentIndicatorDO>()
                .eqIfPresent(BusinessDepartmentIndicatorDO::getIndicatorId, reqVO.getIndicatorId())
                .eqIfPresent(BusinessDepartmentIndicatorDO::getIsKey, reqVO.getIsKey())
                .orderByDesc(BusinessDepartmentIndicatorDO::getId));
    }

}