新增:机台获取数据源,新增数据源接口

This commit is contained in:
liuzhaotian
2024-07-24 09:10:56 +08:00
parent 86bf4f8cb8
commit 540e840a8d
13 changed files with 589 additions and 27 deletions
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.cf.imes.module.system.dal.mysql.datasource.DataSourceFiledMapper">
<select id="selectFiledList" resultType="com.cf.imes.module.system.controller.admin.datasource.vo.DataSourceFiledReqVO"
parameterType="java.lang.Long">
select distinct
* from system_data_source_field
where
<foreach item="ids" collection="ids" open="(" separator="OR" close=")">
source_id LIKE CONCAT('%', #{ids}, '%')
</foreach>
</select>
<select id="selectFiled" resultType="com.cf.imes.module.system.dal.dataobject.datasource.DataSourceFiledDO">
select distinct
*
from system_data_source_field
where
<foreach item="sourceFields" collection="sourceFields" open="(" separator="OR" close=")">
source_id LIKE CONCAT('%', #{sourceFields.parentId}, '%')
</foreach>
and
`key` in
<foreach collection="sourceFields" item="sourceFields" open="(" close=")" separator=",">
#{sourceFields.key}
</foreach>
</select>
<select id="selectFiledListByKey" resultType="com.cf.imes.module.system.dal.dataobject.datasource.DataSourceFiledDO">
select distinct
*
from system_data_source_field
where
`key` in
<foreach collection="keyList" item="keyList" open="(" close=")" separator=",">
#{keyList}
</foreach>
</select>
</mapper>
@@ -19,5 +19,6 @@
select a.*, b.id field_id, b.name field_name, b.source_id field_source_id, b.key field_key
from system_data_source a
left join system_data_source_field b on a.id = b.source_id
where a.type in (1,2)
</select>
</mapper>