Commit 2949c5ec by manxiaoqiang

2

parent 54452c6a
......@@ -11,16 +11,16 @@ import java.util.List;
@Transactional
public interface IOAccount4WebRepository extends JpaRepository<IOAccount4Web, Long> {
@Query(value = "SELECT * from account4web where email in ?1", nativeQuery = true)
@Query(value = "SELECT * from ioaccount4web where email in ?1", nativeQuery = true)
List<IOAccount4Web> findByEmails(List<String> emails);
@Query(value = "SELECT * from account4web where past_date = ?1", nativeQuery = true)
@Query(value = "SELECT * from ioaccount4web where past_date = ?1", nativeQuery = true)
List<IOAccount4Web> findByPast(String yesterday);
@Query(value = "SELECT * from account4web where status = '已过期' or status = '流量用尽'", nativeQuery = true)
@Query(value = "SELECT * from ioaccount4web where status = '已过期' or status = '流量用尽'", nativeQuery = true)
List<IOAccount4Web> findPast();
@Query(value = "SELECT * from account4web where email = ?1", nativeQuery = true)
@Query(value = "SELECT * from ioaccount4web where email = ?1", nativeQuery = true)
IOAccount4Web findByEmail(String email);
}
......@@ -33,6 +33,7 @@ public class AccountCheck {
List<Account> list = new ArrayList<>();
for(Account a: accountList){
List<Contract> contractList = contractRepository.findByPlatformAndEmail("tkio", a.getEmail(), ContractTypeEnum.MAIN.getKey());
logger.error("startDate :" + (null == contractList));
if(null == contractList){
a.setStatus(0);
list.add(a);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment