| | |
| | | @Repository |
| | | class ObdDataDaoImpl(val obdDataMapper: ObdDataMapper) : ObdDataRepository { |
| | | |
| | | override fun saveObdData(data: ObdDataVo) { |
| | | override fun saveObdData(data: ObdDataVo): Boolean { |
| | | val obdData = ObdData() |
| | | BeanUtils.copyProperties(data, obdData) |
| | | obdDataMapper.insert(obdData) |
| | | return obdDataMapper.insert(obdData) == 1 |
| | | } |
| | | |
| | | override fun getDataByVinCode(vinCode: String, pageNum: Int?, pageSize: Int?): MutableList<ObdDataVo> { |
| | |
| | | |
| | | //分页 |
| | | val offset = (pageSize?.times(pageNum?.minus(1) ?: 0)) ?: 0 |
| | | val a = PageHelper.offsetPage<ObdData>(offset, pageSize ?: 10) |
| | | PageHelper.offsetPage<ObdData>(offset, pageSize ?: 10) |
| | | val result = obdDataMapper.selectByExample(example) |
| | | |
| | | val resultList = mutableListOf<ObdDataVo>() |