zss
2023-08-09 e06fe535194cb73db903548f0e0750f508ebe5aa
standard-server/src/main/resources/mapper/TechnologyTemplateMapper.xml
@@ -6,8 +6,24 @@
        from mom_ocean.technology_template
        where state = 1
    </select>
    <select id="selTech" resultType="java.util.Map">
        select name,
    <resultMap id="selTech" type="com.yuanchu.mom.pojo.vo.TechnologyTemplateVo1">
        <id property="father" column="father" jdbcType="VARCHAR"/>
        <collection property="children" resultMap="TechnologyTemplateVo2ListMap"/>
    </resultMap>
    <resultMap id="TechnologyTemplateVo2ListMap" type="com.yuanchu.mom.pojo.vo.TechnologyTemplateVo2">
        <id property="id" column="id" jdbcType="INTEGER"/>
        <result property="name" column="name" jdbcType="VARCHAR"/>
        <result property="element" column="element" jdbcType="VARCHAR"/>
        <result property="base" column="base" jdbcType="VARCHAR"/>
        <result property="control" column="control" jdbcType="VARCHAR"/>
        <result property="note" column="note" jdbcType="VARCHAR"/>
    </resultMap>
    <select id="selTech" resultMap="selTech">
        select id,
        father,
        name,
        element,
        base,
        control,
@@ -19,12 +35,12 @@
                and type=#{type}
            </if>
            <if test="element!=null">
                and element=#{element}
                and element like concat('%',#{element},'%')
            </if>
            <if test="father!=null">
                and father=#{father}
                and father like concat('%',#{father},'%')
            </if>
        </where>
        group by father
    </select>
</mapper>