IM 聊天记录
This commit is contained in:
@@ -2,6 +2,16 @@
|
|||||||
<div id="content">
|
<div id="content">
|
||||||
<div id="map" ref="map" style="width: 100vw; height: 100vh"/>
|
<div id="map" ref="map" style="width: 100vw; height: 100vh"/>
|
||||||
<div id="overlay-box"/>
|
<div id="overlay-box"/>
|
||||||
|
|
||||||
|
<div class="timeSelectBox" v-if="page=='planningPath'">
|
||||||
|
<div class="timeSelectBoxItem">
|
||||||
|
<van-button :type="routeType=='car'?'primary':'default'" @click="routeType='car'">驾 车</van-button>
|
||||||
|
</div>
|
||||||
|
<div class="timeSelectBoxItem">
|
||||||
|
<van-button :type="routeType=='foot'?'primary':'default'" @click="routeType='foot'">步行骑行</van-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="addAlarmPoint" v-if="page=='addAlarmPoint'">
|
<div class="addAlarmPoint" v-if="page=='addAlarmPoint'">
|
||||||
<div class="addAlarmPointNext" @click="addAlarmPointNextAction">下一步</div>
|
<div class="addAlarmPointNext" @click="addAlarmPointNextAction">下一步</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -78,6 +88,12 @@ export default {
|
|||||||
geometryMove: {},
|
geometryMove: {},
|
||||||
featureMove: {},
|
featureMove: {},
|
||||||
styles: {
|
styles: {
|
||||||
|
routeFoot: new Style({
|
||||||
|
stroke: new Stroke({
|
||||||
|
width: 6,
|
||||||
|
color: "#07FA66",
|
||||||
|
}),
|
||||||
|
}),
|
||||||
route: new Style({
|
route: new Style({
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
width: 6,
|
width: 6,
|
||||||
@@ -127,7 +143,8 @@ export default {
|
|||||||
planningVectorLayer: {},
|
planningVectorLayer: {},
|
||||||
parentPostMessageData: [],
|
parentPostMessageData: [],
|
||||||
isCanDraw: true,
|
isCanDraw: true,
|
||||||
from: ""
|
from: "",
|
||||||
|
routeType: "car",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -271,8 +288,6 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 切片方案(0-18级
|
// 切片方案(0-18级
|
||||||
const projection = getProjection('EPSG:3857');
|
const projection = getProjection('EPSG:3857');
|
||||||
const projectionExtent = projection.getExtent();
|
const projectionExtent = projection.getExtent();
|
||||||
@@ -373,6 +388,95 @@ export default {
|
|||||||
this.addPoints(e.coordinate);
|
this.addPoints(e.coordinate);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
planningPathFoot() {
|
||||||
|
const startPoint = ol.proj.transform(this.navigationStartPoint, 'EPSG:4326', 'EPSG:3857');
|
||||||
|
const endPoint = ol.proj.transform(this.navigationEndPoint, 'EPSG:4326', 'EPSG:3857');
|
||||||
|
let _url = "https://172.16.3.19/route/v1/driving/"
|
||||||
|
_url = _url + this.navigationStartPoint[0] + ","
|
||||||
|
_url = _url + this.navigationStartPoint[1] + ";"
|
||||||
|
_url = _url + this.navigationEndPoint[0] + ","
|
||||||
|
_url = _url + this.navigationEndPoint[1]
|
||||||
|
_url = _url + "?" + "overview=false&alternatives=true&steps=true";
|
||||||
|
|
||||||
|
|
||||||
|
axios({
|
||||||
|
method: "get",
|
||||||
|
url: _url,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=utf-8'
|
||||||
|
},
|
||||||
|
}).then(res => {
|
||||||
|
console.log("================================获取到了导航结果")
|
||||||
|
|
||||||
|
res=res.data;
|
||||||
|
|
||||||
|
/*
|
||||||
|
console.log(res)
|
||||||
|
if (res.code != "OK") {
|
||||||
|
return false;
|
||||||
|
}else {
|
||||||
|
console.log("================================获取到了导航结果,开始步行导航")
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
let pathList = [startPoint];
|
||||||
|
|
||||||
|
const steps=res.routes[0].legs[0].steps
|
||||||
|
|
||||||
|
steps.map(item0=>{
|
||||||
|
item0.intersections.map(item1=>{
|
||||||
|
const _point = ol.proj.transform(item1.location,'EPSG:4326', 'EPSG:3857');
|
||||||
|
pathList.push(_point)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// let _list=res.route[0].legs[0].steps[0].intersections
|
||||||
|
//
|
||||||
|
// _list.map((item, index) => {
|
||||||
|
//
|
||||||
|
// })
|
||||||
|
pathList.push(endPoint)
|
||||||
|
console.log("==============================pathList")
|
||||||
|
console.log(pathList)
|
||||||
|
|
||||||
|
const route = new LineString(pathList)
|
||||||
|
|
||||||
|
const geometryMove = new Point(route.getFirstCoordinate());
|
||||||
|
|
||||||
|
const featureMove = new Feature({
|
||||||
|
type: "featureMove",
|
||||||
|
geometry: geometryMove,
|
||||||
|
});
|
||||||
|
// this.planningVectorLayer.set('id', 'planningVectorLayer');
|
||||||
|
//先清空 再清除
|
||||||
|
this.map.removeLayer(this.planningVectorLayer)
|
||||||
|
this.planningVectorLayer = new VectorLayer({
|
||||||
|
source: new VectorSource({
|
||||||
|
features: [
|
||||||
|
new Feature({
|
||||||
|
type: "routeFoot",
|
||||||
|
geometry: route,
|
||||||
|
}),
|
||||||
|
featureMove,
|
||||||
|
new Feature({
|
||||||
|
type: "icon",
|
||||||
|
geometry: new Point(route.getFirstCoordinate()),
|
||||||
|
}),
|
||||||
|
new Feature({
|
||||||
|
type: "icon",
|
||||||
|
geometry: new Point(route.getLastCoordinate()),
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
style: (feature) => {
|
||||||
|
return this.styles[feature.get("type")];
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
this.map.addLayer(this.planningVectorLayer)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
planningPath() {
|
planningPath() {
|
||||||
|
|
||||||
@@ -914,7 +1018,12 @@ export default {
|
|||||||
this.navigationEndPoint = res.data.result.location.split(",")
|
this.navigationEndPoint = res.data.result.location.split(",")
|
||||||
this.addPointWidthCoordinate(res.data.result.location, "alarm", res.data.result)
|
this.addPointWidthCoordinate(res.data.result.location, "alarm", res.data.result)
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
|
if (this.routeType == "car") {
|
||||||
this.planningPath()
|
this.planningPath()
|
||||||
|
}
|
||||||
|
if (this.routeType == "foot") {
|
||||||
|
this.planningPathFoot()
|
||||||
|
}
|
||||||
}, 2000)
|
}, 2000)
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1189,4 +1298,21 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.timeSelectBox {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
z-index: 100;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ export default {
|
|||||||
this.patrolInstanceId = this.$route.query.patrolInstanceId||getUrlParam("patrolInstanceId");
|
this.patrolInstanceId = this.$route.query.patrolInstanceId||getUrlParam("patrolInstanceId");
|
||||||
this.equipmentId = this.$route.query.equipmentId||getUrlParam("equipmentId");
|
this.equipmentId = this.$route.query.equipmentId||getUrlParam("equipmentId");
|
||||||
this.moveUserId = this.$route.query.uerId||getUrlParam("uerId");
|
this.moveUserId = this.$route.query.uerId||getUrlParam("uerId");
|
||||||
this.busId = this.$route.query.uerId||getUrlParam("busId");
|
this.busId = this.$route.query.busId||getUrlParam("busId");
|
||||||
|
|
||||||
this.token = getUrlParam("token")
|
this.token = getUrlParam("token")
|
||||||
|
|
||||||
@@ -1128,7 +1128,7 @@ export default {
|
|||||||
|
|
||||||
service.get(`/middlegroundPeriodicWorkOrderInstance/queryById`, {
|
service.get(`/middlegroundPeriodicWorkOrderInstance/queryById`, {
|
||||||
params: {
|
params: {
|
||||||
id: this.patrolInstanceId
|
id: this.busId
|
||||||
}
|
}
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
|
|||||||
@@ -86,6 +86,9 @@ import {OL as ol} from "plot-ol/plottingol";
|
|||||||
import GeoJSON from 'ol/format/GeoJSON'
|
import GeoJSON from 'ol/format/GeoJSON'
|
||||||
import service from "@/utils/service";
|
import service from "@/utils/service";
|
||||||
import {appInit, getStatisFileUrl,getUrlParam} from "../utils/publicFun";
|
import {appInit, getStatisFileUrl,getUrlParam} from "../utils/publicFun";
|
||||||
|
import WMTSTileGrid from 'ol/tilegrid/WMTS.js';
|
||||||
|
import {get as getProjection} from 'ol/proj.js';
|
||||||
|
import {getTopLeft, getWidth} from 'ol/extent.js';
|
||||||
|
|
||||||
|
|
||||||
import dayjs from "dayjs"
|
import dayjs from "dayjs"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
password: beAs0LHX2GyTxMw4
|
password: beAs0LHX2GyTxMw4
|
||||||
url: jdbc:mysql://43.139.191.204:3306:3306/im-core?serverTimezone=UTC&useSSL=false&characterEncoding=UTF8
|
url: jdbc:mysql://43.139.191.204:3306/im-core?serverTimezone=UTC&useSSL=false&characterEncoding=UTF8
|
||||||
username: root
|
username: root
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
|
|||||||
@@ -43,10 +43,11 @@ public class ImCallHistoryController {
|
|||||||
if(req.getLimit()!=null){
|
if(req.getLimit()!=null){
|
||||||
Page<ImCallHistoryEntity> objectPage = new Page<>(req.getOffset(),req.getLimit());
|
Page<ImCallHistoryEntity> objectPage = new Page<>(req.getOffset(),req.getLimit());
|
||||||
QueryWrapper<ImCallHistoryEntity> query=new QueryWrapper<>();
|
QueryWrapper<ImCallHistoryEntity> query=new QueryWrapper<>();
|
||||||
query.eq("invite_id",req.getUid());
|
// query.eq("invite_id",req.getUid());
|
||||||
query.orderByDesc("create_time");
|
query.orderByDesc("create_time");
|
||||||
IPage<ImCallHistoryEntity> imCallHistoryEntityIPage=callHistoryMapper.selectPage(objectPage,query);
|
IPage<ImCallHistoryEntity> imCallHistoryEntityIPage=callHistoryMapper.selectPage(objectPage,query);
|
||||||
|
|
||||||
|
|
||||||
return ResponseVO.successResponse(imCallHistoryEntityIPage);
|
return ResponseVO.successResponse(imCallHistoryEntityIPage);
|
||||||
}else {
|
}else {
|
||||||
return ResponseVO.errorResponse();
|
return ResponseVO.errorResponse();
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.lld.im.service.message.model.req.SendMessageReq;
|
|||||||
import com.lld.im.service.message.model.resp.ImMessageHistoryVo;
|
import com.lld.im.service.message.model.resp.ImMessageHistoryVo;
|
||||||
import com.lld.im.service.message.service.MessageSyncService;
|
import com.lld.im.service.message.service.MessageSyncService;
|
||||||
import com.lld.im.service.message.service.P2PMessageService;
|
import com.lld.im.service.message.service.P2PMessageService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
@@ -21,6 +22,7 @@ import java.util.List;
|
|||||||
* @author: lld
|
* @author: lld
|
||||||
* @version: 1.0
|
* @version: 1.0
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("v1/message")
|
@RequestMapping("v1/message")
|
||||||
public class MessageController {
|
public class MessageController {
|
||||||
@@ -73,6 +75,9 @@ public class MessageController {
|
|||||||
@RequestMapping("/chatHistory")
|
@RequestMapping("/chatHistory")
|
||||||
public ResponseVO chatHistory(@RequestBody
|
public ResponseVO chatHistory(@RequestBody
|
||||||
@Validated ChatHistoryReq chatHistoryReq, Integer appId) {
|
@Validated ChatHistoryReq chatHistoryReq, Integer appId) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
chatHistoryReq.setAppId(appId);
|
chatHistoryReq.setAppId(appId);
|
||||||
List<ImMessageHistoryVo> imMessageHistoryVos = messageSyncService.chatHistory(chatHistoryReq);
|
List<ImMessageHistoryVo> imMessageHistoryVos = messageSyncService.chatHistory(chatHistoryReq);
|
||||||
return ResponseVO.successResponse(imMessageHistoryVos);
|
return ResponseVO.successResponse(imMessageHistoryVos);
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import java.util.Objects;
|
|||||||
* @author: lld
|
* @author: lld
|
||||||
* @version: 1.0
|
* @version: 1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class ChatOperateReceiver {
|
public class ChatOperateReceiver {
|
||||||
|
|
||||||
|
|||||||
@@ -179,6 +179,9 @@ public class MessageSyncService {
|
|||||||
.orderByDesc(ImMessageHistoryEntity::getMessageKey);
|
.orderByDesc(ImMessageHistoryEntity::getMessageKey);
|
||||||
Page<ImMessageHistoryEntity> imMessageHistoryEntities = imMessageHistoryMapper.selectPage(objectPage,and);
|
Page<ImMessageHistoryEntity> imMessageHistoryEntities = imMessageHistoryMapper.selectPage(objectPage,and);
|
||||||
List<Long> messageKeys = imMessageHistoryEntities.getRecords().stream().map(x -> x.getMessageKey()).collect(Collectors.toList());
|
List<Long> messageKeys = imMessageHistoryEntities.getRecords().stream().map(x -> x.getMessageKey()).collect(Collectors.toList());
|
||||||
|
if (messageKeys.size() == 0) {
|
||||||
|
return new ArrayList<ImMessageHistoryVo>();
|
||||||
|
}
|
||||||
List<ImMessageBodyEntity> imMessageBodyEntities = imMessageBodyMapper.selectList(new LambdaQueryWrapper<ImMessageBodyEntity>().in(ImMessageBodyEntity::getMessageKey, messageKeys));
|
List<ImMessageBodyEntity> imMessageBodyEntities = imMessageBodyMapper.selectList(new LambdaQueryWrapper<ImMessageBodyEntity>().in(ImMessageBodyEntity::getMessageKey, messageKeys));
|
||||||
Map<Long, ImMessageBodyEntity> collect = imMessageBodyEntities.stream().collect(Collectors.toMap(ImMessageBodyEntity::getMessageKey, x -> x));
|
Map<Long, ImMessageBodyEntity> collect = imMessageBodyEntities.stream().collect(Collectors.toMap(ImMessageBodyEntity::getMessageKey, x -> x));
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ public class SRSStreamTask {
|
|||||||
@Scheduled(cron="0/5 * * * * ? ")
|
@Scheduled(cron="0/5 * * * * ? ")
|
||||||
public void executeTask(){
|
public void executeTask(){
|
||||||
String ip = System.getenv("SRS_HOST");
|
String ip = System.getenv("SRS_HOST");
|
||||||
|
//
|
||||||
log.error("213132");
|
// log.error("213132");
|
||||||
log.info("========定时任务");
|
// log.info("========定时任务");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
spring:
|
spring:
|
||||||
profiles:
|
profiles:
|
||||||
active: dev
|
active: prod
|
||||||
|
|||||||
@@ -314,6 +314,14 @@ export class ImClient {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getChatMessageHistoryList(uid:String,offset:Long,limit:Long): Promise<any> {
|
||||||
|
return new Promise((resolve, _) => {
|
||||||
|
let api = new HttpApi(this.httpUrl);
|
||||||
|
let resp = api.call("/message/chatHistory", this.getRequestParams(), { userId: uid,appId:this.appId,offset:offset, limit:limit,operater:this.userId })
|
||||||
|
resolve(resp);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public createRoom(room:any): Promise<any> {
|
public createRoom(room:any): Promise<any> {
|
||||||
return new Promise((resolve,_)=>{
|
return new Promise((resolve,_)=>{
|
||||||
|
|||||||
Reference in New Issue
Block a user