|
@@ -149,17 +149,21 @@ public class AnalysisCommentServiceImpl implements AnalysisCommentService {
|
|
|
.setComment(commentDto.getComment())
|
|
|
.setCreateBy(commentDescriptionDto.getCreateBy())
|
|
|
.setUpdateBy(commentDescriptionDto.getUpdateBy());
|
|
|
- int count = commentDescriptionMapper.selectCountByAllCode(batchCode,analysisTypeCode,commentTypeCode);
|
|
|
- //空则添加 非空则编辑
|
|
|
- if(count == 0){
|
|
|
- //如果评论内容为空则不添加
|
|
|
- if(StringUtils.isBlank(commentDto.getComment())){
|
|
|
- return 0;
|
|
|
- }
|
|
|
- return commentDescriptionMapper.insertPoSelective(commentDescriptionPo);
|
|
|
- }else{
|
|
|
- return commentDescriptionMapper.updatePoSelective(commentDescriptionPo);
|
|
|
+// int count = commentDescriptionMapper.selectCountByAllCode(batchCode,analysisTypeCode,commentTypeCode);
|
|
|
+ if(StringUtils.isBlank(commentDto.getComment())){
|
|
|
+ return 0;
|
|
|
}
|
|
|
+ return commentDescriptionMapper.insertPoSelective(commentDescriptionPo);
|
|
|
+ //空则添加 非空则编辑
|
|
|
+// if(count == 0){
|
|
|
+// //如果评论内容为空则不添加
|
|
|
+// if(StringUtils.isBlank(commentDto.getComment())){
|
|
|
+// return 0;
|
|
|
+// }
|
|
|
+// return commentDescriptionMapper.insertPoSelective(commentDescriptionPo);
|
|
|
+// }else{
|
|
|
+// return commentDescriptionMapper.updatePoSelective(commentDescriptionPo);
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
}
|