...
|
...
|
@@ -61,6 +61,25 @@ public class TblLogicService { |
|
|
}
|
|
|
};
|
|
|
|
|
|
public final static Map<Integer, String> colorFieldMap = new HashMap<Integer, String>() {
|
|
|
{
|
|
|
put(1, "白色");
|
|
|
put(2, "黑色");
|
|
|
put(3, "灰色");
|
|
|
put(4, "棕色");
|
|
|
put(6, "绿色");
|
|
|
put(7, "蓝色");
|
|
|
put(8, "紫色");
|
|
|
put(9, "黄色");
|
|
|
put(11, "红色");
|
|
|
put(12, "橙色");
|
|
|
put(13, "银色");
|
|
|
put(14, "金色");
|
|
|
put(15, "彩色");
|
|
|
put(19, "棕卡其");
|
|
|
}
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 全量构建
|
|
|
*/
|
...
|
...
|
@@ -359,13 +378,13 @@ public class TblLogicService { |
|
|
JSONArray goodsArray = new JSONArray();
|
|
|
for (TblProductSkc skc : tblProductSkcs) {
|
|
|
// 颜色名称
|
|
|
colorNames.append(skc.getColor() + ",");
|
|
|
colorNames.append(colorFieldMap.get(skc.getColorSysId()) + ",");
|
|
|
colorIds.append(skc.getColorSysId() + ",");
|
|
|
jsonArray = JSONArray.parseArray(tblProductSkc.getPics());
|
|
|
String skcDefaultImages = getCover(jsonArray, false);
|
|
|
JSONObject jsonObj = new JSONObject();
|
|
|
jsonObj.put("goods_id", skc.getProductSkc() == null ? "" : skc.getProductSkc());
|
|
|
jsonObj.put("color_name", skc.getColor() == null ? "" : skc.getColor());
|
|
|
jsonObj.put("color_name", colorFieldMap.get(skc.getColorSysId()) == null ? "" : colorFieldMap.get(skc.getColorSysId()));
|
|
|
jsonObj.put("color_id", skc.getColorSysId() == null ? "" : skc.getColorSysId());
|
|
|
jsonObj.put("cover_1", "");
|
|
|
jsonObj.put("cover_2", "");
|
...
|
...
|
|