记得上下班打卡 | git大法好,push需谨慎

Commit 2b263d07 authored by 胡佳晨's avatar 胡佳晨

修改 脚本库存脚本

parent d8e810b1
......@@ -1078,16 +1078,16 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
}
currentTime = System.currentTimeMillis() - currentTime;
log.debug("FOR 循环 -> time:" + (currentTime) + "毫秒");
if (orderIdList.size() > 0) {
//库存
for (Map.Entry<String, Integer> entry : mapSurplusGeneral.entrySet()) {
dataUtils.changeSurplusGeneral(entry.getKey(), entry.getValue());
}
currentTime = System.currentTimeMillis() - currentTime;
log.debug("redis 库存 -> time:" + (currentTime) + "毫秒");
//mysql
LinkedList<String> sqls = new LinkedList<>();
//mysql
String orderStr = "";
for (int i = 0; i < orderIdList.size(); i++) {
String orderTicketId = orderIdList.get(i).split(",")[0];
......@@ -1106,6 +1106,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
);
currentTime = System.currentTimeMillis() - currentTime;
log.debug("mongo -> time:" + (currentTime) + "毫秒");
//redis 列表
orderIdList.forEach(t -> {
String orderTicketId = t.split(",")[0];
......@@ -1121,6 +1122,9 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
});
currentTime = System.currentTimeMillis() - currentTime;
log.debug("redis 列表 限购 -> time:" + (currentTime) + "毫秒");
}
} catch (Exception e) {
e.printStackTrace();
} finally {
......
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