修复了Task从数据库读出json时的序列化问题,修复了swagger不显示方法名的问题,新增了比较两个staff在项目中的权限等级的方法

master
ArgonarioD 2022-07-07 15:43:09 +08:00
parent 11fb78d349
commit ad9544111c
4 changed files with 15 additions and 2 deletions

View File

@ -26,6 +26,8 @@ public interface IProjectGroupService extends IService<ProjectGroup> {
Integer getProjectAccessLevel(Integer staffId, Integer projectId); Integer getProjectAccessLevel(Integer staffId, Integer projectId);
Integer compareProjectAccessLevel(Integer projectId, Integer staffId1, Integer staffId2);
List<Integer> findAllProjectNumber(String token, Integer projectId) throws BadRequestException; List<Integer> findAllProjectNumber(String token, Integer projectId) throws BadRequestException;
/** /**

View File

@ -111,6 +111,11 @@ public class ProjectGroupServiceImpl extends ServiceImpl<ProjectGroupMapper, Pro
} }
} }
@Override
public Integer compareProjectAccessLevel(Integer projectId, Integer staffId1, Integer staffId2) {
return Integer.compare(getProjectAccessLevel(staffId1, projectId), getProjectAccessLevel(staffId2, projectId));
}
@Override @Override
public List<Integer> findAllProjectNumber(String token, Integer projectId) throws BadRequestException { public List<Integer> findAllProjectNumber(String token, Integer projectId) throws BadRequestException {
List<Integer> res = new ArrayList<>(); List<Integer> res = new ArrayList<>();

View File

@ -31,4 +31,6 @@ server:
enabled: true enabled: true
forward-headers-strategy: framework forward-headers-strategy: framework
springdoc: springdoc:
packages-to-scan: cn.edu.hfut.rmdjzz.projectmanagement packages-to-scan: cn.edu.hfut.rmdjzz.projectmanagement
swagger-ui:
display-operation-id: true

View File

@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.edu.hfut.rmdjzz.projectmanagement.mapper.TaskMapper"> <mapper namespace="cn.edu.hfut.rmdjzz.projectmanagement.mapper.TaskMapper">
<select id="selectSubTaskList" resultType="cn.edu.hfut.rmdjzz.projectmanagement.entity.dto.TaskDto"> <resultMap id="taskDto" type="cn.edu.hfut.rmdjzz.projectmanagement.entity.dto.TaskDto">
<id property="taskId" column="task_id"/>
<result property="attachedInfo" column="attached_info" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
</resultMap>
<select id="selectSubTaskList" resultMap="taskDto">
SELECT task_id, SELECT task_id,
task_name, task_name,
task_project_id, task_project_id,