feiyu02
2022-07-20 39e208b6b0482a25c77e53590087c02d9d937563
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)
}