53 lines
2.2 KiB
Java
53 lines
2.2 KiB
Java
|
package com.xkrs.dao;
|
|||
|
|
|||
|
import com.xkrs.model.entity.FileEntity;
|
|||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|||
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|||
|
import org.springframework.data.jpa.repository.Modifying;
|
|||
|
import org.springframework.data.jpa.repository.Query;
|
|||
|
import org.springframework.stereotype.Component;
|
|||
|
|
|||
|
/**
|
|||
|
* @Author: XinYi Song
|
|||
|
* @Date: 2022/1/20 15:23
|
|||
|
*/
|
|||
|
@Component
|
|||
|
public interface FileDao extends JpaRepository<FileEntity,Long>, JpaSpecificationExecutor<FileEntity> {
|
|||
|
|
|||
|
/**
|
|||
|
* 根据机种号,批次号,机器号,产品号查询文件信息
|
|||
|
* @param fileModelNumber
|
|||
|
* @param fileBatchNumber
|
|||
|
* @param fileMachineCode
|
|||
|
* @param fileProductNumber
|
|||
|
* @return
|
|||
|
*/
|
|||
|
FileEntity findByFileModelNumberAndFileBatchNumberAndFileMachineCodeAndFileProductNumber(String fileModelNumber,String fileBatchNumber,String fileMachineCode,String fileProductNumber);
|
|||
|
|
|||
|
/**
|
|||
|
* 根据机种号,批次号,机器号,产品号修改模板上传信息
|
|||
|
* @param fileModelNumber
|
|||
|
* @param fileBatchNumber
|
|||
|
* @param fileMachineCode
|
|||
|
* @param fileProductNumber
|
|||
|
* @param fileUploadPath
|
|||
|
*/
|
|||
|
@Modifying(clearAutomatically=true)
|
|||
|
@Query(value = "update file set file_upload_path = ?5 where file_model_number = ?1 and file_batch_number = ?2 and file_machine_code = ?3 and file_product_number = ?4",nativeQuery = true)
|
|||
|
void updateFileUploadPath(String fileModelNumber,String fileBatchNumber,String fileMachineCode,String fileProductNumber,String fileUploadPath);
|
|||
|
|
|||
|
/**
|
|||
|
* 根据机种号,批次号,机器号,产品号修改模板下载信息
|
|||
|
* @param fileModelNumber
|
|||
|
* @param fileBatchNumber
|
|||
|
* @param fileMachineCode
|
|||
|
* @param fileProductNumber
|
|||
|
* @param fileDownloadPath
|
|||
|
*/
|
|||
|
@Modifying(clearAutomatically=true)
|
|||
|
@Query(value = "update file set file_download_path = ?5 where file_model_number = ?1 and file_batch_number = ?2 and file_machine_code = ?3 and file_product_number = ?4",nativeQuery = true)
|
|||
|
void updateFileDownloadPath(String fileModelNumber,String fileBatchNumber,String fileMachineCode,String fileProductNumber,String fileDownloadPath);
|
|||
|
|
|||
|
|
|||
|
}
|