Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
walker-sheng 2021-09-15 17:37:47 +08:00
commit 2f64748166
3 changed files with 26 additions and 22 deletions

View File

@ -154,9 +154,6 @@ public class DraftMapController {
iDraftMapService.createFrom(draftMapVO.getId(), draftMapVO.getName(), user);
}
/**
* 删除地图草稿
*/
/**
*删除地图草稿
*/
@ -165,6 +162,11 @@ public class DraftMapController {
iDraftMapService.deleteMap(id, user);
}
@DeleteMapping(path = "/delete/all")
public void clearAllMap(@RequestAttribute AccountVO user) {
this.iDraftMapService.deleteAllUserDraftMap(user);
}
/**
*数据校验
*/

View File

@ -16,17 +16,7 @@ import club.joylink.rtss.vo.client.TreeNode;
import club.joylink.rtss.vo.client.map.*;
import club.joylink.rtss.vo.map.*;
import club.joylink.rtss.vo.map.graph.MapSectionNewVO;
import club.joylink.rtss.vo.map.logic.MapAutoReentryVO;
import club.joylink.rtss.vo.map.logic.MapAutoSignalNewVO;
import club.joylink.rtss.vo.map.logic.MapDestinationCodeDefinitionVO;
import club.joylink.rtss.vo.map.logic.MapOverlapVO;
import club.joylink.rtss.vo.map.logic.MapRouteFlankProtectionNewVO;
import club.joylink.rtss.vo.map.logic.MapRouteNewVO;
import club.joylink.rtss.vo.map.logic.MapRouteOverrunVO;
import club.joylink.rtss.vo.map.logic.MapRoutingDataVO;
import club.joylink.rtss.vo.map.logic.MapSignalApproachSectionVO;
import club.joylink.rtss.vo.map.logic.MapStationParkingTimeVO;
import club.joylink.rtss.vo.map.logic.MapStationRunLevelVO;
import club.joylink.rtss.vo.map.logic.*;
import club.joylink.rtss.vo.map.query.MapAutoReentryQueryVO;
import club.joylink.rtss.vo.map.query.MapDestinationCodeDefinitionQueryVO;
import club.joylink.rtss.vo.map.query.MapParkTimeQueryVO;
@ -407,6 +397,15 @@ public class DraftMapService implements IDraftMapService {
draftMapDAO.deleteByPrimaryKey(id);
}
@Override
public void deleteAllUserDraftMap(AccountVO user) {
DraftMapExample example = new DraftMapExample();
example.createCriteria()
.andAuthorIdEqualTo(user.getId());
List<DraftMap> maps = this.draftMapDAO.selectByExample(example);
maps.forEach(map -> this.deleteMap(map.getId(), user));
}
private void confirmDraftMapNameNotExist(DraftMap map) {
BusinessExceptionAssertEnum.DATA_UNIQUE_PROPERTY_REPEAT.assertNotTrue(checkDraftMapNameExist(map));
}

View File

@ -5,14 +5,11 @@ import club.joylink.rtss.vo.client.PageQueryVO;
import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.TreeNode;
import club.joylink.rtss.vo.client.map.*;
import club.joylink.rtss.vo.map.*;
import club.joylink.rtss.vo.map.logic.MapAutoReentryVO;
import club.joylink.rtss.vo.map.logic.MapAutoSignalNewVO;
import club.joylink.rtss.vo.map.logic.MapDestinationCodeDefinitionVO;
import club.joylink.rtss.vo.map.logic.MapRouteNewVO;
import club.joylink.rtss.vo.map.logic.MapRoutingDataVO;
import club.joylink.rtss.vo.map.logic.MapSignalApproachSectionVO;
import club.joylink.rtss.vo.map.logic.MapStationParkingTimeVO;
import club.joylink.rtss.vo.map.Map3dDataVO;
import club.joylink.rtss.vo.map.MapCheckConfig;
import club.joylink.rtss.vo.map.MapGraphDataNewVO;
import club.joylink.rtss.vo.map.MapVO;
import club.joylink.rtss.vo.map.logic.*;
import club.joylink.rtss.vo.map.query.MapAutoReentryQueryVO;
import club.joylink.rtss.vo.map.query.MapDestinationCodeDefinitionQueryVO;
import club.joylink.rtss.vo.map.query.MapParkTimeQueryVO;
@ -143,6 +140,12 @@ public interface IDraftMapService {
*/
void deleteMap(Long id, AccountVO user);
/**
* 清空用户所有草稿地图数据
* @param user
*/
void deleteAllUserDraftMap(AccountVO user);
/**
* 创建联动道岔关系
* @param vo