master
admin 2 years ago
parent f3474232d1
commit 5db7e35b6a

@ -602,17 +602,19 @@ public class IdcServiceImpl implements IdcService {
/*解析到数据库*/
private boolean analyToDB(JSONObject jsonObject,MultipartFile[] files) {
if(!StringUtils.isEmpty(jsonObject.getString("tableName"))) {
if(jsonObject.getJSONObject("data")!=null) {
JSONObject object = jsonObject.getJSONObject("data");
List<Map<String,Object>> list = new ArrayList<>();
if(object instanceof List<?>) {
list = jsonObject.getObject("data", List.class);
} else {
object = jsonObject;
if(object.get("data")!=null)
list = object.getObject("data", List.class);
}
return analyData(jsonObject.getString("tableName"),jsonObject.getString("uniqueColumn"),list);
if(!StringUtils.isEmpty(object.getString("tableName")))
return analyData(object.getString("tableName"),jsonObject.getString("uniqueColumn"),list);
//图片处理
}
return false;

Loading…
Cancel
Save