代码格式化

This commit is contained in:
守護
2024-05-09 22:18:02 +08:00
parent daea60f20f
commit 3473986b86
5 changed files with 311 additions and 309 deletions

View File

@@ -119,7 +119,7 @@ public class AssignmentController {
@ApiOperation(value = "导出") @ApiOperation(value = "导出")
@PostMapping(value = "/export") @PostMapping(value = "/export")
public void exportAssignments(@RequestParam(value = "ids") List<Long> ids, HttpServletResponse response) { public void exportAssignments(@RequestParam(value = "ids") List<Long> ids, HttpServletResponse response) {
assignmentService.exportAssignments(ids,response); assignmentService.exportAssignments(ids, response);
} }
} }

View File

@@ -147,7 +147,8 @@ public class AssignmentService {
public PageResult<AssignmentInfoResponse> listAll(AssignmentSearchRequest request) { public PageResult<AssignmentInfoResponse> listAll(AssignmentSearchRequest request) {
Supplier<List<AssignmentInfoResponse>> method = () -> { Supplier<List<AssignmentInfoResponse>> method = () -> {
List<AssignmentInfoResponse> assignmentInfoResponseList = ConverterFactory.getConverter(AssignmentInfoConverter.class) List<AssignmentInfoResponse> assignmentInfoResponseList = ConverterFactory.getConverter(
AssignmentInfoConverter.class)
.convert(assignmentTaskDAO.listAll(request.getSearchText())); .convert(assignmentTaskDAO.listAll(request.getSearchText()));
assignmentInfoResponseList.forEach((e) -> { assignmentInfoResponseList.forEach((e) -> {
AssignmentConfigEntity assignmentConfigEntity = this.assignmentConfigDAO.getByAssignmentTaskId(e.getId()); AssignmentConfigEntity assignmentConfigEntity = this.assignmentConfigDAO.getByAssignmentTaskId(e.getId());
@@ -380,7 +381,8 @@ public class AssignmentService {
AssignmentJobEntity assignmentJobEntity = this.assignmentJobMapper.selectOne( AssignmentJobEntity assignmentJobEntity = this.assignmentJobMapper.selectOne(
new LambdaQueryWrapper<AssignmentJobEntity>() new LambdaQueryWrapper<AssignmentJobEntity>()
.eq(AssignmentJobEntity::getAssignmentId, assignmentsDataResponse.getId()).orderByDesc(AssignmentJobEntity::getCreateTime) .eq(AssignmentJobEntity::getAssignmentId, assignmentsDataResponse.getId())
.orderByDesc(AssignmentJobEntity::getCreateTime)
.last(" limit 1 ")); .last(" limit 1 "));
Integer status = (assignmentJobEntity == null || assignmentJobEntity.getStatus() == null) ? Integer status = (assignmentJobEntity == null || assignmentJobEntity.getStatus() == null) ?
JobStatusEnum.INIT.getValue() : JobStatusEnum.INIT.getValue() :
@@ -388,6 +390,6 @@ public class AssignmentService {
assignmentsDataResponse.setRunStatus(JobStatusEnum.of(status).getName()); assignmentsDataResponse.setRunStatus(JobStatusEnum.of(status).getName());
assignmentsDataResponses.add(assignmentsDataResponse); assignmentsDataResponses.add(assignmentsDataResponse);
} }
EasyexcelUtils.write(response,AssignmentsDataResponse.class,assignmentsDataResponses,"任务管理","任务管理列表"); EasyexcelUtils.write(response, AssignmentsDataResponse.class, assignmentsDataResponses, "任务管理", "任务管理列表");
} }
} }

View File

@@ -84,9 +84,9 @@ public final class JdbcUrlUtils {
return true; return true;
} }
public static String getTemplateUrl(String url){ public static String getTemplateUrl(String url) {
return url.replaceAll("\\[(\\?|;|:)\\{params}\\]|\\[|\\]", "") return url.replaceAll("\\[(\\?|;|:)\\{params}\\]|\\[|\\]", "")
.replace("\\?{params}",""); .replace("\\?{params}", "");
} }
/** /**