Compare commits
No commits in common. "07aeee82d020ae4d6d03da8fd94cb543a84a908e" and "41e82f91c1f636f8ef4c355c94672c6bf27e72c5" have entirely different histories.
07aeee82d0
...
41e82f91c1
|
|
@ -5,10 +5,8 @@ import com.hivekion.common.redis.RedisUtil;
|
||||||
import com.hivekion.common.uuid.IdUtils;
|
import com.hivekion.common.uuid.IdUtils;
|
||||||
import com.hivekion.room.RoomManager;
|
import com.hivekion.room.RoomManager;
|
||||||
import com.hivekion.room.func.TaskAction;
|
import com.hivekion.room.func.TaskAction;
|
||||||
import com.hivekion.scenario.entity.BattleConsume;
|
|
||||||
import com.hivekion.scenario.entity.ScenarioResource;
|
import com.hivekion.scenario.entity.ScenarioResource;
|
||||||
import com.hivekion.scenario.entity.ScenarioTask;
|
import com.hivekion.scenario.entity.ScenarioTask;
|
||||||
import com.hivekion.scenario.service.impl.BattleConsumeServiceImpl;
|
|
||||||
import com.hivekion.scenario.service.impl.BattleSupplierServiceImpl;
|
import com.hivekion.scenario.service.impl.BattleSupplierServiceImpl;
|
||||||
import com.hivekion.scenario.service.impl.ScenarioTaskServiceImpl;
|
import com.hivekion.scenario.service.impl.ScenarioTaskServiceImpl;
|
||||||
import com.hivekion.statistic.bean.StatisticBean;
|
import com.hivekion.statistic.bean.StatisticBean;
|
||||||
|
|
@ -52,7 +50,7 @@ public class MoveRootTask extends AbtParentTask implements TaskAction {
|
||||||
/**
|
/**
|
||||||
* 消耗任务间隔
|
* 消耗任务间隔
|
||||||
*/
|
*/
|
||||||
private final int consumptionTaskInterval = 10;
|
private final int consumptionTaskInterval = 5;
|
||||||
/**
|
/**
|
||||||
* redis 服务类
|
* redis 服务类
|
||||||
*/
|
*/
|
||||||
|
|
@ -126,8 +124,6 @@ public class MoveRootTask extends AbtParentTask implements TaskAction {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//插入消耗表
|
//插入消耗表
|
||||||
insertConsumption(currentUseUp);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -176,18 +172,6 @@ public class MoveRootTask extends AbtParentTask implements TaskAction {
|
||||||
RoomManager.addAction(roomId, 0, supplierTask);
|
RoomManager.addAction(roomId, 0, supplierTask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void insertConsumption(double num) {
|
|
||||||
BattleConsume battleConsume = new BattleConsume();
|
|
||||||
battleConsume.setId(IdUtils.simpleUUID());
|
|
||||||
battleConsume.setResourceId(scenarioTask.getResourceId());
|
|
||||||
battleConsume.setFuel(num);
|
|
||||||
battleConsume.setConsumeDate(LocalDateTime.now());
|
|
||||||
SpringUtil.getBean(BattleConsumeServiceImpl.class).save(battleConsume);
|
|
||||||
}
|
|
||||||
private void pushStatus(double num){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -92,8 +92,6 @@ public class Room implements AutoCloseable {
|
||||||
status.set(true);
|
status.set(true);
|
||||||
totalTime.set(time);
|
totalTime.set(time);
|
||||||
startTask();
|
startTask();
|
||||||
//初始化系统资源 物资人员等信息
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -197,8 +195,4 @@ public class Room implements AutoCloseable {
|
||||||
public boolean isRunning() {
|
public boolean isRunning() {
|
||||||
return status.get();
|
return status.get();
|
||||||
}
|
}
|
||||||
//统一推送方法
|
|
||||||
protected void pushStatus(String resourceId){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user