feiyu02
2025-09-19 7cbe1610b87da19ed8a146a09b1117f92d9d3d98
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
    }
}