Commit 013ef1da by 向延琳

新增时不拿旧数据的id

1 parent b80116a2
...@@ -53,6 +53,7 @@ public class BatteryService { ...@@ -53,6 +53,7 @@ public class BatteryService {
devicePowerMapper.insert(devicePower); devicePowerMapper.insert(devicePower);
return; return;
} }
devicePower.setId(devicePowerOld.getId());
devicePowerMapper.updateByPrimaryKeySelective(devicePower); devicePowerMapper.updateByPrimaryKeySelective(devicePower);
} }
...@@ -62,7 +63,6 @@ public class BatteryService { ...@@ -62,7 +63,6 @@ public class BatteryService {
devicePower.setVdId(vnId); devicePower.setVdId(vnId);
devicePower.setAlarmTime(devicePowerDTO.getAlarmTime()); devicePower.setAlarmTime(devicePowerDTO.getAlarmTime());
devicePower.setSoc(devicePowerDTO.getSoc()); devicePower.setSoc(devicePowerDTO.getSoc());
devicePower.setId(devicePowerDTO.getId());
devicePower.setCreatedBy(createBy); devicePower.setCreatedBy(createBy);
devicePower.setUpdatedBy(updateBy); devicePower.setUpdatedBy(updateBy);
devicePower.setCreatedDate(devicePowerDTO.getCreatedDate()); devicePower.setCreatedDate(devicePowerDTO.getCreatedDate());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!