package com.yida.data.device.studentCard.controller;


import com.yida.data.common.core.common.ResultBean;
import com.yida.data.device.studentCard.service.EduStudentCardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "学生证-学生证（不鉴权）")
@Slf4j
@Validated
@RestController
@RequiredArgsConstructor
@RequestMapping("/in/studentCard/card")
public class InEduStudentCardController {
    private final EduStudentCardService eduStudentCardService;

    @ApiOperation("更新设备定位")
    @GetMapping("/updateCardPos")
    public ResultBean updateCardPos() {
        eduStudentCardService.updateCardPos();
        return ResultBean.buildSuccess();
    }

    @ApiOperation("更新设备在线状态")
    @GetMapping("/updateCardStatus")
    public ResultBean updateCardStatus() {
        eduStudentCardService.updateCardStatus();
        return ResultBean.buildSuccess();
    }
}
