分页查询和删除
All checks were successful
JslGroup/JslDeveloper/JSL_OrganizeInternalOA/pipeline/head This commit looks good

This commit is contained in:
176yunxuan 2024-03-21 21:58:57 +08:00
parent e16dc1f745
commit 5d046f4a04
2 changed files with 18 additions and 0 deletions

View File

@ -33,6 +33,8 @@ public class ProjectDAO {
public void projectAdd(ProjectInfoVO projectAdd) { public void projectAdd(ProjectInfoVO projectAdd) {
log.info("\t> 执行 DAO 层 ProjectDAO.projectAdd 方法"); log.info("\t> 执行 DAO 层 ProjectDAO.projectAdd 方法");
log.info("\t\t> 从 MySQL 获取数据"); log.info("\t\t> 从 MySQL 获取数据");
projectMapper.projectAdd(projectAdd); projectMapper.projectAdd(projectAdd);
} }

View File

@ -58,7 +58,23 @@ public class ProjectServiceImpl implements ProjectService {
log.info("\t> 执行 Service 层 ProjectService.projectAdd 方法"); log.info("\t> 执行 Service 层 ProjectService.projectAdd 方法");
if(projectAdd.getDescription().isEmpty()){ if(projectAdd.getDescription().isEmpty()){
projectAdd.setDescription("{}"); projectAdd.setDescription("{}");
}else {
projectAdd.setDescription("{\"description\":\" "+ projectAdd.getDescription() + "\"}");
} }
String tags = projectAdd.getTags();
String[] split = tags.split(",");
String open = "{\"tags\":[\"";
String close = "]}";
String tag = "";
for (String tag1:split){
tag += tag1 + "\",\"";
}if (!tag.isEmpty()) {
tag = tag.substring(0, tag.length() - 2);
}
projectAdd.setTags(open + tag + close);
projectAdd.setFile("{\"URI\":\"" + projectAdd.getFile() + "\"}");
projectDAO.projectAdd(projectAdd); projectDAO.projectAdd(projectAdd);
return ResultUtil.success("添加成功"); return ResultUtil.success("添加成功");
} }