Commit f46722a1 by yinyong

Merge remote-tracking branch 'origin/master'

parents 10027929 25e8c298
......@@ -123,8 +123,10 @@ public class WishSyncJob extends PointJob {
for(Map<String, DcBaseFinanceWish> maps : mapList) {
DcBaseFinanceWish dcBaseFinanceWish = null;
boolean updateInsert = true;
boolean afterTime = false;
try {
dcBaseFinanceWish = maps.get("Campaign");
if(jobAccountLog.getStartTime().compareTo(dcBaseFinanceWish.getStartTime()) > -1) {
BigDecimal exchangeRate = CallBailunSystem.getExchangeRate(CurrencyType.USD.value(), CurrencyType.CNY.value(), dcBaseFinanceWish.getStartTime());
dcBaseFinanceWish.setOtherToCnyExchangeRate(exchangeRate);
dcBaseFinanceWish.setAccountId(jobAccountLog.getAccountId());
......@@ -142,6 +144,8 @@ public class WishSyncJob extends PointJob {
}
updateInsert = false;
}
afterTime = true;
}
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("Mybatis操作DB插入任务记录失败", e);
......@@ -149,6 +153,7 @@ public class WishSyncJob extends PointJob {
SessionUtil.closeSession();
}
try {
if(afterTime) {
List<Map<String, DcBaseFinanceWishProduct>> listWishProduct = maps.get("Campaign").getListWishProduct();
if(updateInsert) {
DcBaseFinanceWishProductMapper dcBaseFinanceWishProductMapper = SessionUtil.getSession().getMapper(DcBaseFinanceWishProductMapper.class);
......@@ -162,6 +167,7 @@ public class WishSyncJob extends PointJob {
dcBaseFinanceWishProductMapper.insertSelective(dcBaseFinanceWishProduct);
}
}
}
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("Mybatis操作DB插入任务记录失败", e);
......@@ -170,6 +176,7 @@ public class WishSyncJob extends PointJob {
}
try {
if(afterTime) {
if(updateInsert) {
DcBaseFinanceWishImpressionFeeMapper dcBaseFinanceWishImpressionFeeMapper = SessionUtil.getSession().getMapper(DcBaseFinanceWishImpressionFeeMapper.class);
dcBaseFinanceWishImpressionFeeMapper.deleteByExample(DcBaseFinanceWishImpressionFeeExample.newAndCreateCriteria().andCampaignIdEqualTo(dcBaseFinanceWish.getCampaignId()).example());
......@@ -183,6 +190,7 @@ public class WishSyncJob extends PointJob {
dcBaseFinanceWishImpressionFeeMapper.insertSelective(dcBaseFinanceWishImpressionFee);
}
}
}
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("Mybatis操作DB插入任务记录失败", e);
......
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