//package com.yida.data.server.controller.in;
//
//import com.yida.data.common.core.common.ResultBean;
//import com.yida.data.server.dto.DisturbDTO;
//import com.yida.data.server.dto.FenceDTO;
//import com.yida.data.server.dto.WhiteListDTO;
//import com.yida.data.server.service.OperationService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiModelProperty;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiParam;
//import lombok.RequiredArgsConstructor;
//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.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//@Api(tags = "下发指令")
//@RequiredArgsConstructor
//@RestController
//@RequestMapping("/in/operation")
//public class InOperationController {
//
//    private final OperationService operationService;
//
//    @ApiOperation("设置白名单")
//    @PostMapping("/whiteList")
//    public ResultBean whiteList(@RequestBody WhiteListDTO dto) {
//        operationService.whiteList(dto);
//        return ResultBean.buildSuccess();
//    }
//
//    @ApiOperation("围栏通知开关")
//    @PostMapping("/fenceSwitch")
//    public ResultBean fenceSwitch(@RequestParam String imei,
//        @ApiParam("0-关闭，1-开") @RequestParam Integer type) {
//        operationService.fenceSwitch(imei, type);
//        return ResultBean.buildSuccess();
//    }
//
//    @ApiOperation("创建围栏")
//    @PostMapping("/fence")
//    public ResultBean fence(@RequestBody FenceDTO dto) {
//        operationService.fence(dto);
//        return ResultBean.buildSuccess();
//    }
//
//    @ApiModelProperty("免打扰时间设置")
//    @PostMapping("/disturbTime")
//    public ResultBean disturb(@RequestBody DisturbDTO dto) {
//        operationService.disturbTime(dto);
//        return ResultBean.buildSuccess();
//    }
//
//    @ApiModelProperty("免打扰开关")
//    @PostMapping("/disturbSwitch")
//    public ResultBean disturbSwitch(@RequestParam String imei,
//        @ApiParam("0-关闭，1-打开常规免打扰，2-打开静默") @RequestParam Integer type) {
//        operationService.disturbSwitch(imei, type);
//        return ResultBean.buildSuccess();
//    }
//
//    @ApiModelProperty("主动定位")
//    @PostMapping("/nowLocation")
//    public ResultBean nowLocation(@RequestParam String imei) {
//        operationService.nowLocation(imei);
//        return ResultBean.buildSuccess();
//    }
//}
