zrj
2024-11-05 b8f2c19b869986efa519f1846b63b11378147861
src/main/java/org/springblade/modules/yw/mapper/RescueTeamMapper.xml
@@ -16,8 +16,26 @@
    </resultMap>
    <!--自定义分页查询-->
    <select id="selectRescueTeamPage" resultMap="rescueTeamResultMap">
        select * from yw_rescue_team where is_deleted = 0
    <select id="selectRescueTeamPage" resultType="org.springblade.modules.yw.vo.RescueTeamVO">
        select
        yrt.*,
        yfi.name as firmName
        from
        yw_rescue_team yrt
        left join yw_firm_info yfi on yfi.id = yrt.firm_id and yfi.is_deleted = 0
        where yrt.is_deleted = 0
        <if test="rescueTeam.firmId!=null">
            and yrt.firm_id = #{rescueTeam.firmId}
        </if>
        <if test="rescueTeam.type!=null">
            and yrt.type = #{rescueTeam.type}
        </if>
        <if test="rescueTeam.perInCha!=null and rescueTeam.perInCha!=''">
            and yrt.per_in_cha like concat('%',#{rescueTeam.perInCha},'%')
        </if>
        <if test="rescueTeam.perInChaPho!=null and rescueTeam.perInChaPho!=''">
            and yrt.per_in_cha_pho like concat('%',#{rescueTeam.perInChaPho},'%')
        </if>
    </select>
    <!--自定义分页查询-->