package com.sw.mes.yb.production.dao;

import com.sw.mes.core.base.BaseDao;
import com.sw.mes.yb.production.entity.ProcessNoDiameter;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @Author
 * @Description：
 * @Date:
 * @Modified By:
 */
public interface ProcessNoDiameterDao extends BaseDao<ProcessNoDiameter, Long> {

    @Query(value = "SELECT * FROM production_process_no_diameter WHERE step_name = ?1 AND create_time >= DATE_SUB(NOW(), INTERVAL 24 HOUR)" ,nativeQuery = true)
    List<ProcessNoDiameter> findByStepName(String stepName);
}