|
|
@ -19,6 +19,7 @@ import com.shop.cereshop.app.param.comment.CommentParam; |
|
|
|
import com.shop.cereshop.app.param.comment.CommentWorParam; |
|
|
|
import com.shop.cereshop.app.param.comment.LikeParam; |
|
|
|
import com.shop.cereshop.app.service.buyer.CereBuyerCommentLikeService; |
|
|
|
import com.shop.cereshop.app.service.product.CereProductSkuService; |
|
|
|
import com.shop.cereshop.app.service.shop.CereShopCommentService; |
|
|
|
import com.shop.cereshop.commons.constant.IntegerEnum; |
|
|
|
import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; |
|
|
@ -45,6 +46,9 @@ public class CereShopCommentServiceImpl implements CereShopCommentService { |
|
|
|
@Autowired |
|
|
|
private CereBuyerCommentLikeService cereBuyerCommentLikeService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private CereProductSkuService cereProductSkuService; |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<BuyerComment> findByProductId(Long productId) { |
|
|
|
return cereShopCommentDAO.findByProductId(productId); |
|
|
@ -123,6 +127,7 @@ public class CereShopCommentServiceImpl implements CereShopCommentService { |
|
|
|
List<WordComment> list=cereShopCommentDAO.getProductAll(param); |
|
|
|
if(!EmptyUtils.isEmpty(list)){ |
|
|
|
for (WordComment wordComment:list) { |
|
|
|
wordComment.setSkus(cereProductSkuService.findSkuValuesBySkuId(wordComment.getSkuId())); |
|
|
|
//计算追评时间和评价时间之间天数 |
|
|
|
if (!EmptyUtils.isEmpty(wordComment.getAddTime())) { |
|
|
|
wordComment.setDay(TimeUtils.differentDaysByMillisecond(wordComment.getCreateTime(), wordComment.getAddTime())); |
|
|
|