package cn.flightfeather.supervision.lightshare.service.impl
|
|
import cn.flightfeather.supervision.domain.ds1.entity.Town
|
import cn.flightfeather.supervision.domain.ds1.mapper.TownMapper
|
import cn.flightfeather.supervision.lightshare.service.TownService
|
import org.springframework.stereotype.Service
|
|
@Service
|
class TownServiceImpl(val townMapper: TownMapper) : TownService {
|
override fun findOne(id: String): Town = townMapper.selectByPrimaryKey(id)
|
|
override fun findAll(): MutableList<Town> = townMapper.selectAll()
|
|
override fun save(town: Town): Int = townMapper.insert(town)
|
|
override fun update(town: Town): Int = townMapper.updateByPrimaryKey(town)
|
|
override fun delete(id: String): Int = townMapper.deleteByPrimaryKey(id)
|
}
|