package com.yida.data.user.controller;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.user.EduUserDevice;
import com.yida.data.user.service.EduUserDeviceService;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;

@Api(tags = "人脸下发记录（不鉴权）")
@RestController
@RequestMapping("/in/userDevice")
@RequiredArgsConstructor
public class InEduUserDeviceController {
    private final EduUserDeviceService eduUserDeviceService;

    @ApiOperation("批量保存")
    @PostMapping("/batchSave")
    public ResultBean batchSave(@RequestBody List<EduUserDevice> list) {
        eduUserDeviceService.batchSaveUserDevice(list);
        return ResultBean.buildSuccess();
    }
}
