|
@@ -200,6 +200,12 @@ public class GoodsServiceImpl extends BaseServiceImpl<Integer, Goods> implement
|
|
|
Map<String,String> columns = IniFileUtil.readIniFile(inputStream, TemplateTypeEnum.GOODS.getMsg());
|
|
|
List<Goods> goodsList = new ArrayList<>();
|
|
|
Map<String, Integer> map = getMap("goods_category","name_","id_",true,String.class,Integer.class);
|
|
|
+ Map<String,String> courseViewTypeMap = new HashMap<>();
|
|
|
+ courseViewTypeMap.put("系统收费","0");
|
|
|
+ courseViewTypeMap.put("系统收费\\课程收费","0,1");
|
|
|
+ courseViewTypeMap.put("系统收费\\云教练收费","0,2");
|
|
|
+ courseViewTypeMap.put("课程收费\\云教练收费","1,2");
|
|
|
+ courseViewTypeMap.put("系统收费\\课程收费\\云教练收费","0,1,2");
|
|
|
for (String e : sheetsListMap.keySet()) {
|
|
|
List<Map<String, Object>> sheet = sheetsListMap.get(e);
|
|
|
valueIsNull: for (Map<String, Object> row : sheet) {
|
|
@@ -216,6 +222,17 @@ public class GoodsServiceImpl extends BaseServiceImpl<Integer, Goods> implement
|
|
|
LOGGER.error("商品导入异常:参数{}不可为空 param:{}",columnValue,objectMap);
|
|
|
continue valueIsNull;
|
|
|
}
|
|
|
+ if (columnValue.equals("courseViewType")) {
|
|
|
+ if(row.get(s) != null){
|
|
|
+ for (String courseViewType : courseViewTypeMap.keySet()) {
|
|
|
+ if (courseViewType.equals(row.get(s).toString())) {
|
|
|
+ objectMap.put(columnValue, courseViewTypeMap.get(courseViewType));
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ continue;
|
|
|
+ }
|
|
|
if (columnValue.equals("type")) {
|
|
|
for (GoodsType goodsType : GoodsType.values()) {
|
|
|
if (goodsType.getDesc().equals(row.get(s).toString())) {
|