package com.mosty.wzzx.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mosty.base.model.dto.wzzx.WzcxQuery;
import com.mosty.base.model.dto.wzzx.WztjQuery;
import com.mosty.common.base.domain.BaseController;
import com.mosty.common.base.domain.ResponseResult;
import com.mosty.common.token.JwtSysUser;
import com.mosty.wzzx.service.WztjService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@AllArgsConstructor
@RestController
@Api(tags = "位置查询--原magic接口")
@RequestMapping("/wzcx")
public class WzcxController extends BaseController {

    private final WztjService wztjService;

    @GetMapping("/bbgjcx")
    @ApiOperation(value = "报备轨迹查询")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> bbgjcx(WzcxQuery dto) {
        return ResponseResult.success(this.wztjService.bbgjcx(dto));
    }

    @GetMapping("/bbwzcx")
    @ApiOperation(value = "报备位置查询")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> bbwzcx(WzcxQuery dto) {
        return ResponseResult.success(this.wztjService.bbwzcx(dto));
    }

    @GetMapping("/mjgjcx")
    @ApiOperation(value = "民警轨迹查询")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> mjgjcx(WzcxQuery dto) {
        return ResponseResult.success(this.wztjService.mjgjcx(dto));
    }

    @GetMapping("/wbbwz")
    @ApiOperation(value = "未报备位置查询")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> wbbwz(WzcxQuery dto) {
        return ResponseResult.success(this.wztjService.wbbwz(dto));
    }
}


