|
@@ -76,6 +76,7 @@ public class AbstractAdmBaseServiceImpl<T> implements IAdmBaseService<T> {
|
|
log.info("request:{},dmpRequest:{}, dmp-param: {}", request.toString(), dmpRequest.toString(), para.toString());
|
|
log.info("request:{},dmpRequest:{}, dmp-param: {}", request.toString(), dmpRequest.toString(), para.toString());
|
|
// 调用中台查询
|
|
// 调用中台查询
|
|
DmpResult<JSONArray> dmpResult = rwdClient.queryObject(context, para);
|
|
DmpResult<JSONArray> dmpResult = rwdClient.queryObject(context, para);
|
|
|
|
+ processResultAfterQuery(dmpResult);
|
|
List<T> admVOs = AdmEntityTransferUtil.toAdmMultiEntity(dmpResult.getData(), request.getProjection(), clazz);
|
|
List<T> admVOs = AdmEntityTransferUtil.toAdmMultiEntity(dmpResult.getData(), request.getProjection(), clazz);
|
|
//List<T> admVOs = AdmEntityTransferUtil.toAdmMultiEntityExtra(dmpResult.getData(), request.getProjection(), clazz);
|
|
//List<T> admVOs = AdmEntityTransferUtil.toAdmMultiEntityExtra(dmpResult.getData(), request.getProjection(), clazz);
|
|
// 级联查询
|
|
// 级联查询
|
|
@@ -362,8 +363,20 @@ public class AbstractAdmBaseServiceImpl<T> implements IAdmBaseService<T> {
|
|
throw new RuntimeException("调用中台查询接口出错:" + response.getMessage());
|
|
throw new RuntimeException("调用中台查询接口出错:" + response.getMessage());
|
|
}
|
|
}
|
|
// 转换为结果
|
|
// 转换为结果
|
|
|
|
+ // 2021年11月3日17:45:46 by lijie 新增一个钩子方法,用于处理floor的properties字段,不然转换为对象时会报转换异常
|
|
|
|
+ processResultAfterQuery(response);
|
|
return AdmEntityTransferUtil.toAdmMultiEntity(response.getData(), null, clazz);
|
|
return AdmEntityTransferUtil.toAdmMultiEntity(response.getData(), null, clazz);
|
|
}
|
|
}
|
|
|
|
+ /***
|
|
|
|
+ * Description: 一个钩子方法,特殊处理一下楼层对象返回的properties信息点,不然转换为对象时会报转换异常
|
|
|
|
+ * @param response : 查询结果
|
|
|
|
+ * @return : void
|
|
|
|
+ * @author : lijie
|
|
|
|
+ * @date :2021/11/3 17:47
|
|
|
|
+ * Update By lijie 2021/11/3 17:47
|
|
|
|
+ */
|
|
|
|
+ protected void processResultAfterQuery(DmpResult<JSONArray> response) {
|
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
/**
|
|
* 修改
|
|
* 修改
|
|
@@ -379,11 +392,12 @@ public class AbstractAdmBaseServiceImpl<T> implements IAdmBaseService<T> {
|
|
}
|
|
}
|
|
ArrayNode vos = AdmEntityTransferUtil.toDmpMultiEntity(voList);
|
|
ArrayNode vos = AdmEntityTransferUtil.toDmpMultiEntity(voList);
|
|
// 调用中台修改
|
|
// 调用中台修改
|
|
- DmpResult<cn.hutool.json.JSONArray> response = rwdClient.updateObject(context, JSONArray.parseArray(vos.toString()));
|
|
|
|
|
|
+ DmpResult<JSONArray> response = rwdClient.updateObject(context, JSONArray.parseArray(vos.toString()));
|
|
if(!DmpResult.SUCCESS.equals(response.getResult())) {
|
|
if(!DmpResult.SUCCESS.equals(response.getResult())) {
|
|
throw new RuntimeException("调用中台查询接口出错:" + response.getMessage());
|
|
throw new RuntimeException("调用中台查询接口出错:" + response.getMessage());
|
|
}
|
|
}
|
|
// 转换为结果
|
|
// 转换为结果
|
|
|
|
+ processResultAfterQuery(response);
|
|
return AdmEntityTransferUtil.toAdmMultiEntity(response.getData(), null, clazz);
|
|
return AdmEntityTransferUtil.toAdmMultiEntity(response.getData(), null, clazz);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -425,6 +439,7 @@ public class AbstractAdmBaseServiceImpl<T> implements IAdmBaseService<T> {
|
|
}
|
|
}
|
|
// 调用中台查询
|
|
// 调用中台查询
|
|
DmpResult<JSONArray> dmpResult = rwdClient.queryObject(context, para);
|
|
DmpResult<JSONArray> dmpResult = rwdClient.queryObject(context, para);
|
|
|
|
+ processResultAfterQuery(dmpResult);
|
|
List<T> admVOs = AdmEntityTransferUtil.toAdmMultiEntity(dmpResult.getData(), null, clazz);
|
|
List<T> admVOs = AdmEntityTransferUtil.toAdmMultiEntity(dmpResult.getData(), null, clazz);
|
|
// JSONArray data = dmpResult.getData();
|
|
// JSONArray data = dmpResult.getData();
|
|
// List<T> admVOs = new ArrayList<>();
|
|
// List<T> admVOs = new ArrayList<>();
|