|
@@ -5,6 +5,8 @@ import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.io.FileTypeUtil;
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
+import cn.hutool.json.JSON;
|
|
|
+import cn.hutool.json.JSONArray;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
@@ -21,6 +23,7 @@ import edu.travel.commodity.mapper.ShopReviewMapper;
|
|
|
import edu.travel.commodity.service.ShopReviewService;
|
|
|
import edu.travel.commodity.utils.*;
|
|
|
import edu.travel.remote.dto.AddReviewDto;
|
|
|
+import edu.travel.remote.dto.FIleDto;
|
|
|
import edu.travel.remote.dto.GetOrderItemDto;
|
|
|
import edu.travel.remote.dto.ProductSpecDto;
|
|
|
import edu.travel.exception.BaseException;
|
|
@@ -75,15 +78,18 @@ public class ShopReviewServiceImpl extends ServiceImpl<ShopReviewMapper, ShopRev
|
|
|
users.put(datum.getId(), datum);
|
|
|
}
|
|
|
for (ShopReviewVo record : records) {
|
|
|
- List<String> list = StringUtil.toList(record.getImage());
|
|
|
+ JSONArray objects = JSONUtil.parseArray(record.getImage());
|
|
|
+ List<FIleDto> list = JSONUtil.toList(objects, FIleDto.class);
|
|
|
record.setImageUrls(list);
|
|
|
if(!ObjectUtil.isEmpty(record.getSkuDetails())){
|
|
|
String jsonPrettyStr = JSONUtil.toJsonPrettyStr(record.getSkuDetails());
|
|
|
List<SpecOneVo> list1 = JSONUtil.toList(jsonPrettyStr, SpecOneVo.class);
|
|
|
record.setSpecOneVo(list1);
|
|
|
}
|
|
|
- EduTenantVo eduTenantVo = users.get(record.getUserId());
|
|
|
- record.setEduTenantVo(eduTenantVo);
|
|
|
+ if(record.getIsAnonymity()!=1){
|
|
|
+ EduTenantVo eduTenantVo = users.get(record.getUserId());
|
|
|
+ record.setEduTenantVo(eduTenantVo);
|
|
|
+ }
|
|
|
}
|
|
|
return pageEntity;
|
|
|
}
|
|
@@ -111,8 +117,8 @@ public class ShopReviewServiceImpl extends ServiceImpl<ShopReviewMapper, ShopRev
|
|
|
}
|
|
|
ShopReview bean = BeanUtil.toBean(params, ShopReview.class);
|
|
|
bean.setUserId(Long.valueOf(userId));
|
|
|
- String image = StringUtil.toListString(params.getImage());
|
|
|
- bean.setImage(image);
|
|
|
+ String jsonStr1 = JSONUtil.toJsonStr(params.getImage());
|
|
|
+ bean.setImage(jsonStr1);
|
|
|
//获取商品sku快照 SpecOneVo JSON
|
|
|
GetOrderItemDto getOrderItemDto = new GetOrderItemDto();
|
|
|
getOrderItemDto.setOrderId(params.getOrderId());
|