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

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.overtime.OvertimeApplicationStatusLogDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface OvertimeApplicationStatusLogMapper extends BaseMapperX<OvertimeApplicationStatusLogDO> {

    default List<OvertimeApplicationStatusLogDO> selectListByApplicationId(Long applicationId) {
        return selectList(new LambdaQueryWrapperX<OvertimeApplicationStatusLogDO>()
                .eq(OvertimeApplicationStatusLogDO::getApplicationId, applicationId)
                .orderByDesc(OvertimeApplicationStatusLogDO::getCreateTime)
                .orderByDesc(OvertimeApplicationStatusLogDO::getId));
    }
}
