Files
pasd_java/pasd-fire/target/classes/mapper/fire/FireFacilityReportMapper.xml
2025-07-30 17:15:01 +08:00

39 lines
1.3 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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="com.ruoyi.fire.mapper.FireFacilityReportMapper">
<select id="selectFireFacilityReportList" resultType="com.ruoyi.fire.domain.FireFacilityReport">
SELECT
id,
location_id AS locationId,
facility_name AS facilityName,
facility_type AS facilityType,
model_number AS modelNumber,
quantity,
entry_date AS entryDate,
production_date AS productionDate,
expiry_date AS expiryDate,
status,
remark,
create_time AS createTime,
update_time AS updateTime
FROM fire_facilities
<where>
<!-- 支持设施类型为null不筛选 -->
<if test="facilityType != null and facilityType != ''">
AND facility_type = #{facilityType}
</if>
</where>
</select>
<update id="batchUpdateStatus">
UPDATE fire_facilities
SET status = #{newStatus},
update_time = NOW()
WHERE id IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>