39 lines
1.3 KiB
XML
39 lines
1.3 KiB
XML
<?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> |