评论新曾图片提交
This commit is contained in:
@ -36,7 +36,7 @@ public interface YxStoreProductReplyMapper extends BaseMapper<YxStoreProductRepl
|
|||||||
|
|
||||||
@Select("select A.product_score as productScore,A.service_score as serviceScore," +
|
@Select("select A.product_score as productScore,A.service_score as serviceScore," +
|
||||||
"A.comment,A.merchant_reply_content as merchantReplyContent," +
|
"A.comment,A.merchant_reply_content as merchantReplyContent," +
|
||||||
"A.merchant_reply_time as merchantReplyTime,A.pics,A.add_time as addTime," +
|
"A.merchant_reply_time as merchantReplyTime,A.pics as pictures,A.add_time as addTime," +
|
||||||
"B.nickname,B.avatar,C.cart_info as cartInfo" +
|
"B.nickname,B.avatar,C.cart_info as cartInfo" +
|
||||||
" from yx_store_product_reply A left join yx_user B " +
|
" from yx_store_product_reply A left join yx_user B " +
|
||||||
"on A.uid = B.uid left join yx_store_order_cart_info C on A.unique = C.unique" +
|
"on A.uid = B.uid left join yx_store_order_cart_info C on A.unique = C.unique" +
|
||||||
|
@ -15,6 +15,7 @@ import co.yixiang.common.web.vo.Paging;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -25,7 +26,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collector;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -128,7 +132,15 @@ public class YxStoreProductReplyServiceImpl extends BaseServiceImpl<YxStoreProdu
|
|||||||
Page<YxStoreProductReply> pageModel = new Page<>(page, limit);
|
Page<YxStoreProductReply> pageModel = new Page<>(page, limit);
|
||||||
List<YxStoreProductReplyQueryVo> list = yxStoreProductReplyMapper
|
List<YxStoreProductReplyQueryVo> list = yxStoreProductReplyMapper
|
||||||
.selectReplyList(pageModel,productId);
|
.selectReplyList(pageModel,productId);
|
||||||
for (YxStoreProductReplyQueryVo queryVo : list) {
|
List<YxStoreProductReplyQueryVo> list1 = list.stream().map(i ->{
|
||||||
|
YxStoreProductReplyQueryVo vo = new YxStoreProductReplyQueryVo();
|
||||||
|
BeanUtils.copyProperties(i,vo);
|
||||||
|
if(i.getPictures().contains(",")){
|
||||||
|
vo.setPics(i.getPictures().split(","));
|
||||||
|
}
|
||||||
|
return vo;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
for (YxStoreProductReplyQueryVo queryVo : list1) {
|
||||||
newList.add(handleReply(queryVo));
|
newList.add(handleReply(queryVo));
|
||||||
}
|
}
|
||||||
return newList;
|
return newList;
|
||||||
|
@ -42,7 +42,7 @@ public class YxStoreProductReplyQueryVo implements Serializable {
|
|||||||
private String comment;
|
private String comment;
|
||||||
|
|
||||||
@ApiModelProperty(value = "评论图片")
|
@ApiModelProperty(value = "评论图片")
|
||||||
private String pics;
|
private String[] pics;
|
||||||
|
|
||||||
@ApiModelProperty(value = "评论时间")
|
@ApiModelProperty(value = "评论时间")
|
||||||
private Integer addTime;
|
private Integer addTime;
|
||||||
@ -62,6 +62,9 @@ public class YxStoreProductReplyQueryVo implements Serializable {
|
|||||||
|
|
||||||
private String suk;
|
private String suk;
|
||||||
|
|
||||||
|
|
||||||
|
private String pictures;
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private String cartInfo;
|
private String cartInfo;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user