|
|
@@ -4,8 +4,11 @@ import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.dromara.backstage.business.lock.LockBusiness;
|
|
|
import org.dromara.backstage.domain.bo.lock.RoomCardBo;
|
|
|
+import org.dromara.backstage.task.ScheduledTasks;
|
|
|
import org.dromara.common.core.api.ResponseResult;
|
|
|
import org.dromara.common.core.api.ReturnResult;
|
|
|
+import org.dromara.common.core.config.DefaultConfig;
|
|
|
+import org.dromara.common.core.constant.DefaultConstants;
|
|
|
import org.dromara.common.core.domain.R;
|
|
|
import org.dromara.common.core.enums.ResultCodeEnum;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -30,6 +33,8 @@ import java.text.MessageFormat;
|
|
|
public class LockController {
|
|
|
private final LockBusiness lockBusiness;
|
|
|
|
|
|
+ private final ScheduledTasks tasks;
|
|
|
+
|
|
|
/**
|
|
|
* 查询门锁电量
|
|
|
*
|
|
|
@@ -121,11 +126,8 @@ public class LockController {
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = "/open/record/executeTask")
|
|
|
- public ReturnResult queryOpenDoorRecordExectueTask() {
|
|
|
- Integer syncCount = lockBusiness.queryOpenDoorRecord(1);
|
|
|
- String message = MessageFormat.format("开门记录同步完成,本次同步了 {0} 条记录", syncCount);
|
|
|
- log.info(message);
|
|
|
- return ReturnResult.success(message);
|
|
|
+ public void queryOpenDoorRecordExectueTask() {
|
|
|
+ tasks.syncDoorOpenRecord();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|