修改update写法

ljl-dsPurchaseOrder
wangchaoxu 1 year ago
parent 1e73a62700
commit 4d8a86f3a2

@ -495,12 +495,14 @@ public class DoudianMsgServiceImpl implements DoudianMsgService {
return null;
}
row.setLocked(1L);
DoudianTradeMsgQueue updateData = new DoudianTradeMsgQueue();
updateData.setDoudianTradeMsgQueueId(row.getDoudianTradeMsgQueueId());
updateData.setLocked(1L);
// row.setHostname("");
row.setGmtLastHeartbeat(new Date());
row.setGmtLocked(new Date());
row.setGmtModified(new Date());
int affRow = doudianTradeMsgQueueMapper.updateByPrimaryKeySelective(row);
updateData.setGmtLastHeartbeat(new Date());
updateData.setGmtLocked(new Date());
updateData.setGmtModified(new Date());
int affRow = doudianTradeMsgQueueMapper.updateByPrimaryKeySelective(updateData);
if (affRow == 1) {
// todo: 心跳后面想想怎么搞
return row;
@ -531,12 +533,14 @@ public class DoudianMsgServiceImpl implements DoudianMsgService {
return null;
}
row.setLocked(1);
DoudianAftersaleMsgQueue updateData = new DoudianAftersaleMsgQueue();
updateData.setDoudianAftersaleMsgQueueId(row.getDoudianAftersaleMsgQueueId());
updateData.setLocked(1);
// row.setHostname("");
row.setGmtLastHeartbeat(new Date());
row.setGmtLocked(new Date());
row.setGmtModified(new Date());
int affRow = doudianAftersaleMsgQueueMapper.updateByPrimaryKeySelective(row);
updateData.setGmtLastHeartbeat(new Date());
updateData.setGmtLocked(new Date());
updateData.setGmtModified(new Date());
int affRow = doudianAftersaleMsgQueueMapper.updateByPrimaryKeySelective(updateData);
if (affRow == 1) {
// todo: 心跳后面想想怎么搞
return row;

@ -68,13 +68,16 @@ public class OpOrderRsyncPageQueueServiceImpl implements OpOrderRsyncPageQueueSe
if (ObjectUtil.isEmpty(row)) {
return null;
}
OpOrderRsyncPageQueue updateData = new OpOrderRsyncPageQueue();
updateData.setOpOrderRsyncPageQueueId(row.getOpOrderRsyncPageQueueId());
Date date = new Date();
row.setLocked(timerLockId);
row.setHostname("");
row.setGmtLastHeartbeat(date);
row.setGmtModified(date);
row.setGmtLocked(date);
int affectRows = opOrderRsyncPageQueueMapper.updateByPrimaryKey(row);
updateData.setLocked(timerLockId);
updateData.setHostname("");
updateData.setGmtLastHeartbeat(date);
updateData.setGmtModified(date);
updateData.setGmtLocked(date);
int affectRows = opOrderRsyncPageQueueMapper.updateByPrimaryKeySelective(updateData);
if (affectRows == 1) {
return row;
}

@ -65,13 +65,16 @@ public class OpOrderRsyncQueueServiceImpl implements OpOrderRsyncQueueService {
if (ObjectUtil.isEmpty(row)) {
return null;
}
OpOrderRsyncQueue updateData = new OpOrderRsyncQueue();
updateData.setOpOrderRsyncQueueId(row.getOpOrderRsyncQueueId());
Date date = new Date();
row.setLocked(timerLockId);
row.setHostname("");
row.setGmtLastHeartbeat(date);
row.setGmtModified(date);
row.setGmtLocked(date);
int affectRows = opOrderRsyncQueueMapper.updateByPrimaryKey(row);
updateData.setLocked(timerLockId);
updateData.setHostname("");
updateData.setGmtLastHeartbeat(date);
updateData.setGmtModified(date);
updateData.setGmtLocked(date);
int affectRows = opOrderRsyncQueueMapper.updateByPrimaryKeySelective(updateData);
if (affectRows == 1) {
return row;
}

Loading…
Cancel
Save