Compare commits
No commits in common. "bd79084fa0e2277e33261bdde90d336aace16641" and "7252f19a4b2ade4f791a4eb70772de841098cbbd" have entirely different histories.
bd79084fa0
...
7252f19a4b
|
|
@ -71,13 +71,9 @@ public class AirlineFileServiceImpl implements IAirlineFileService {
|
|||
if (originalFilename != null && originalFilename.lastIndexOf('.') > 0) {
|
||||
fileExtension = originalFilename.substring(originalFilename.lastIndexOf('.') + 1).toLowerCase();
|
||||
}
|
||||
int pos = 0;
|
||||
if (originalFilename != null) {
|
||||
pos = originalFilename.lastIndexOf(".");
|
||||
}
|
||||
int pos = originalFilename.lastIndexOf(".");
|
||||
String fileNameWithoutExtension = pos > 0 ? originalFilename.substring(0, pos) : originalFilename;
|
||||
String newFileName = getNewFileNameLikeByGroupId(fileNameWithoutExtension, groupId);
|
||||
log.info("filename :{}, new filename :{}",fileNameWithoutExtension, newFileName);
|
||||
try {
|
||||
if ("zip".equals(fileExtension) || "kmz".equals(fileExtension)) {
|
||||
// 处理ZIP/KMZ文件
|
||||
|
|
@ -113,10 +109,12 @@ public class AirlineFileServiceImpl implements IAirlineFileService {
|
|||
// 直接处理Waypoints文件
|
||||
AirlineFileDTO dto = new AirlineFileDTO();
|
||||
// 去除文件名中的后缀名
|
||||
|
||||
|
||||
dto.setName(newFileName);
|
||||
dto.setFileName(originalFilename);
|
||||
// 直接读取文件内容并上传
|
||||
R<String> fileUrl = remoteFileService.uploadFileByData(UUID.randomUUID().toString(), "waypoints", new String(file.getBytes()));
|
||||
R<String> fileUrl = remoteFileService.uploadFileByData(UUID.randomUUID().toString(), "waypoints", Arrays.toString(file.getBytes()));
|
||||
dto.setFileUrl(fileUrl.getData());
|
||||
dto.setAirVendor("");
|
||||
dto.setAirType("");
|
||||
|
|
|
|||
|
|
@ -20,17 +20,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<!-- 查询分组详情列表 -->
|
||||
<select id="selectGroupList" parameterType="com.ruoyi.airline.mapper.entity.AirlineFileGroupInfoEntity" resultMap="AirlineFileGroupInfoResult">
|
||||
select afgi.id, afgi.group_id, afgi.airline_id, afgi.create_by, afgi.create_time, afgi.update_by, afgi.update_time, afgi.del_flag, afgi.deleted_by, afgi.deleted_time
|
||||
from airline_file_group_info afgi
|
||||
inner join airline_file af on afgi.airline_id = af.id
|
||||
where afgi.del_flag = 0
|
||||
select id, group_id, airline_id, create_by, create_time, update_by, update_time, del_flag, deleted_by, deleted_time
|
||||
from airline_file_group_info
|
||||
where del_flag = 0
|
||||
<if test="groupId != null">
|
||||
and afgi.group_id = #{groupId}
|
||||
and group_id = #{groupId}
|
||||
</if>
|
||||
<if test="airlineId != null">
|
||||
and afgi.airline_id = #{airlineId}
|
||||
and airline_id = #{airlineId}
|
||||
</if>
|
||||
order by af.update_time desc
|
||||
order by update_time ASC
|
||||
</select>
|
||||
|
||||
<!-- 删除分组详情(软删除) -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue