|
|
@@ -199,16 +199,13 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, Object> getFormatAttr(Long productId, String jsonStr,Long[] stores) {
|
|
|
- JSONArray jsonObject = JSON.parseArray(jsonStr);
|
|
|
+ public Map<String, Object> getFormatAttr(Long productId, List<ProductArrtDTO> productArr,Long[] stores) {
|
|
|
Map<String, Object> resultMap = new LinkedHashMap<>(3);
|
|
|
- if (jsonObject == null || jsonObject.isEmpty()) {
|
|
|
- resultMap.put("attr", new ArrayList<>());
|
|
|
- resultMap.put("value", new ArrayList<>());
|
|
|
- resultMap.put("header", new ArrayList<>());
|
|
|
- return resultMap;
|
|
|
- }
|
|
|
- List<ProductArrtDTO> fromatDetailDTOList = JSON.parseArray(jsonStr, ProductArrtDTO.class);
|
|
|
+ resultMap.put("attr", new ArrayList<>());
|
|
|
+ resultMap.put("value", new ArrayList<>());
|
|
|
+ resultMap.put("header", new ArrayList<>());
|
|
|
+
|
|
|
+ List<ProductArrtDTO> fromatDetailDTOList = productArr;
|
|
|
DetailVO detailDto = this.attrFormat(fromatDetailDTOList);
|
|
|
List<Map<String, Object>> headerMapList = null;
|
|
|
List<Map<String, Object>> valueMapList = new ArrayList<>();
|