get Real Customers: fix findByActive + database change

This commit is contained in:
Bossanyi Tibor 2020-05-16 11:35:46 +02:00
parent b5a8727d60
commit ff2c16ea7b
2 changed files with 4 additions and 3 deletions

View File

@ -20,6 +20,7 @@ CREATE TABLE IF NOT EXISTS `customer` (
`email` char(100) DEFAULT NULL,
`sex` enum('m','w') DEFAULT 'm',
`age` tinyint DEFAULT NULL,
`active` enum('Y','N','D','S') DEFAULT 'N',
PRIMARY KEY (`customer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci;

View File

@ -5,6 +5,6 @@ import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.stereotype.Repository
@Repository
interface CustomerRepository : JpaRepository<Customer, Long>{
fun findRealCustomers(active: String):List<Customer>
}
interface CustomerRepository : JpaRepository<Customer, Long> {
fun findByActive( active: String? ):List<Customer>
}