From e75a487188a23511f4aff792ef40679d691000fc Mon Sep 17 00:00:00 2001
From: wuxw7 <wuxw7@asiainfo.com>
Date: 星期二, 17 七月 2018 23:56:25 +0800
Subject: [PATCH] '评论服务测试成功'

---
 CommentService/src/main/java/com/java110/comment/listener/DeleteCommentOrSubCommentListener.java |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/CommentService/src/main/java/com/java110/comment/listener/DeleteCommentOrSubCommentListener.java b/CommentService/src/main/java/com/java110/comment/listener/DeleteCommentOrSubCommentListener.java
index e2cfb52..1dbc1ca 100644
--- a/CommentService/src/main/java/com/java110/comment/listener/DeleteCommentOrSubCommentListener.java
+++ b/CommentService/src/main/java/com/java110/comment/listener/DeleteCommentOrSubCommentListener.java
@@ -42,7 +42,7 @@
 
     @Override
     public String getServiceCode() {
-        return ServiceCodeConstant.SERVICE_CODE_DELETE_SHOP_INFO;
+        return ServiceCodeConstant.SERVICE_CODE_DELETE_COMMENT_INFO;
     }
 
     /**
@@ -98,30 +98,30 @@
         Map delInfo = new HashMap();
         delInfo.put("bId",business.getbId());
         delInfo.put("operate",StatusConstant.STATUS_CD_VALID);
-        //鍟嗘埛淇℃伅
+        //璇勮淇℃伅
         Map comment = commentServiceDaoImpl.getComment(info);
         if(comment != null && !comment.isEmpty()){
             commentServiceDaoImpl.updateCommentInstance(delInfo);
         }
 
-        //鍟嗘埛淇℃伅
+        //璇勮淇℃伅
         List<Map> subComments = commentServiceDaoImpl.getSubComments(info);
         if(subComments != null && subComments.size() > 0){
             commentServiceDaoImpl.updateSubCommentInstance(delInfo);
         }
 
-        //鍟嗘埛淇℃伅
+        //璇勮灞炴�т俊鎭�
         List<Map> commentAttrs = commentServiceDaoImpl.getSubCommentAttrs(info);
         if(commentAttrs != null && commentAttrs.size() > 0){
             commentServiceDaoImpl.updateSubCommentAttrInstance(delInfo);
         }
 
-        //鍟嗘埛淇℃伅
+        //璇勮鐓х墖淇℃伅
         List<Map> commentPhotos = commentServiceDaoImpl.getSubCommentPhotos(info);
         if(commentPhotos != null && commentPhotos.size() > 0){
             commentServiceDaoImpl.updateSubCommentPhotoInstance(delInfo);
         }
-
+        //璇勮鍒嗘暟淇℃伅
         List<Map> commentScores = commentServiceDaoImpl.getCommentScores(info);
         if(commentScores != null && commentScores.size() > 0){
             commentServiceDaoImpl.updateCommentScoreInstance(delInfo);
@@ -144,7 +144,7 @@
         info.put("statusCd",StatusConstant.STATUS_CD_VALID);
 
         Map delInfo = new HashMap();
-        delInfo.put("bId",business.getbId());
+        //delInfo.put("bId",business.getbId());
         delInfo.put("statusCd",StatusConstant.STATUS_CD_INVALID);
 
         Map commentMap = commentServiceDaoImpl.getComment(info);
@@ -164,7 +164,7 @@
         // 浣滃簾 sub_comment
         List<Map> subComments = commentServiceDaoImpl.getSubComments(info);
 
-        if(subComments == null || subComments.size()>0){
+        if(subComments == null || subComments.size() == 0){
             return ;
         }
         commentServiceDaoImpl.updateSubCommentInstance(delInfo);
@@ -192,7 +192,8 @@
         info.put("statusCd",StatusConstant.STATUS_CD_VALID);
 
         Map delInfo = new HashMap();
-        delInfo.put("bId",business.getbId());
+        //delInfo.put("bId",business.getbId());
+        delInfo.put("subCommentId",subComment.getString("subCommentId"));
         delInfo.put("statusCd",StatusConstant.STATUS_CD_INVALID);
 
 

--
Gitblit v1.8.0