<select id="selectIndexSetCalcuConf" resultType="com.kaishu.bigdata.confcenter.vo.response.IndexSetCalcuConfResponse">
select t1.id, t1.code,t1.sql, t1.user,t1.create_time,t1.update_time,
t2.name,t3.type_name,t3.type,t4.board
from
conf t1
left join
source t2
on t1.source_id = t2.id
LEFT JOIN
index t3
on t1.type_id = t3.id
LEFT JOIN
report t4
on t1.board_id = t4.id
where
1=1//注意下面判断语句 param.indexSetBelongBoardId 为判断map中是否有这个键,有接拼上这个条件语句//取值和判断条件一样<if test="paramMap.indexSetBelongBoardId != null">
and t1.index_set_belong_board_id = #{paramMap.indexSetBelongBoardId}</if><if test="paramMap.indexSetSourceId != null">
and t1.index_set_source_id = #{paramMap.indexSetSourceId}</if>
order by t1.update_time desc
</select>