whyclxw
2025-03-31 b46f7fa6d77852ae9e28a062da234a2ddf9405fb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?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.whyc.mapper.FileInfoMapper">
    <delete id="deleteFileInStation">
        delete from tb_file_info where  station_id=#{stationId} and file_id=#{fileId}
    </delete>
 
    <select id="selectMaxId" resultType="java.lang.Integer">
        select ifnull(max(file_id),"10001") from tb_file_info limit 1
    </select>
    <select id="selectFileId" resultType="java.lang.Integer">
        select ifnull(file_id,0) from tb_file_info
        where  station_id=#{stationId} and file_url=#{filePath} limit 1
    </select>
    <select id="selectListFiles" resultType="java.lang.Integer">
        select distinct file_id from  tb_file_info where  station_id=#{stationId}
    </select>
 
 
    <select id="selectFileInStation" resultType="fileinfo">
        select distinct  tb_file_info.*,tb_station_info.station_name
        from tb_file_info,tb_station_info
        where tb_file_info.station_id=tb_station_info.station_id
        order by tb_file_info.station_id asc
    </select>
    <select id="selectFileIds" resultType="java.lang.String">
        select distinct  file_id from  tb_file_info where station_id=#{stationId}
    </select>
</mapper>