智慧农业后台管理
tangzy
2022-06-15 e71881a6ade967e45ba62b802028e2a2d2dfdee0
src/main/java/org/springblade/modules/traceability/mapper/TraceabilityMapper.xml
@@ -4,10 +4,17 @@
    <!--自定义查询农场养殖记录分页数据-->
    <select id="selectTraceabilityPage" resultType="org.springblade.modules.traceability.vo.TraceabilityVO">
        select * from sys_traceability
        select st.* from sys_traceability st
        left join sys_recovery sr on st.recovery_id = sr.id
        where 1=1
        <if test="traceability.code!=null and traceability.code!=''">
            and code = #{traceability.code}
            and st.code = #{traceability.code}
        </if>
        <if test="traceability.deptId!=null and traceability.deptId!=''">
            and st.dept_id = #{traceability.deptId}
        </if>
        <if test="traceability.tenantId!=null and traceability.tenantId!=''">
            and st.tenant_id = #{traceability.tenantId}
        </if>
    </select>
</mapper>