package com.njcn.rdms.module.project.dal.mysql.performance;

import com.njcn.rdms.framework.mybatis.core.mapper.BaseMapperX;
import com.njcn.rdms.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.njcn.rdms.module.project.dal.dataobject.performance.PerformanceSheetStatusLogDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface PerformanceSheetStatusLogMapper extends BaseMapperX<PerformanceSheetStatusLogDO> {

    default List<PerformanceSheetStatusLogDO> selectListBySheetId(Long sheetId) {
        return selectList(new LambdaQueryWrapperX<PerformanceSheetStatusLogDO>()
                .eq(PerformanceSheetStatusLogDO::getSheetId, sheetId)
                .orderByDesc(PerformanceSheetStatusLogDO::getCreateTime)
                .orderByDesc(PerformanceSheetStatusLogDO::getId));
    }
}
