Ver código fonte

修改:评论添加

chenhongyan1989 4 meses atrás
pai
commit
98c21a6205

+ 14 - 10
energy-manage-service/src/main/java/com/energy/manage/service/service/analysiscomment/impl/AnalysisCommentServiceImpl.java

@@ -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);
+//        }
     }
 
 }