package com.xiaopeng.operation.controller;
|
|
import com.xiaopeng.api.model.operation.XpPoint;
|
import com.xiaopeng.api.vo.account.LoginOperationUser;
|
import com.xiaopeng.common.core.domain.R;
|
import com.xiaopeng.common.core.web.page.PageInfo;
|
import com.xiaopeng.common.redis.service.RedisService;
|
import com.xiaopeng.common.security.service.TokenService;
|
import com.xiaopeng.operation.query.PointMapQuery;
|
import com.xiaopeng.operation.service.XpPointService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.annotation.Resource;
|
|
/**
|
* token 控制
|
*
|
* @author ruoyi
|
*/
|
@Slf4j
|
@RestController
|
@Api(tags = "运维APP-地图导航")
|
public class IndexMapController {
|
@Autowired
|
private TokenService tokenService;
|
|
|
@Resource
|
private XpPointService xpPointService;
|
|
@Autowired
|
private RedisService redisService;
|
|
@ApiOperation(value = "地图导航")
|
@PostMapping("/api/v1/pointMap")
|
public R<PageInfo<XpPoint>> pointMap(@RequestBody PointMapQuery query) {
|
LoginOperationUser loginOperationUser = tokenService.getLoginOperationUser();
|
query.setOperationId(loginOperationUser.getId());
|
// 获取任务记录
|
PageInfo<XpPoint> pageInfo= xpPointService.pointMap( query);
|
return R.ok(pageInfo);
|
}
|
@ApiOperation(value = "点位详情")
|
@GetMapping("/api/v1/pointDetail")
|
public R<XpPoint> pointDetail(@RequestParam(value = "点位id", required = true)Long id) {
|
XpPoint xpPoint = xpPointService.getById(id);
|
return R.ok(xpPoint);
|
}
|
|
|
|
|
}
|