yj
2020-03-10 8bdcb1cf8fa048d6b891fb590fec11e10171ef00
单品文本修改
1个文件已修改
39 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
@@ -495,16 +495,16 @@
                commentText = template.replace("[链接]", jumpLink);
            }
            commentText = commentText.replace("[原价]", MoneyBigDecimalUtil.getWithNoZera(goodsDetailVO.getZkPrice())+"");
            if (!goodsDetailVO.isHasCoupon()) {
                commentText = commentText.replace("领券抢购", "抢购");
                commentText = commentText.replace("【券后价】[券后价]元", "");
            } else {
                commentText = commentText.replace("[券后价]",  MoneyBigDecimalUtil.getWithNoZera(goodsDetailVO.getCouponPrice())+"");
            }
            commentText = commentText.replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n").replace("\r\n\r\n",
                    "\r\n");
//            commentText = commentText.replace("[原价]", MoneyBigDecimalUtil.getWithNoZera(goodsDetailVO.getZkPrice())+"");
//            if (!goodsDetailVO.isHasCoupon()) {
//                commentText = commentText.replace("领券抢购", "抢购");
//                commentText = commentText.replace("【券后价】[券后价]元", "");
//            } else {
//                commentText = commentText.replace("[券后价]",  MoneyBigDecimalUtil.getWithNoZera(goodsDetailVO.getCouponPrice())+"");
//            }
//
//            commentText = commentText.replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n").replace("\r\n\r\n",
//                    "\r\n");
            CommentInfo commentInfo = new CommentInfo();
            commentInfo.setId(UUID.randomUUID().toString().replace("-", ""));
@@ -1527,6 +1527,25 @@
                        continue;
                    }
                    if (typeEnum != null && typeEnum == EvaluateEnum.single) {
                        GoodsDetailVO goods = evaluateNew.getGoods();
                        if (goods != null) {
                            String content = commentInfoNew.getContent();
                            if (!StringUtil.isNullOrEmpty(content)) {
                                content = content.replace("[原价]", MoneyBigDecimalUtil.getWithNoZera(goods.getZkPrice())+"");
                                if (goods.isHasCoupon()) {
                                    content = content.replace("[券后价]",MoneyBigDecimalUtil.getWithNoZera(goods.getCouponPrice())+"");
                                } else {
                                    content = content.replace("领券抢购", "抢购");
                                    content = content.replace("【券后价】[券后价]元", "");
                                }
                                content = content.replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n");
                                commentInfoNew.setContent(content);
                            }
                        }
                    }
                    comment++;
                    CommentInfoEnum typeComment = commentInfoNew.getTypeEnum();
                    if (typeComment != null && typeComment == CommentInfoEnum.goodsCoupon) {