调整返回格式
This commit is contained in:
parent
cf845501c0
commit
e1277beb60
|
@ -232,9 +232,8 @@ public class MasterDataServiceImpl extends BaseService<ComparisonEntity, String>
|
|||
jsonObjectUser.put("mdmCode", mdmCode);
|
||||
jsonStr.put("jsonStr", jsonObjectUser);
|
||||
//先查询编码和名称查询是否存在
|
||||
JsonResultEntity jsonResultEntity = comparisonServiceimpl.queryEntityPage(jsonStr);
|
||||
Object attribute = jsonResultEntity.getAttribute();
|
||||
logger.info("得到的attribute值为:{}", attribute);
|
||||
Object attribute = comparisonServiceimpl.queryEntityPage(jsonStr);
|
||||
logger.info("得到的attribute值为:{}", jsonStr.toJSONString(attribute));
|
||||
JSONObject jsonObjectAttribute = (JSONObject) JSON.toJSON(attribute);
|
||||
JSONArray jsonArrayList = jsonObjectAttribute.getJSONArray("list");
|
||||
//如果jsonArrayList为null,说明没有值,在表中不存在
|
||||
|
@ -250,20 +249,22 @@ public class MasterDataServiceImpl extends BaseService<ComparisonEntity, String>
|
|||
hashMap.put("mdmCode", mdmCode);
|
||||
hashMap.put("optionName", "数智中台");
|
||||
jsonStr.put("jsonStr", hashMap);
|
||||
JsonResultEntity result = comparisonServiceimpl.saveEntity(jsonStr);
|
||||
if(!result.isFlag()){
|
||||
throw new BaseSystemException("主数据保存失败"+ result.getMsg());
|
||||
}
|
||||
Object result = comparisonServiceimpl.saveEntity(jsonStr);
|
||||
logger.info("新增结果为:{}", JSON.toJSONString(result));
|
||||
// if(!result.isFlag()){
|
||||
// throw new BaseSystemException("主数据保存失败"+ result.getMsg());
|
||||
// }
|
||||
} else {
|
||||
hashMap.put("appName","数智中台");
|
||||
hashMap.put("appCode","800004");
|
||||
hashMap.put("mdmCode", mdmCode);
|
||||
hashMap.put("optionName", "数智中台");
|
||||
jsonStr.put("jsonStr", hashMap);
|
||||
JsonResultEntity result = comparisonServiceimpl.updateEntity(jsonStr);
|
||||
if(!result.isFlag()){
|
||||
//throw new BaseSystemException("主数据更新失败"+ result.getMsg());
|
||||
}
|
||||
Object result = comparisonServiceimpl.updateEntity(jsonStr);
|
||||
logger.info("更新结果为:{}", JSON.toJSONString(result));
|
||||
// if(!result.isFlag()){
|
||||
// //throw new BaseSystemException("主数据更新失败"+ result.getMsg());
|
||||
// }
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue