提交 fcee746c 编写于 作者: Skyeye云's avatar Skyeye云

小程序组件属性添加子查询属性值

上级 d8a0114f
......@@ -13,4 +13,6 @@ public interface SmProjectPageModeDao {
public List<Map<String, Object>> queryPropertyListByMemberId(Map<String, Object> map) throws Exception;
public List<Map<String, Object>> queryPropertyValuesListByPropertyId(Map<String, Object> map) throws Exception;
}
......@@ -88,6 +88,12 @@ public class SmProjectPageModeServiceImpl implements SmProjectPageModeService{
Map<String, Object> map = inputObject.getParams();
List<Map<String, Object>> beans = smProjectPageModeDao.queryPropertyListByMemberId(map);
if(beans != null && !beans.isEmpty()){
for(Map<String, Object> bean : beans){
if("1".equals(bean.get("selChildData").toString())){//子查询设置为是
List<Map<String, Object>> propertyValues = smProjectPageModeDao.queryPropertyValuesListByPropertyId(map);
bean.put("propertyValue", propertyValues);
}
}
outputObject.setBeans(beans);
outputObject.settotal(beans.size());
}
......
......@@ -50,4 +50,12 @@
AND b.id = a.property_id
</select>
<select id="queryPropertyValuesListByPropertyId" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.property_value name
FROM
rm_property_value a
WHERE a.property_id = #{id}
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册