Compare commits
No commits in common. "ea457a6604690709d63ab94af7487ec52acb17da" and "25e16c42649cf890761678ff1c825d65c34cc19a" have entirely different histories.
ea457a6604
...
25e16c4264
@ -65,9 +65,7 @@ public class ShiroConfiguration {
|
|||||||
filterChainDefinitionMap.put("/project/get", "anon"); // 信息接口允许匿名访问
|
filterChainDefinitionMap.put("/project/get", "anon"); // 信息接口允许匿名访问
|
||||||
filterChainDefinitionMap.put("/project/get/custom", "anon"); // 游客获取项目允许匿名访问
|
filterChainDefinitionMap.put("/project/get/custom", "anon"); // 游客获取项目允许匿名访问
|
||||||
filterChainDefinitionMap.put("/project/add", "anon"); // 信息接口允许匿名访问
|
filterChainDefinitionMap.put("/project/add", "anon"); // 信息接口允许匿名访问
|
||||||
filterChainDefinitionMap.put("/project/work/add", "anon"); // 信息接口允许匿名访问
|
|
||||||
filterChainDefinitionMap.put("/tags/project/list", "anon"); // 信息接口允许匿名访问
|
filterChainDefinitionMap.put("/tags/project/list", "anon"); // 信息接口允许匿名访问
|
||||||
filterChainDefinitionMap.put("/module/add", "anon"); // 信息接口允许匿名访问
|
|
||||||
filterChainDefinitionMap.put("/**/**", "authc"); // 其他接口一律拦截(需要Token)
|
filterChainDefinitionMap.put("/**/**", "authc"); // 其他接口一律拦截(需要Token)
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,15 +59,14 @@ public class ProjectController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 游客获取项目
|
* 游客获取项目
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/project/get/custom")
|
@GetMapping("/project/get/custom")
|
||||||
public BaseResponse projectGetCustom(@RequestParam(required = false) Integer id,
|
public BaseResponse projectGetCustom(@RequestParam(required = false) Integer id,
|
||||||
@RequestParam(required = false) List<String> tags,
|
@RequestParam(required = false) List<String> tags,
|
||||||
@RequestParam(required = false) List<Integer> isFinish) {
|
@RequestParam(required = false) List<Integer> isFinish){
|
||||||
log.info("请求接口[GET]: /project/all/get");
|
log.info("请求接口[GET]: /project/all/get");
|
||||||
return projectService.tget(id, tags, isFinish);
|
return projectService.tget(id,tags,isFinish);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -82,7 +81,7 @@ public class ProjectController {
|
|||||||
@RequestParam(required = false) List<Integer> isFinish,
|
@RequestParam(required = false) List<Integer> isFinish,
|
||||||
HttpServletRequest request) {
|
HttpServletRequest request) {
|
||||||
log.info("请求接口[GET]: /project/get");
|
log.info("请求接口[GET]: /project/get");
|
||||||
return projectService.get(listAll, request, tags, isFinish);
|
return projectService.get(listAll,request,tags,isFinish);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -92,12 +91,12 @@ public class ProjectController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/project/work/get")
|
@GetMapping("/project/work/get")
|
||||||
public BaseResponse projectWorkGet(@RequestParam(required = false) Integer listAll,
|
public BaseResponse projectWorkGet(@RequestParam(required = false) Integer listAll,
|
||||||
@RequestParam(required = false) List<String> tags,
|
@RequestParam(required = false) List<String> tags,
|
||||||
@RequestParam(required = false) List<Integer> isFinish,
|
@RequestParam(required = false) List<Integer> isFinish,
|
||||||
@RequestParam(required = false) Integer is,
|
@RequestParam(required = false) Integer is,
|
||||||
HttpServletRequest request) {
|
HttpServletRequest request) {
|
||||||
log.info("请求接口[GET]: /project/work/get");
|
log.info("请求接口[GET]: /project/work/get");
|
||||||
return projectService.workget(listAll, request, tags, isFinish, is);
|
return projectService.workget(listAll, request, tags, isFinish,is);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -193,9 +192,9 @@ public class ProjectController {
|
|||||||
* @Description: 项目的修改
|
* @Description: 项目的修改
|
||||||
* @Date: 2024/3/10
|
* @Date: 2024/3/10
|
||||||
* @Param request:
|
* @Param request:
|
||||||
* @Param projectEdit:
|
* @Param projectEdit:
|
||||||
* @Param bindingResult:
|
* @Param bindingResult:
|
||||||
* @Param projectId:
|
* @Param projectId:
|
||||||
**/
|
**/
|
||||||
@PutMapping("/project/edit/{projectId}")
|
@PutMapping("/project/edit/{projectId}")
|
||||||
public BaseResponse projectEditById(HttpServletRequest request, @RequestBody @Validated ProjectEditVO projectEdit,
|
public BaseResponse projectEditById(HttpServletRequest request, @RequestBody @Validated ProjectEditVO projectEdit,
|
||||||
@ -205,13 +204,12 @@ public class ProjectController {
|
|||||||
if (bindingResult.hasErrors()) {
|
if (bindingResult.hasErrors()) {
|
||||||
return ResultUtil.error(ErrorCode.REQUEST_BODY_ERROR, Processing.getValidatedErrorList(bindingResult));
|
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 request
|
||||||
* @param bindingResult
|
* @param bindingResult
|
||||||
* @return
|
* @return
|
||||||
@ -305,24 +303,24 @@ public class ProjectController {
|
|||||||
|
|
||||||
@PutMapping("/project/cut/user/to")
|
@PutMapping("/project/cut/user/to")
|
||||||
public BaseResponse projectToOtherUserForCutting(HttpServletRequest request, @RequestParam Long oldUid
|
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");
|
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 ResultUtil.error(ErrorCode.REQUEST_BODY_ERROR);
|
||||||
}
|
}
|
||||||
return projectService.projectToOtherUserForCutting(request, oldUid, pid, newUid);
|
return projectService.projectToOtherUserForCutting(request, oldUid, pid , newUid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/project/file")
|
@GetMapping("/project/file")
|
||||||
public BaseResponse getProjectFile(HttpServletRequest request, @RequestParam Long projectId) {
|
public BaseResponse getProjectFile(HttpServletRequest request, @RequestParam Long projectId){
|
||||||
log.info("请求接口[Get]: /project/file");
|
log.info("请求接口[Get]: /project/file");
|
||||||
//判断是否有参数错误
|
//判断是否有参数错误
|
||||||
if (projectId == null) {
|
if(projectId == null){
|
||||||
return ResultUtil.error(ErrorCode.REQUEST_BODY_ERROR);
|
return ResultUtil.error(ErrorCode.REQUEST_BODY_ERROR);
|
||||||
}
|
}
|
||||||
return projectService.projectFileGet(request, projectId);
|
return projectService.projectFileGet(request,projectId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,9 +15,9 @@ public interface ProjectMapper {
|
|||||||
|
|
||||||
@Insert("insert into organize_oa.oa_project " +
|
@Insert("insert into organize_oa.oa_project " +
|
||||||
"(name, description, principal_id, cycle,file,complete_time," +
|
"(name, description, principal_id, cycle,file,complete_time," +
|
||||||
"deadline,status,is_finish,tags) " +
|
"deadline,status,is_finish) " +
|
||||||
"value (#{name},#{description},#{principalId},#{cycle},#{file}" +
|
"value (#{name},#{description},#{principalId},#{cycle},#{file}" +
|
||||||
",#{completeTime},#{deadline},#{status},#{isFinish},#{tags})")
|
",#{completeTime},#{deadline},#{status},#{isFinish})")
|
||||||
void projectAdd(ProjectInfoVO projectAdd);
|
void projectAdd(ProjectInfoVO projectAdd);
|
||||||
|
|
||||||
@Insert("insert into organize_oa.oa_project_work (project_id, pid, name, principal_id," +
|
@Insert("insert into organize_oa.oa_project_work (project_id, pid, name, principal_id," +
|
||||||
|
@ -17,7 +17,6 @@ public class ProjectInfoVO {
|
|||||||
private String description;
|
private String description;
|
||||||
@NotNull(message = "周期不能为空")
|
@NotNull(message = "周期不能为空")
|
||||||
private Long cycle;
|
private Long cycle;
|
||||||
private String tags;
|
|
||||||
private String file;
|
private String file;
|
||||||
private Timestamp completeTime;
|
private Timestamp completeTime;
|
||||||
private Timestamp deadline;
|
private Timestamp deadline;
|
||||||
|
@ -37,7 +37,6 @@ public class ModuleServiceImpl implements ModuleService {
|
|||||||
//判断是否是项目负责人
|
//判断是否是项目负责人
|
||||||
int is = 1;
|
int is = 1;
|
||||||
if(!pid.equals(userId)){
|
if(!pid.equals(userId)){
|
||||||
log.info("不是负责人");
|
|
||||||
is = 0;
|
is = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,6 +50,7 @@ public class ProjectServiceImpl implements ProjectService {
|
|||||||
private final UserDAO userDAO;
|
private final UserDAO userDAO;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@CheckUserHasPermission("project.add")
|
||||||
public BaseResponse projectAdd(HttpServletRequest request, ProjectInfoVO projectAdd) {
|
public BaseResponse projectAdd(HttpServletRequest request, ProjectInfoVO projectAdd) {
|
||||||
log.info("\t> 执行 Service 层 ProjectService.projectAdd 方法");
|
log.info("\t> 执行 Service 层 ProjectService.projectAdd 方法");
|
||||||
projectDAO.projectAdd(projectAdd);
|
projectDAO.projectAdd(projectAdd);
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<select id="getByProjectId" resultType="com.jsl.oa.model.doData.ProjectWorkDO">
|
<select id="getByProjectId" resultType="com.jsl.oa.model.doData.ProjectWorkDO">
|
||||||
select * from organize_oa.oa_project_work where project_id=#{projectId} and type=0
|
select * from organize_oa.oa_project_work where project_id=#{projectId} and type=0
|
||||||
<if test="is != 1 ">
|
<if test="is != 1 ">
|
||||||
and (principal_id=#{userId} or principal_id is null)
|
and principal_id=#{userId}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user