Commit 4d8f7eb1 authored by yanzg's avatar yanzg

修改公式和计算帮助类

parent 0c2359be
...@@ -59,14 +59,15 @@ public class YzgMqProcedure implements InitializingBean { ...@@ -59,14 +59,15 @@ public class YzgMqProcedure implements InitializingBean {
public void afterPropertiesSet() throws Exception { public void afterPropertiesSet() throws Exception {
mqService.createQueue(new QueueVo(YZG_MQ_SYSTEM_QUEUE)); mqService.createQueue(new QueueVo(YZG_MQ_SYSTEM_QUEUE));
mqService.createQueue(new QueueVo(YZG_MQ_SYSTEM_QUEUE_PLAN)); mqService.createQueue(new QueueVo(YZG_MQ_SYSTEM_QUEUE_PLAN));
YZG_MQ_SYSTEM_QUEUE_PLAN_TIME.add(YZG_MQ_SYSTEM_QUEUE_PLAN_MIN);
if (YZG_MQ_SYSTEM_QUEUE_PLAN_TIME.isEmpty()) { if (YZG_MQ_SYSTEM_QUEUE_PLAN_TIME.isEmpty()) {
long now = YZG_MQ_SYSTEM_QUEUE_PLAN_MIN.unit; long now = YZG_MQ_SYSTEM_QUEUE_PLAN_MIN.unit;
int count = 1; int count = 1;
while (now < YZG_MQ_SYSTEM_QUEUE_PLAN_MAX.unit) { while (now < YZG_MQ_SYSTEM_QUEUE_PLAN_MAX.unit) {
YZG_MQ_SYSTEM_QUEUE_PLAN_TIME.add(new TimeUnit(String.format("Second:%d", count), now));
// 增加2倍 // 增加2倍
count = count * 2; count = count * 2;
now = YZG_MQ_SYSTEM_QUEUE_PLAN_MIN.unit * count; now = YZG_MQ_SYSTEM_QUEUE_PLAN_MIN.unit * count;
YZG_MQ_SYSTEM_QUEUE_PLAN_TIME.add(new TimeUnit(String.format("Second:%d", count), now));
} }
} }
for (TimeUnit item : YZG_MQ_SYSTEM_QUEUE_PLAN_TIME) { for (TimeUnit item : YZG_MQ_SYSTEM_QUEUE_PLAN_TIME) {
......
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