修正xml文件的部分bug
This commit is contained in:
parent
ec45c0b233
commit
49247fd88f
@ -108,9 +108,18 @@ public interface ProjectMapper {
|
|||||||
+ "where DATE(deadline) = DATE(#{threeDayLater}) and is_finish != 1")
|
+ "where DATE(deadline) = DATE(#{threeDayLater}) and is_finish != 1")
|
||||||
List<ProjectWorkDO> getProjectWorkByTime(LocalDateTime threeDayLater);
|
List<ProjectWorkDO> getProjectWorkByTime(LocalDateTime threeDayLater);
|
||||||
|
|
||||||
|
@Select("select * from organize_oa.oa_project_work where "
|
||||||
|
+ "principal_id=#{uid} "
|
||||||
|
+ "AND is_delete = 0 AND type = 1")
|
||||||
List<ProjectWorkDO> getAllSubmoduleByUserId(Long uid);
|
List<ProjectWorkDO> getAllSubmoduleByUserId(Long uid);
|
||||||
|
|
||||||
List<ProjectDO> getProjectByPrincipalUser(Long uid);
|
@Select("select * from organize_oa.oa_project_work where "
|
||||||
|
+ "principal_id=#{uid} "
|
||||||
|
+ "AND is_delete = 0 AND type = 0")
|
||||||
List<ProjectWorkDO> getAllSubsystemByUserId(Long uid);
|
List<ProjectWorkDO> getAllSubsystemByUserId(Long uid);
|
||||||
|
|
||||||
|
@Select("select * from organize_oa.oa_project where "
|
||||||
|
+ "principal_id=#{uid} "
|
||||||
|
+ "AND is_delete = 0")
|
||||||
|
List<ProjectDO> getProjectByPrincipalUser(Long uid);
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,6 @@ public class ReviewServiceImpl implements ReviewService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BaseResponse getUserReview(HttpServletRequest request) {
|
public BaseResponse getUserReview(HttpServletRequest request) {
|
||||||
log.info("\t> 执行 Service 层 ReviewService.getUserReview 方法");
|
log.info("\t> 执行 Service 层 ReviewService.getUserReview 方法");
|
||||||
@ -147,7 +146,6 @@ public class ReviewServiceImpl implements ReviewService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BaseResponse addReview(ReviewAddVO reviewAddVO, HttpServletRequest request) {
|
public BaseResponse addReview(ReviewAddVO reviewAddVO, HttpServletRequest request) {
|
||||||
log.info("\t> 执行 Service 层 ReviewService.addReview 方法");
|
log.info("\t> 执行 Service 层 ReviewService.addReview 方法");
|
||||||
@ -176,7 +174,6 @@ public class ReviewServiceImpl implements ReviewService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BaseResponse updateReviewResult(ReviewUpdateResultVO reviewUpdateResultVO, HttpServletRequest request) {
|
public BaseResponse updateReviewResult(ReviewUpdateResultVO reviewUpdateResultVO, HttpServletRequest request) {
|
||||||
|
|
||||||
@ -216,14 +213,19 @@ public class ReviewServiceImpl implements ReviewService {
|
|||||||
ReviewVO reviewVO = new ReviewVO();
|
ReviewVO reviewVO = new ReviewVO();
|
||||||
// 现将相同的属性赋值
|
// 现将相同的属性赋值
|
||||||
Processing.copyProperties(reviewDO, reviewVO);
|
Processing.copyProperties(reviewDO, reviewVO);
|
||||||
// 赋值其他属性
|
// 赋值其他非空属性
|
||||||
reviewVO.setCategory(Processing.turnReviewCategory(reviewDO.getCategory()))
|
reviewVO.setCategory(Processing.turnReviewCategory(reviewDO.getCategory()))
|
||||||
.setSenderName(userMapper.getUserById(reviewDO.getSenderId()).getNickname())
|
.setSenderName(userMapper.getUserById(reviewDO.getSenderId()).getNickname())
|
||||||
.setRecipientName(userMapper.getUserById(reviewDO.getRecipientId()).getNickname())
|
|
||||||
.setProjectName(projectDAO.getProjectById(reviewDO.getProjectId()).getName())
|
.setProjectName(projectDAO.getProjectById(reviewDO.getProjectId()).getName())
|
||||||
.setSubsystemName(reviewDAO.getNameBySubproject(reviewDO.getProjectSubsystemId()))
|
.setSubsystemName(reviewDAO.getNameBySubproject(reviewDO.getProjectSubsystemId()))
|
||||||
.setSubmoduleName(reviewDAO.getNameBySubproject(reviewDO.getProjectSubmoduleId()))
|
|
||||||
.setResult(Processing.turnReviewResult(reviewDO.getReviewResult()));
|
.setResult(Processing.turnReviewResult(reviewDO.getReviewResult()));
|
||||||
|
// 赋值可为空属性并进行判断
|
||||||
|
if (reviewDO.getRecipientId() != null) {
|
||||||
|
reviewVO.setRecipientName(userMapper.getUserById(reviewDO.getRecipientId()).getNickname());
|
||||||
|
}
|
||||||
|
if (reviewDO.getProjectSubmoduleId() != null) {
|
||||||
|
reviewVO.setSubmoduleName(reviewDAO.getNameBySubproject(reviewDO.getProjectSubmoduleId()));
|
||||||
|
}
|
||||||
// 将封装好的结果添加到结果集
|
// 将封装好的结果添加到结果集
|
||||||
resultData.add(reviewVO);
|
resultData.add(reviewVO);
|
||||||
}
|
}
|
||||||
@ -232,9 +234,6 @@ public class ReviewServiceImpl implements ReviewService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,66 +5,89 @@
|
|||||||
|
|
||||||
<mapper namespace="com.jsl.oa.mapper.ReviewMapper">
|
<mapper namespace="com.jsl.oa.mapper.ReviewMapper">
|
||||||
<insert id="addReview" >
|
<insert id="addReview" >
|
||||||
insert into organize_oa.oa_review
|
INSERT INTO organize_oa.oa_review
|
||||||
<set>
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
|
||||||
<if test="name != null and name != ''">
|
<if test="name != null and name != ''">
|
||||||
name = #{name},
|
name,
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="content != null and content != ''">
|
<if test="content != null and content != ''">
|
||||||
content = #{content},
|
content,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="senderId != null">
|
||||||
<if test="sender_id != null">
|
sender_id,
|
||||||
sender_id = #{sender_id},
|
|
||||||
</if>
|
</if>
|
||||||
|
<if test="recipientId != null">
|
||||||
<if test="recipient_id != null">
|
recipient_id,
|
||||||
recipient_id = #{recipient_id},
|
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="category != null">
|
<if test="category != null">
|
||||||
category = #{category},
|
category,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectId != null">
|
||||||
<if test="project_id != null">
|
project_id,
|
||||||
project_id = #{project_id},
|
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectSubsystemId != null">
|
||||||
<if test="project_subsystem_id != null">
|
project_subsystem_id,
|
||||||
project_subsystem_id = #{project_subsystem_id},
|
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectSubmoduleId != null">
|
||||||
<if test="project_submodule_id != null">
|
project_submodule_id,
|
||||||
project_submodule_id = #{project_submodule_id},
|
|
||||||
</if>
|
</if>
|
||||||
|
<if test="applicationTime != null">
|
||||||
<if test="application_time != null">
|
application_time,
|
||||||
application_time = #{application_time},
|
|
||||||
</if>
|
</if>
|
||||||
|
<if test="reviewTime != null">
|
||||||
<if test="review_time != null">
|
review_time,
|
||||||
review_time = #{review_time},
|
|
||||||
</if>
|
</if>
|
||||||
|
<if test="reviewResult != null">
|
||||||
<if test="review_result != null">
|
review_result,
|
||||||
review_result = #{review_result},
|
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isDelete != null">
|
||||||
<if test="is_delete != null">
|
is_delete,
|
||||||
is_delete = #{is_delete},
|
|
||||||
</if>
|
</if>
|
||||||
|
</trim>
|
||||||
</set>
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||||
where id = #{id}
|
<if test="name != null and name != ''">
|
||||||
|
#{name},
|
||||||
|
</if>
|
||||||
|
<if test="content != null and content != ''">
|
||||||
|
#{content},
|
||||||
|
</if>
|
||||||
|
<if test="senderId != null">
|
||||||
|
#{senderId},
|
||||||
|
</if>
|
||||||
|
<if test="recipientId != null">
|
||||||
|
#{recipientId},
|
||||||
|
</if>
|
||||||
|
<if test="category != null">
|
||||||
|
#{category},
|
||||||
|
</if>
|
||||||
|
<if test="projectId != null">
|
||||||
|
#{projectId},
|
||||||
|
</if>
|
||||||
|
<if test="projectSubsystemId != null">
|
||||||
|
#{projectSubsystemId},
|
||||||
|
</if>
|
||||||
|
<if test="projectSubmoduleId != null">
|
||||||
|
#{projectSubmoduleId},
|
||||||
|
</if>
|
||||||
|
<if test="applicationTime != null">
|
||||||
|
#{applicationTime},
|
||||||
|
</if>
|
||||||
|
<if test="reviewTime != null">
|
||||||
|
#{reviewTime},
|
||||||
|
</if>
|
||||||
|
<if test="reviewResult != null">
|
||||||
|
#{reviewResult},
|
||||||
|
</if>
|
||||||
|
<if test="isDelete != null">
|
||||||
|
#{isDelete},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
<update id="updateReview" parameterType="com.jsl.oa.model.dodata.ReviewDO">
|
<update id="updateReview" parameterType="com.jsl.oa.model.dodata.ReviewDO">
|
||||||
update organize_oa.oa_review
|
update organize_oa.oa_review
|
||||||
<set>
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
|
||||||
<if test="name != null and name != ''">
|
<if test="name != null and name != ''">
|
||||||
name = #{name},
|
name = #{name},
|
||||||
</if>
|
</if>
|
||||||
@ -73,49 +96,50 @@
|
|||||||
content = #{content},
|
content = #{content},
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="sender_id != null">
|
<if test="senderId != null">
|
||||||
sender_id = #{sender_id},
|
sender_id = #{senderId},
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="recipient_id != null">
|
<if test="recipientId != null">
|
||||||
recipient_id = #{recipient_id},
|
recipient_id = #{recipientId},
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="category != null">
|
<if test="category != null">
|
||||||
category = #{category},
|
category = #{category},
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="project_id != null">
|
<if test="projectId != null">
|
||||||
project_id = #{project_id},
|
project_id = #{projectId},
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="project_subsystem_id != null">
|
<if test="projectSubsystemId != null">
|
||||||
project_subsystem_id = #{project_subsystem_id},
|
project_subsystem_id = #{projectSubsystemId},
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="project_submodule_id != null">
|
<if test="projectSubmoduleId != null">
|
||||||
project_submodule_id = #{project_submodule_id},
|
project_submodule_id = #{projectSubmoduleId},
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="application_time != null">
|
<if test="applicationTime != null">
|
||||||
application_time = #{application_time},
|
application_time = #{applicationTime},
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="review_time != null">
|
<if test="reviewTime != null">
|
||||||
review_time = #{review_time},
|
review_time = #{reviewTime},
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="review_result != null">
|
<if test="reviewResult != null">
|
||||||
review_result = #{review_result},
|
review_result = #{reviewResult},
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="is_delete != null">
|
<if test="isDelete != null">
|
||||||
is_delete = #{is_delete},
|
is_delete = #{isDelete},
|
||||||
</if>
|
</if>
|
||||||
|
</trim>
|
||||||
</set>
|
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user