<?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>
|