| | |
| | | |
| | | |
| | | <select id="selectFwDevicePage" resultMap="fwDeviceResultMap"> |
| | | select *, (select count(*) from ja_fw_device_track tmp where ja_fw_device.id = tmp.device_id) out_count from ja_fw_device |
| | | select |
| | | *, |
| | | ( |
| | | select |
| | | count(*) |
| | | from |
| | | ja_fw_device_track tmp |
| | | where |
| | | ja_fw_device.id = tmp.device_id |
| | | ) out_count |
| | | from |
| | | ja_fw_device |
| | | <where> |
| | | is_deleted = 0 |
| | | <if test="param2.id != null and param2.id != ''"> |
| | |
| | | @Override |
| | | public boolean saveOrUpdateDevice(FwDeviceEntity fwDeviceEntity) { |
| | | if (fwDeviceEntity.getEffectiveRangeKm() == null || fwDeviceEntity.getEffectiveRangeKm().compareTo(BigDecimal.ZERO) == 0 ) { |
| | | fwDeviceEntity.setLatitude(null); |
| | | fwDeviceEntity.setLongitude(null); |
| | | fwDeviceEntity.setLatitude(""); |
| | | fwDeviceEntity.setLongitude(""); |
| | | } |
| | | return saveOrUpdate(fwDeviceEntity); |
| | | } |