智慧农业后台管理
tangzy
2022-06-29 1d98074869643dcf23b40d99e0f24b6048fc6ff0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.traceability.mapper.TraceabilityMapper">
 
    <!--自定义查询农场养殖记录分页数据-->
    <select id="selectTraceabilityPage" resultType="org.springblade.modules.traceability.vo.TraceabilityVO">
        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 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>
 
    <select id="selectRevorid" resultType="java.lang.String">
        select recovery_id from sys_traceability where code=#{code}
    </select>
</mapper>