diff --git a/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/dao/dynamic/IDynamicDataDao.java b/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/dao/dynamic/IDynamicDataDao.java index a95e2e0..1533e80 100644 --- a/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/dao/dynamic/IDynamicDataDao.java +++ b/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/dao/dynamic/IDynamicDataDao.java @@ -82,4 +82,13 @@ public interface IDynamicDataDao { * @throws SearchException */ Map getDynamicJoinData(Map params) throws SearchException; + + /** + * 动态数据(链接)列表 + * + * @param params + * @return + * @throws SearchException + */ + List> listDynamicJoinData(Map params) throws SearchException; } diff --git a/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/service/dynamic/IDynamicDataService.java b/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/service/dynamic/IDynamicDataService.java index 9c7055a..59ac79a 100644 --- a/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/service/dynamic/IDynamicDataService.java +++ b/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/service/dynamic/IDynamicDataService.java @@ -161,6 +161,17 @@ public interface IDynamicDataService { */ Map getDynamicJoinData(String tableName, String joinKey, String joinId) throws SearchException; + /** + * 动态数据详情 + * + * @param tableName + * @param joinKey + * @param joinIds + * @return + * @throws SearchException + */ + List> listDynamicJoinData(String tableName, String joinKey, List joinIds) throws SearchException; + /** * 设置表字段为驼峰式 * diff --git a/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/service/dynamic/impl/DynamicDataServiceImpl.java b/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/service/dynamic/impl/DynamicDataServiceImpl.java index c0fab4d..3be9384 100644 --- a/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/service/dynamic/impl/DynamicDataServiceImpl.java +++ b/cloud-common-plugin-dynamic/src/main/java/com/cm/common/plugin/service/dynamic/impl/DynamicDataServiceImpl.java @@ -206,6 +206,22 @@ public class DynamicDataServiceImpl extends AbstractService implements IDynamicD return dynamicData; } + @Override + public List> listDynamicJoinData(String tableName, String joinKey, List joinIds) throws SearchException { + Map params = getHashMap(0); + setSearchBaseGetInfo(tableName, params); + params.put("joinKey", WStringUtil.lowerUpper2UnderLine(joinKey)); + params.put("joinIds", joinIds); + List> dynamicDatas = dynamicDataDao.listDynamicJoinData(params); + if (Objects.isNull(dynamicDatas)) { + dynamicDatas = new ArrayList<>(); + } + for (Map dynamicData : dynamicDatas) { + resetDynamicDataKey2LowerUpper(dynamicData); + } + return dynamicDatas; + } + @Override public void resetDynamicDataKey2LowerUpper(List> listDynamicData) { for (Map dynamicData : listDynamicData) { diff --git a/cloud-common-plugin-dynamic/src/main/resources/mybatis/mapper/dynamic/dynamicdata-mapper.xml b/cloud-common-plugin-dynamic/src/main/resources/mybatis/mapper/dynamic/dynamicdata-mapper.xml index 90976aa..5ac0540 100644 --- a/cloud-common-plugin-dynamic/src/main/resources/mybatis/mapper/dynamic/dynamicdata-mapper.xml +++ b/cloud-common-plugin-dynamic/src/main/resources/mybatis/mapper/dynamic/dynamicdata-mapper.xml @@ -195,4 +195,22 @@ ${joinKey} = #{joinId} + + + \ No newline at end of file