package cn.flightfeather.supervision.domain.ds2.repository
|
|
import cn.flightfeather.supervision.domain.ds1.entity.Scense
|
import cn.flightfeather.supervision.domain.ds2.entity.BaseInfo
|
import cn.flightfeather.supervision.domain.ds2.entity.UserinfoTZ
|
import cn.flightfeather.supervision.domain.ds2.mapper.BaseInfoMapper
|
import org.springframework.stereotype.Repository
|
import java.util.*
|
|
@Repository
|
class BaseInfoRep(
|
private val baseInfoMapper: BaseInfoMapper,
|
) {
|
|
fun create(info: UserinfoTZ, scense: Scense): BaseInfo {
|
val baseInfo = BaseInfo().apply {
|
biGuid = info.guid
|
biName = info.realname
|
biProvinceCode = scense.provincecode
|
biProvinceName = scense.provincename
|
biCityCode = scense.citycode
|
biCityName = scense.cityname
|
biDistrictCode = scense.districtcode
|
biDistrictName = scense.districtname
|
biTownCode = scense.towncode
|
biTownName = scense.townname
|
biContact = scense.contacts
|
biTelephone = scense.contactst
|
biAddress = scense.location
|
biCreateTime = Date()
|
biExtension1 = info.acountname
|
}
|
baseInfoMapper.insert(baseInfo)
|
return baseInfo
|
}
|
}
|