Commit 429ce8c3 authored by taabe's avatar taabe

sql修改

parent 1e591417
...@@ -43,19 +43,24 @@ ...@@ -43,19 +43,24 @@
<if test='par.typeCode != null'>and a.type_code = #{par.typeCode}</if> <if test='par.typeCode != null'>and a.type_code = #{par.typeCode}</if>
<if test='par.companyCode != null'>and a.company_code = #{par.companyCode}</if> <if test='par.companyCode != null'>and a.company_code = #{par.companyCode}</if>
<if test='par.name != null'>and a.name like concat('%', #{par.name}, '%')</if> <if test='par.name != null'>and a.name like concat('%', #{par.name}, '%')</if>
<if test='par.nodeType != null and par.nodeType == "1" and par.nodeIds != null and par.nodeIds.size() > 0'> <if test='par.nodeType != null and par.nodeType == "1" and par.nodeIds != null'>
and a.company in and a.company in
<foreach collection="par.nodeIds" separator="," open="(" item="nodeId" close=")"> <foreach collection="par.nodeIds" separator="," open="(" item="nodeId" close=")">
#{nodeId} #{nodeId}
</foreach> </foreach>
</if> </if>
<if test='par.nodeType != null and par.nodeType == "0" and par.nodeIds != null and par.nodeIds.size() > 0'> <if test='par.nodeType != null and par.nodeType == "0" and par.nodeIds != null'>
<if test="par.nodeIds.size() > 0" >
and a.parent in and a.parent in
<foreach collection="par.nodeIds" separator="," open="(" item="nodeId" close=")"> <foreach collection="par.nodeIds" separator="," open="(" item="nodeId" close=")">
#{nodeId} #{nodeId}
</foreach> </foreach>
or a.sequence_nbr = #{par.nodeId} or a.sequence_nbr = #{par.nodeId}
</if> </if>
<if test="par.nodeIds.size() == 0" >
and a.sequence_nbr = #{par.nodeId}
</if>
</if>
</select> </select>
<select id="listFireTeamDto" resultType="com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto"> <select id="listFireTeamDto" resultType="com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto">
select t.*, p.name parentName select t.*, p.name parentName
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment