package org.springblade.modules.location.controller;
|
|
import io.swagger.annotations.ApiOperation;
|
import lombok.AllArgsConstructor;
|
import org.springblade.core.boot.ctrl.BladeController;
|
import org.springblade.core.tool.api.R;
|
import org.springblade.modules.location.entity.LivePersonLocation;
|
import org.springblade.modules.location.entity.Locus;
|
import org.springblade.modules.location.service.ILivePersonLocationService;
|
import org.springblade.modules.location.vo.LivePersonLocationVO;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
/**
|
* @author zhongrj
|
* @time 2021-07-21
|
* @desc 实时位置控制层
|
*/
|
@RestController
|
@AllArgsConstructor
|
@RequestMapping("/livePersonLocation")
|
public class LivePersonLocationController extends BladeController {
|
|
private final ILivePersonLocationService livePersonLocationService;
|
|
/**
|
* 新增
|
*/
|
@PostMapping("/save")
|
public R save(@RequestBody LivePersonLocation livePersonLocation) {
|
return R.status(livePersonLocationService.save(livePersonLocation));
|
}
|
|
|
/**
|
* 新增或更新位置信息
|
*/
|
@PostMapping("/saveOrUpdate")
|
public R saveOrUpdate(@RequestBody LivePersonLocation livePersonLocation) {
|
return R.status(livePersonLocationService.saveOrUpdate(livePersonLocation));
|
}
|
|
/**
|
* 新增或更新位置信息
|
*/
|
@GetMapping("/getList")
|
public R getList(LivePersonLocationVO livePersonLocation) {
|
List<LivePersonLocationVO> list = livePersonLocationService.getList(livePersonLocation);
|
return R.data(list);
|
}
|
}
|