Authored by wangnan

颜色使用有货的名称

... ... @@ -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(10, "橙色");
put(11, "红色");
put(12, "橙色");
put(13, "银色");
put(14, "金色");
put(15, "彩色");
}
};
/**
* 全量构建
*/
... ... @@ -359,7 +378,7 @@ 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);
... ...