| | |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeConstant.SERVICE_CODE_DELETE_SHOP_INFO; |
| | | return ServiceCodeConstant.SERVICE_CODE_DELETE_COMMENT_INFO; |
| | | } |
| | | |
| | | /** |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | // 作废 sub_comment |
| | | List<Map> subComments = commentServiceDaoImpl.getSubComments(info); |
| | | |
| | | if(subComments == null || subComments.size()>0){ |
| | | if(subComments == null || subComments.size() == 0){ |
| | | return ; |
| | | } |
| | | commentServiceDaoImpl.updateSubCommentInstance(delInfo); |
| | |
| | | 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); |
| | | |
| | | |
| | |
| | | JSONObject subCommentPhoto = subCommentPhotos.getJSONObject(subCommentPhotoIndex); |
| | | Assert.jsonObjectHaveKey(subCommentPhoto,"commentPhotoTypeCd","subCommentPhoto 节点下没有包含 commentPhotoTypeCd 节点"); |
| | | subCommentPhoto.put("bId",business.getbId()); |
| | | commentServiceDaoImpl.saveSubCommentAttrInstance(subCommentPhoto); |
| | | commentServiceDaoImpl.saveSubCommentPhotoInstance(subCommentPhoto); |
| | | } |
| | | } |
| | | |
| | |
| | |  |
| | | |
| | | |
| | | 10、统一接口地址:http://yourIp:8001/httpApi/service |
| | | 10、统一接口地址:http://ip:8001/httpApi/service |
| | | |
| | | 加入钉钉java110 工作群随时了解项目进度,和java110开发者零距离沟通 |
| | | 加入微小区交流群随时了解项目进度,和java110开发者零距离沟通 qq群号 827669685,邮箱:928255095@qq.com |
| | | |
| | |  |
| | |  |
| | | |
| | | |
| | |
| | | /** |
| | | * 保存评论 |
| | | */ |
| | | public static final String SERVICE_CODE_SAVE_COMMENT_INFO = "sava.comment.info"; |
| | | public static final String SERVICE_CODE_SAVE_COMMENT_INFO = "save.comment.info"; |
| | | |
| | | |
| | | /** |
| | | * 删除评论 |
| | | */ |
| | | public static final String SERVICE_CODE_DELETE_COMMENT_INFO = "delete.comment.info"; |
| | | |
| | | |
| | | |
| | |
| | | VALUES('delete.shop.catalog','D','删除商品目录信息',1,'http://shop-service/shopApi/service','8000418003'); |
| | | |
| | | |
| | | INSERT INTO c_service(service_code,business_type_cd,`name`,seq,url,provide_app_id) |
| | | VALUES('save.comment.info','D','保存评论',1,'http://comment-service/commentApi/service','8000418003'); |
| | | |
| | | INSERT INTO c_service(service_code,business_type_cd,`name`,seq,url,provide_app_id) |
| | | VALUES('delete.comment.info','D','删除评论',1,'http://comment-service/commentApi/service','8000418003'); |
| | | |
| | | |
| | | insert into c_route(app_id,service_id,invoke_model,order_type_cd,status_cd) values( |
| | | '8000418001','1','S','Q','0' |
| | | ); |
| | |
| | | CREATE INDEX idx_sub_comment_photo_b_id ON c_sub_comment_photo(b_id); |
| | | CREATE INDEX idx_sub_comment_photo_sub_comment_id ON c_sub_comment_photo(sub_comment_id); |
| | | -- 评论分数 |
| | | create table c_comment_score( |
| | | comment_score_id varchar(30) not null comment '评论分数ID', |
| | | comment_id varchar(30) not null comment '评论ID', |
| | | CREATE TABLE c_comment_score( |
| | | comment_score_id VARCHAR(30) NOT NULL COMMENT '评论分数ID', |
| | | comment_id VARCHAR(30) NOT NULL COMMENT '评论ID', |
| | | b_id VARCHAR(30) NOT NULL COMMENT '业务Id', |
| | | score_type_cd varchar(30) not null comment '打分类别,S 商品相符,U 卖家打分,T 物流打分' |
| | | value int not null comment '分数', |
| | | score_type_cd VARCHAR(30) NOT NULL COMMENT '打分类别,S 商品相符,U 卖家打分,T 物流打分', |
| | | `value` INT NOT NULL COMMENT '分数', |
| | | `month` INT NOT NULL COMMENT '月份', |
| | | create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
| | | status_cd VARCHAR(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,S 保存,0, 在用 1失效' |