添加用户定位ID
This commit is contained in:
parent
6b8bb6c308
commit
02782aca97
@ -41,7 +41,8 @@ public class UserRealtimeLocationServiceImpl extends DefaultBaseService implemen
|
|||||||
@Override
|
@Override
|
||||||
public void save(UserLocationVO userLocationVO) {
|
public void save(UserLocationVO userLocationVO) {
|
||||||
userLocationVO.setGmtCreate(DateUtil.getTime());
|
userLocationVO.setGmtCreate(DateUtil.getTime());
|
||||||
userLocationService.save(userLocationVO.getCreator(), userLocationVO);
|
String userLocationId = userLocationService.saveAndReturnId(userLocationVO.getCreator(), userLocationVO);
|
||||||
|
userLocationVO.setUserLocationId(userLocationId);
|
||||||
mongoTemplate.insert(userLocationVO, MongoCollectionEnum.USER_REALTIME_LOCATION.getCollection());
|
mongoTemplate.insert(userLocationVO, MongoCollectionEnum.USER_REALTIME_LOCATION.getCollection());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,12 +35,6 @@
|
|||||||
<!-- 表头按钮组 -->
|
<!-- 表头按钮组 -->
|
||||||
<script type="text/html" id="headerToolBar">
|
<script type="text/html" id="headerToolBar">
|
||||||
<div class="layui-btn-group">
|
<div class="layui-btn-group">
|
||||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
|
||||||
<i class="fa fa-lg fa-plus"></i> 新增
|
|
||||||
</button>
|
|
||||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
|
||||||
<i class="fa fa-lg fa-edit"></i> 编辑
|
|
||||||
</button>
|
|
||||||
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||||
<i class="fa fa-lg fa-trash"></i> 删除
|
<i class="fa fa-lg fa-trash"></i> 删除
|
||||||
</button>
|
</button>
|
||||||
@ -223,39 +217,7 @@
|
|||||||
var layEvent = obj.event;
|
var layEvent = obj.event;
|
||||||
var checkStatus = table.checkStatus('dataTable');
|
var checkStatus = table.checkStatus('dataTable');
|
||||||
var checkDatas = checkStatus.data;
|
var checkDatas = checkStatus.data;
|
||||||
if(layEvent === 'saveEvent') {
|
if(layEvent === 'removeEvent') {
|
||||||
layer.open({
|
|
||||||
type: 2,
|
|
||||||
title: false,
|
|
||||||
closeBtn: 0,
|
|
||||||
area: ['100%', '100%'],
|
|
||||||
shadeClose: true,
|
|
||||||
anim: 2,
|
|
||||||
content: top.restAjax.path('route/user-location/save', []),
|
|
||||||
end: function() {
|
|
||||||
reloadTable();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else if(layEvent === 'updateEvent') {
|
|
||||||
if(checkDatas.length === 0) {
|
|
||||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
|
||||||
} else if(checkDatas.length > 1) {
|
|
||||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
|
||||||
} else {
|
|
||||||
layer.open({
|
|
||||||
type: 2,
|
|
||||||
title: false,
|
|
||||||
closeBtn: 0,
|
|
||||||
area: ['100%', '100%'],
|
|
||||||
shadeClose: true,
|
|
||||||
anim: 2,
|
|
||||||
content: top.restAjax.path('route/user-location/update?userLocationId={userLocationId}', [checkDatas[0].userLocationId]),
|
|
||||||
end: function() {
|
|
||||||
reloadTable();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else if(layEvent === 'removeEvent') {
|
|
||||||
if(checkDatas.length === 0) {
|
if(checkDatas.length === 0) {
|
||||||
top.dialog.msg(top.dataMessage.table.selectDelete);
|
top.dialog.msg(top.dataMessage.table.selectDelete);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user