package com.fs.watch.controller;

import com.fs.common.core.domain.AjaxResult;
import com.fs.watch.domain.WatchSosCallLogs;
import com.fs.watch.service.WatchSosCallLogsService;
import org.springframework.beans.factory.annotation.Autowired;
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;


@RestController
@RequestMapping("/watch/sos/call")
public class WatchSosCallLogsController {
    @Autowired
    private WatchSosCallLogsService watchSosCallLogsService;

    @PostMapping("/insert")
    public AjaxResult insert(@RequestBody WatchSosCallLogs data){
        return AjaxResult.success(watchSosCallLogsService.insert(data));
    }

    @PostMapping("/batchInsertData")
    public AjaxResult batchInsertData(@RequestBody List<WatchSosCallLogs> list){
        return AjaxResult.success(watchSosCallLogsService.batchInsertData(list));
    }


}
