package com.flightfeather.grid.repository.impl
|
|
import com.flightfeather.grid.domain.ds1.entity.Clue
|
import com.flightfeather.grid.domain.ds1.mapper.ClueMapper
|
import com.flightfeather.grid.repository.ClueRepository
|
import org.springframework.scheduling.annotation.Async
|
import org.springframework.stereotype.Repository
|
|
@Repository
|
class ClueRepositoryImpl(val clueMapper: ClueMapper) : ClueRepository {
|
|
@Async
|
override fun insertList(list: List<Clue?>) {
|
val sortList = list.sortedBy { it?.cId }
|
sortList.forEach {
|
try {
|
clueMapper.insertSelective(it)
|
} catch (e: Exception) {
|
println(e.message)
|
}
|
}
|
}
|
}
|