feat:优化空域批量移动接口
This commit is contained in:
parent
eee07c4590
commit
e4f04856c3
|
|
@ -35,12 +35,11 @@ public interface IAirlineFileGroupInfoDomain {
|
|||
/**
|
||||
* 移动分组详情到新分组
|
||||
*
|
||||
* @param oldGroupId 原分组ID
|
||||
* @param newGroupId 新分组ID
|
||||
* @param airlineId 航线文件ID
|
||||
* @return 结果
|
||||
*/
|
||||
Long moveGroupInfo(Long oldGroupId, Long newGroupId, Long airlineId);
|
||||
Long moveGroupInfo(Long newGroupId, Long airlineId);
|
||||
|
||||
/**
|
||||
* 批量删除分组详情
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@ public class AirlineFileGroupInfoDomainImpl implements IAirlineFileGroupInfoDoma
|
|||
}
|
||||
|
||||
@Override
|
||||
public Long moveGroupInfo(Long oldGroupId, Long newGroupId, Long airlineId) {
|
||||
return airlineFileGroupInfoMapper.updateGroupId(oldGroupId, newGroupId, airlineId);
|
||||
public Long moveGroupInfo(Long newGroupId, Long airlineId) {
|
||||
return airlineFileGroupInfoMapper.updateGroupId(newGroupId, airlineId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -30,12 +30,11 @@ public interface AirlineFileGroupInfoMapper {
|
|||
/**
|
||||
* 更新分组ID,将航线文件从一个分组移动到另一个分组
|
||||
*
|
||||
* @param oldGroupId 原分组ID
|
||||
* @param newGroupId 新分组ID
|
||||
* @param airlineId 航线文件ID
|
||||
* @return 影响的行数
|
||||
*/
|
||||
Long updateGroupId(Long oldGroupId, Long newGroupId, Long airlineId);
|
||||
Long updateGroupId(Long newGroupId, Long airlineId);
|
||||
|
||||
/**
|
||||
* 批量删除分组详情
|
||||
|
|
|
|||
|
|
@ -95,8 +95,8 @@ public class AirlineFileServiceGroupInfoImpl implements IAirlineFileGroupInfoSer
|
|||
@Override
|
||||
public Long moveGroupInfo(AirlineFileGroupInfoDTO dto, Long groupId) throws BaseException {
|
||||
// 检查参数
|
||||
if (dto.getGroupId() == null || dto.getAirlineId() == null || groupId == null) {
|
||||
throw new BaseException("原分组ID、新分组ID和航线文件ID不能为空");
|
||||
if (dto.getAirlineId() == null || groupId == null) {
|
||||
throw new BaseException("新分组ID和航线文件ID不能为空");
|
||||
}
|
||||
AirlineFileDTO airlineFile = iAirlineFileService.selectById(dto.getAirlineId());
|
||||
String name = airlineFile.getName();
|
||||
|
|
@ -107,7 +107,7 @@ public class AirlineFileServiceGroupInfoImpl implements IAirlineFileGroupInfoSer
|
|||
iAirlineFileService.update(airlineFile);
|
||||
|
||||
// 调用domain层移动方法
|
||||
return iAirlineFileGroupInfoDomain.moveGroupInfo(dto.getGroupId(), groupId, dto.getAirlineId());
|
||||
return iAirlineFileGroupInfoDomain.moveGroupInfo(groupId, dto.getAirlineId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -74,7 +74,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
set group_id = #{newGroupId},
|
||||
update_time = now()
|
||||
where del_flag = 0
|
||||
and group_id = #{oldGroupId}
|
||||
and airline_id = #{airlineId}
|
||||
</update>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue