package com.newfiber.api.pc.controller; import com.newfiber.api.core.commons.ResultCode; import com.newfiber.api.core.commons.ResultObj; import com.newfiber.api.pc.model.meet.PeopleLocation; import com.newfiber.api.pc.model.vo.PeopleOnlineVo; import com.newfiber.api.pc.service.PeopleLocationService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; /** * 当前人员定位信息 * @description: TODO * @author: 张鸿志 * @date: 2021/1/6 19:48 * @version: v1.0 */ @RestController @RequestMapping("/location") @Api(value = "PeopleLocationController",tags = "更新当前登录手机APP用户的经纬度信息") @CrossOrigin public class PeopleLocationController { @Autowired private PeopleLocationService peopleLocationService; @PostMapping("/update") @ApiOperation("更新用户的经纬度信息") private ResultObj updateCurrentLocation(@RequestBody PeopleLocation peopleLocation){ peopleLocationService.updateCurrentLocationByUserNo(peopleLocation); return ResultObj.ok(); } @PostMapping("/selectByUserNo") @ApiOperation("获取传入用户编号的最新数据") private ResultObj<PeopleLocation> selectByUserNo(@RequestParam("userNo") String userNo){ return new ResultObj<>(ResultCode.OK,peopleLocationService.selectByUserNo(userNo)); } @PostMapping("/selectOnlineUser") @ApiOperation("应急指挥人员列表查询接口") public ResultObj<List<PeopleOnlineVo>> selectOnlineUser(){ return new ResultObj<List<PeopleOnlineVo>>(ResultCode.OK,peopleLocationService.selectOnlineUser()); } }