Compare commits

...

4 Commits

Author SHA1 Message Date
176yunxuan
ea457a6604 增加标签字段
Some checks failed
JslGroup/JslDeveloper/JSL_OrganizeInternalOA/pipeline/head There was a failure building this commit
2024-03-15 21:19:23 +08:00
176yunxuan
d05c6141dc Merge branch 'feature'
All checks were successful
JslGroup/JslDeveloper/JSL_OrganizeInternalOA/pipeline/head This commit looks good
2024-03-15 20:40:27 +08:00
176yunxuan
746ddee34a 查询逻辑更改
All checks were successful
JslGroup/JslDeveloper/JSL_OrganizeInternalOA/pipeline/head This commit looks good
2024-03-15 18:47:52 +08:00
424fddd2ed Upload
All checks were successful
JslGroup/JslDeveloper/JSL_OrganizeInternalOA/pipeline/head This commit looks good
2024-03-15 17:39:06 +08:00
7 changed files with 27 additions and 22 deletions

View File

@ -65,7 +65,9 @@ public class ShiroConfiguration {
filterChainDefinitionMap.put("/project/get", "anon"); // 信息接口允许匿名访问
filterChainDefinitionMap.put("/project/get/custom", "anon"); // 游客获取项目允许匿名访问
filterChainDefinitionMap.put("/project/add", "anon"); // 信息接口允许匿名访问
filterChainDefinitionMap.put("/project/work/add", "anon"); // 信息接口允许匿名访问
filterChainDefinitionMap.put("/tags/project/list", "anon"); // 信息接口允许匿名访问
filterChainDefinitionMap.put("/module/add", "anon"); // 信息接口允许匿名访问
filterChainDefinitionMap.put("/**/**", "authc"); // 其他接口一律拦截(需要Token)

View File

@ -59,14 +59,15 @@ public class ProjectController {
/**
* 游客获取项目
*
* @return
*/
@GetMapping("/project/get/custom")
public BaseResponse projectGetCustom(@RequestParam(required = false) Integer id,
@RequestParam(required = false) List<String> tags,
@RequestParam(required = false) List<Integer> isFinish){
@RequestParam(required = false) List<Integer> isFinish) {
log.info("请求接口[GET]: /project/all/get");
return projectService.tget(id,tags,isFinish);
return projectService.tget(id, tags, isFinish);
}
@ -81,7 +82,7 @@ public class ProjectController {
@RequestParam(required = false) List<Integer> isFinish,
HttpServletRequest request) {
log.info("请求接口[GET]: /project/get");
return projectService.get(listAll,request,tags,isFinish);
return projectService.get(listAll, request, tags, isFinish);
}
/**
@ -96,7 +97,7 @@ public class ProjectController {
@RequestParam(required = false) Integer is,
HttpServletRequest request) {
log.info("请求接口[GET]: /project/work/get");
return projectService.workget(listAll, request, tags, isFinish,is);
return projectService.workget(listAll, request, tags, isFinish, is);
}
/**
@ -204,12 +205,13 @@ public class ProjectController {
if (bindingResult.hasErrors()) {
return ResultUtil.error(ErrorCode.REQUEST_BODY_ERROR, Processing.getValidatedErrorList(bindingResult));
}
return projectService.projectEdit(request, projectEdit,projectId);
return projectService.projectEdit(request, projectEdit, projectId);
}
/**
* 子系统子模块的增加
*
* @param request
* @param bindingResult
* @return
@ -303,24 +305,24 @@ public class ProjectController {
@PutMapping("/project/cut/user/to")
public BaseResponse projectToOtherUserForCutting(HttpServletRequest request, @RequestParam Long oldUid
, @RequestParam Long pid,@RequestParam Long newUid) {
, @RequestParam Long pid, @RequestParam Long newUid) {
log.info("请求接口[Put]: /project/cut/user/to");
// 判断是否有参数错误
if (oldUid == null || pid == null || newUid==null) {
if (oldUid == null || pid == null || newUid == null) {
return ResultUtil.error(ErrorCode.REQUEST_BODY_ERROR);
}
return projectService.projectToOtherUserForCutting(request, oldUid, pid , newUid);
return projectService.projectToOtherUserForCutting(request, oldUid, pid, newUid);
}
@GetMapping("/project/file")
public BaseResponse getProjectFile(HttpServletRequest request, @RequestParam Long projectId){
public BaseResponse getProjectFile(HttpServletRequest request, @RequestParam Long projectId) {
log.info("请求接口[Get]: /project/file");
//判断是否有参数错误
if(projectId == null){
if (projectId == null) {
return ResultUtil.error(ErrorCode.REQUEST_BODY_ERROR);
}
return projectService.projectFileGet(request,projectId);
return projectService.projectFileGet(request, projectId);
}

View File

@ -15,9 +15,9 @@ public interface ProjectMapper {
@Insert("insert into organize_oa.oa_project " +
"(name, description, principal_id, cycle,file,complete_time," +
"deadline,status,is_finish) " +
"deadline,status,is_finish,tags) " +
"value (#{name},#{description},#{principalId},#{cycle},#{file}" +
",#{completeTime},#{deadline},#{status},#{isFinish})")
",#{completeTime},#{deadline},#{status},#{isFinish},#{tags})")
void projectAdd(ProjectInfoVO projectAdd);
@Insert("insert into organize_oa.oa_project_work (project_id, pid, name, principal_id," +

View File

@ -17,6 +17,7 @@ public class ProjectInfoVO {
private String description;
@NotNull(message = "周期不能为空")
private Long cycle;
private String tags;
private String file;
private Timestamp completeTime;
private Timestamp deadline;

View File

@ -37,6 +37,7 @@ public class ModuleServiceImpl implements ModuleService {
//判断是否是项目负责人
int is = 1;
if(!pid.equals(userId)){
log.info("不是负责人");
is = 0;
}

View File

@ -50,7 +50,6 @@ public class ProjectServiceImpl implements ProjectService {
private final UserDAO userDAO;
@Override
@CheckUserHasPermission("project.add")
public BaseResponse projectAdd(HttpServletRequest request, ProjectInfoVO projectAdd) {
log.info("\t> 执行 Service 层 ProjectService.projectAdd 方法");
projectDAO.projectAdd(projectAdd);

View File

@ -8,7 +8,7 @@
<select id="getByProjectId" resultType="com.jsl.oa.model.doData.ProjectWorkDO">
select * from organize_oa.oa_project_work where project_id=#{projectId} and type=0
<if test="is != 1 ">
and principal_id=#{userId}
and (principal_id=#{userId} or principal_id is null)
</if>
</select>