智慧农业后台管理
guoshilong
2022-11-08 72b971c98c46531064d74b68fc8fe8864ed0b544
src/main/java/org/springblade/modules/farmplant/mapper/StrainMapper.xml
@@ -8,9 +8,20 @@
        <if test="strain.strainType!=null and strain.strainType!=''">
            and strain_type = #{strain.strainType}
        </if>
        <if test="strain.tenantId!=null and strain.tenantId!=''">
            and tenant_id = #{strain.tenantId}
        </if>
        <if test="strain.strainName!=null and strain.strainName!=''">
            and strain_name like concat('%',#{strain.strainName},'%')
        </if>
    </select>
    <select id="kindTree" resultType="java.util.Map">
        SELECT strain.id,strain.strain_name kindName,0 AS type
        FROM sys_strain strain
        UNION
        SELECT m.id ,m.machining_type,1 AS type
        FROM sys_machining m
        WHERE m.is_deleted = 0
    </select>
</mapper>