调整动态表单问题
This commit is contained in:
parent
d31e3d93dc
commit
8276c9a377
@ -82,4 +82,13 @@ public interface IDynamicDataDao {
|
||||
* @throws SearchException
|
||||
*/
|
||||
Map<String, Object> getDynamicJoinData(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 动态数据(链接)列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<Map<String, Object>> listDynamicJoinData(Map<String, Object> params) throws SearchException;
|
||||
}
|
||||
|
@ -161,6 +161,17 @@ public interface IDynamicDataService {
|
||||
*/
|
||||
Map<String, Object> getDynamicJoinData(String tableName, String joinKey, String joinId) throws SearchException;
|
||||
|
||||
/**
|
||||
* 动态数据详情
|
||||
*
|
||||
* @param tableName
|
||||
* @param joinKey
|
||||
* @param joinIds
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<Map<String, Object>> listDynamicJoinData(String tableName, String joinKey, List<String> joinIds) throws SearchException;
|
||||
|
||||
/**
|
||||
* 设置表字段为驼峰式
|
||||
*
|
||||
|
@ -206,6 +206,22 @@ public class DynamicDataServiceImpl extends AbstractService implements IDynamicD
|
||||
return dynamicData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> listDynamicJoinData(String tableName, String joinKey, List<String> joinIds) throws SearchException {
|
||||
Map<String, Object> params = getHashMap(0);
|
||||
setSearchBaseGetInfo(tableName, params);
|
||||
params.put("joinKey", WStringUtil.lowerUpper2UnderLine(joinKey));
|
||||
params.put("joinIds", joinIds);
|
||||
List<Map<String, Object>> dynamicDatas = dynamicDataDao.listDynamicJoinData(params);
|
||||
if (Objects.isNull(dynamicDatas)) {
|
||||
dynamicDatas = new ArrayList<>();
|
||||
}
|
||||
for (Map<String, Object> dynamicData : dynamicDatas) {
|
||||
resetDynamicDataKey2LowerUpper(dynamicData);
|
||||
}
|
||||
return dynamicDatas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetDynamicDataKey2LowerUpper(List<Map<String, Object>> listDynamicData) {
|
||||
for (Map<String, Object> dynamicData : listDynamicData) {
|
||||
|
@ -195,4 +195,22 @@
|
||||
${joinKey} = #{joinId}
|
||||
</select>
|
||||
|
||||
<!-- 动态数据详情 -->
|
||||
<select id="listDynamicJoinData" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
${uuidField}
|
||||
<foreach collection="formShowFieldList" item="item" open="," separator="," close="">
|
||||
${item}
|
||||
</foreach>
|
||||
FROM
|
||||
${tableName}
|
||||
WHERE
|
||||
is_delete = 0
|
||||
AND
|
||||
${joinKey} IN
|
||||
<foreach collection="joinIds" index="index" open="(" separator="," close=")">
|
||||
#{joinIds[${index}]}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user