Commit ebbcbdf1 authored by lixiaolei's avatar lixiaolei

submit

parent 188b4609
...@@ -19,6 +19,7 @@ import javax.servlet.http.HttpServletRequest; ...@@ -19,6 +19,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -68,6 +69,8 @@ public class BusinessFileController extends BaseController { ...@@ -68,6 +69,8 @@ public class BusinessFileController extends BaseController {
List<BusinessFileVo> allFileName = FileUtils.getAllFileNames(filePath.getFilePath()); List<BusinessFileVo> allFileName = FileUtils.getAllFileNames(filePath.getFilePath());
allFiles = allFileName.stream().filter(p -> p.getFilePath().contains(filePath.getKeyword())).collect(Collectors.toList()); allFiles = allFileName.stream().filter(p -> p.getFilePath().contains(filePath.getKeyword())).collect(Collectors.toList());
} }
//文件按照时间倒序
allFiles = allFiles.stream().sorted(Comparator.comparing(BusinessFileVo::getCreatTime).reversed()).collect(Collectors.toList());
return getDataTable(allFiles); return getDataTable(allFiles);
} }
......
...@@ -15,6 +15,6 @@ public class BusinessFileVo { ...@@ -15,6 +15,6 @@ public class BusinessFileVo {
public BusinessFileVo(String filePath, String creatTime) { public BusinessFileVo(String filePath, String creatTime) {
this.filePath = filePath; this.filePath = filePath;
this.creatTime = creatTime; this.creatTime = creatTime == null ? "" : creatTime;
} }
} }
...@@ -337,12 +337,12 @@ ...@@ -337,12 +337,12 @@
<if test="buildProperty != null">build_property = #{buildProperty},</if> <if test="buildProperty != null">build_property = #{buildProperty},</if>
<if test="planCompleteTime != null">plan_complete_time = #{planCompleteTime},</if> <if test="planCompleteTime != null">plan_complete_time = #{planCompleteTime},</if>
<if test="projectDetails != null">project_details = #{projectDetails},</if> <if test="projectDetails != null">project_details = #{projectDetails},</if>
<if test="provinceName != null">province_name = #{provinceName},</if> province_name = #{provinceName},
<if test="provinceId != null">province_id = #{provinceId},</if> province_id = #{provinceId},
<if test="cityName != null">city_name = #{cityName},</if> city_name = #{cityName},
<if test="cityId != null">city_id = #{cityId},</if> city_id = #{cityId},
<if test="districtName != null">district_name = #{districtName},</if> district_name = #{districtName},
<if test="districtId != null">district_id = #{districtId},</if> district_id = #{districtId},
<if test="projectType != null">project_type = #{projectType},</if> <if test="projectType != null">project_type = #{projectType},</if>
<if test="projectCategory != null">project_category = #{projectCategory},</if> <if test="projectCategory != null">project_category = #{projectCategory},</if>
<if test="isPrivate != null">is_private = #{isPrivate},</if> <if test="isPrivate != null">is_private = #{isPrivate},</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment