Commit 75c9e1b8 by wutong

调拨数据同步插入DB时,毫秒值要四舍五入

parent 1fada70f
...@@ -187,10 +187,11 @@ public class TransferDetailsServiceImpl { ...@@ -187,10 +187,11 @@ public class TransferDetailsServiceImpl {
} }
try { try {
DcBaseTransferInboundMapper mapper12 = SessionUtil.getSession().getMapper(DcBaseTransferInboundMapper.class); DcBaseTransferInboundMapper mapper12 = SessionUtil.getSession().getMapper(DcBaseTransferInboundMapper.class);
int round = Math.round(dcBaseTransferInbound.getCreateTime().getNano() / 1000000000.0F);
int i = mapper12.updateByExampleSelective(dcBaseTransferInbound, DcBaseTransferInboundExample.newAndCreateCriteria() int i = mapper12.updateByExampleSelective(dcBaseTransferInbound, DcBaseTransferInboundExample.newAndCreateCriteria()
.andBailunSkuEqualTo(dcBaseTransferInbound.getBailunSku()) .andBailunSkuEqualTo(dcBaseTransferInbound.getBailunSku())
.andTransferOrderIdEqualTo(dcBaseTransferInbound.getTransferOrderId()) .andTransferOrderIdEqualTo(dcBaseTransferInbound.getTransferOrderId())
.andCreateTimeEqualTo(dcBaseTransferInbound.getCreateTime().withNano(0)) .andCreateTimeEqualTo(dcBaseTransferInbound.getCreateTime().withNano(0).plusSeconds(round))
.example()); .example());
if (i == 0) { if (i == 0) {
mapper12.insertSelective(dcBaseTransferInbound); mapper12.insertSelective(dcBaseTransferInbound);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment