You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.2 KiB
Java
41 lines
1.2 KiB
Java
5 years ago
|
package com.ann.demo.service.impl;
|
||
|
|
||
|
import com.ann.demo.entity.interfaceEntity.InterfaceHisCache;
|
||
|
import com.ann.demo.repository.InterfaceHisCacheRepository;
|
||
|
import com.ann.demo.service.InterfaceHisCacheService;
|
||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
import org.springframework.stereotype.Service;
|
||
|
|
||
|
import java.util.List;
|
||
|
|
||
|
@Service
|
||
|
public class InterfaceHisCacheServiceImpl implements InterfaceHisCacheService {
|
||
|
|
||
|
@Autowired
|
||
|
private InterfaceHisCacheRepository interfaceHisCacheRepository;
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public List<InterfaceHisCache> findInterfaceHisCacheByState() {
|
||
|
return interfaceHisCacheRepository.findAllByStateAndPdfPathIsNotNull("0");
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean updateState(String state,String id,String type ) {
|
||
|
if(interfaceHisCacheRepository.updateStateById(state,id,type) > 0)
|
||
|
return true;
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void save(InterfaceHisCache interfaceHisCache) {
|
||
|
interfaceHisCacheRepository.save(interfaceHisCache);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public InterfaceHisCache findInterfaceHisCache(String inpNo, String visitId, String type) {
|
||
|
return interfaceHisCacheRepository.findByInpNoAndVisitIdAndStateAndType(inpNo,visitId,"0",type);
|
||
|
}
|
||
|
|
||
|
}
|