记录接口调用者的入参
String dataStr = request.getParameter("data");
log.info("SupConf136Controller-get136List param is " + dataStr);
记录消息的消息体
log.info("===>rtSyncConfStoreK:" + msgBody);
数据转换、解析的时候需要做判断,记录日志
JSONObject json = (JSONObject)ite.next(); if (json == null) { ite.remove(); log.info("===>rtSyncConfStoreK error7:" + msgBody + ":" + json); dingDingComponent.sendBigDataGroup("===>rtSyncConfStoreK error7:" + msgBody + ":" + json); continue; }
try { workDate = Date2Utils.parse(json.getString("work_date"), Date2Utils.FORMAT_LONG_6); } catch(Exception e) { log.info("rtSyncConfStoreK parseDate error", e); }
对数据库做更新操作的时候
try { iSupConfStoreKDAO.insertBatch(insertList); } catch(Exception e) { log.error("===>rtSyncConfStoreK error3:" + msgBody + ":"+ insertList, e); dingDingComponent.sendBigDataGroup("===>rtSyncConfStoreK error3:" + msgBody + ":"+ insertList + ":" + e); }
try { iSupConfStoreKDAO.updateByRtAreaKSeqNoAndStoreNo(updateList); } catch(Exception e) { log.error("===>rtSyncConfStoreK error4:" + msgBody + ":"+ updateList, e); dingDingComponent.sendBigDataGroup("===>rtSyncConfStoreK error4:" + msgBody + ":"+ updateList + ":" + e); }
try { iSupConfStoreKDAO.deleteByRtAreaKSeqNoAndStoreNo(deleteConfStoreKList); } catch(Exception e) { log.error("===>rtSyncConfStoreK error1:" + msgBody + ":" + deleteConfStoreKList, e); dingDingComponent.sendBigDataGroup("===>rtSyncConfStoreK error1:" + msgBody + ":" + deleteConfStoreKList + ":" + e); }