更新
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.fire.mapper.FireFacilityMapper">
|
||||
|
||||
|
||||
<resultMap type="FireFacility" id="FireFacilityResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="locationId" column="location_id" />
|
||||
@@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectFireFacilityList" parameterType="FireFacility" resultMap="FireFacilityResult">
|
||||
<include refid="selectFireFacilityVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="locationId != null and locationId != ''"> and location_id like concat('%', #{locationId}, '%')</if>
|
||||
<if test="facilityName != null and facilityName != ''"> and facility_name like concat('%', #{facilityName}, '%')</if>
|
||||
<if test="facilityType != null and facilityType != ''"> and facility_type = #{facilityType}</if>
|
||||
@@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectFireFacilityById" parameterType="Long" resultMap="FireFacilityResult">
|
||||
<include refid="selectFireFacilityVo"/>
|
||||
where id = #{id}
|
||||
@@ -97,9 +97,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteFireFacilityByIds" parameterType="String">
|
||||
delete from fire_facilities where id in
|
||||
delete from fire_facilities where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<!-- 根据位置ID和设施名称查询 -->
|
||||
<select id="selectByLocationAndName" resultMap="FireFacilityResult">
|
||||
<include refid="selectFireFacilityVo"/>
|
||||
where location_id = #{locationId} and facility_name = #{facilityName}
|
||||
</select>
|
||||
|
||||
|
||||
<!-- * 查询根据id查询设施列表-->
|
||||
|
||||
<select id="getDetails" resultMap="FireFacilityResult">
|
||||
<include refid="selectFireFacilityVo"/>
|
||||
<where>id = #{id} </where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user