rk
2026-06-09 f76c68a87261cf2396a64c7125324c24483d4623
server/visits/admin_timer/src/main/java/com/doumee/api/HkDeviceTimerController.java
@@ -1,13 +1,14 @@
package com.doumee.api;
import com.doumee.api.BaseController;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.service.business.DeviceService;
import com.doumee.service.business.third.model.ApiResponse;
import com.doumee.service.business.impl.hksync.HkSyncDeviceServiceImpl;
import com.doumee.service.business.impl.hksync.HkSyncParkServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -16,16 +17,27 @@
 * @date 2023/11/30 15:33
 */
@Api(tags = "设备定时器接口")
@Slf4j
@RestController
@RequestMapping("/timer/device")
public class HkDeviceTimerController extends BaseController {
    @Autowired
    private HkSyncDeviceServiceImpl hkSyncDeviceService;
    @Autowired
    private DeviceService deviceService;
    @ApiOperation("开启定时查询设备状态")
    @GetMapping("/getAscDeviceStatus")
    @PostMapping("/getAscDeviceStatus")
    public ApiResponse getAscDeviceStatus() {
        log.info("定时任务执行开始:getAscDeviceStatus-查询设备状态");
        hkSyncDeviceService.getAscDeviceStatus();
        return ApiResponse.success("开启定时查询设备状态成功");
    }
    @ApiOperation("更新全部LED屏显内容为默认内容")
    @PostMapping("/allLedDefualtContent")
    public ApiResponse allLedDefualtContent() {
        log.info("定时任务执行开始:allLedDefualtContent-更新LED屏默认内容");
        deviceService.allLedDefualtContent();
        return ApiResponse.success("更新全部LED屏显内容为默认内容");
    }
}