lxw
2022-10-26 615de59f2a3d0e9da9a4e98817d60322a373d450
修改mapper.xml
7个文件已修改
44 ■■■■ 已修改文件
src/main/resources/mapper/BattgroupDataMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/BattgroupInfoMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/DataBaseMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/FileInfoMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/FileParamMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/StationInfoMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/StationMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/BattgroupDataMapper.xml
@@ -15,7 +15,7 @@
    </delete>
    <select id="getListWithTestTime" resultType="com.whyc.pojo.BattgroupData">
        SELECT data.*,info.test_time FROM db_res_meter.tb_battgroup_data data,db_res_meter.tb_battgroup_info info
        SELECT data.*,info.test_time FROM tb_battgroup_data data,tb_battgroup_info info
        where data.battGroup_id = info.battGroup_id and data.battGroup_id = #{battGroupId}
    </select>
</mapper>
src/main/resources/mapper/BattgroupInfoMapper.xml
@@ -4,6 +4,6 @@
    <select id="selectMaxId" resultType="java.lang.Integer">
        select ifnull(max(battGroup_id),"100000001") from db_res_meter.tb_battgroup_info limit 1
        select ifnull(max(battGroup_id),"100000001") from tb_battgroup_info limit 1
    </select>
</mapper>
src/main/resources/mapper/DataBaseMapper.xml
@@ -2,12 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.whyc.mapper.DataBaseMapper">
    <insert id="insertTestData">
        insert into db_res_meter.tb_test_data(monvolstd,moncapstd,battproducer,battmodel,test_cap,mon_vol) values (12,150,"双登","150dt",149,10.5)
        insert into tb_test_data(monvolstd,moncapstd,battproducer,battmodel,test_cap,mon_vol) values (12,150,"双登","150dt",149,10.5)
    </insert>
    <update id="createTestData">
        CREATE TABLE IF NOT EXISTS db_res_meter.tb_test_data (
        CREATE TABLE IF NOT EXISTS tb_test_data (
            num int(11) NOT NULL AUTO_INCREMENT,
            monvolstd float NOT NULL DEFAULT '0',
            moncapstd float NOT NULL DEFAULT '0',
src/main/resources/mapper/FileInfoMapper.xml
@@ -6,20 +6,20 @@
    </delete>
    <select id="selectMaxId" resultType="java.lang.Integer">
        select ifnull(max(file_id),"10001") from db_res_meter.tb_file_info limit 1
        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 db_res_meter.tb_file_info
        where  station_id=#{stationId} and file_url=#{filePath}
        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  db_res_meter.tb_file_info where  station_id=#{stationId}
        select distinct file_id from  tb_file_info where  station_id=#{stationId}
    </select>
    <select id="selectFileInStation" resultType="fileinfo">
        select distinct  db_res_meter.tb_file_info.*,db_res_meter.tb_station_info.station_name
        from db_res_meter.tb_file_info,db_res_meter.tb_station_info
        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>
src/main/resources/mapper/FileParamMapper.xml
@@ -27,7 +27,7 @@
    <select id="getMonVolStd" resultType="Integer">
        select distinct ROUND(batt_vol) from db_res_meter.tb_file_param
        select distinct ROUND(batt_vol) from tb_file_param
    </select>
    <resultMap id="dataList" type="fileParam">
        <id column="num" property="num"></id>
@@ -67,7 +67,7 @@
    </resultMap>
    <select id="getDataByCondition" resultMap="dataList">
        select distinct tb_file_param.*,tb_station_info.station_name
                        from db_res_meter.tb_file_param,db_res_meter.tb_station_info,db_res_meter.tb_file_info
                        from tb_file_param,tb_station_info,tb_file_info
        where tb_station_info.station_id=tb_file_info.station_id
              and tb_file_param.file_id=tb_file_info.file_id
        <if test="testTime1!=null">
src/main/resources/mapper/StationInfoMapper.xml
@@ -21,21 +21,21 @@
                when 0 then '400000000'
                else max(station_id)
                end maxId
        from db_res_meter.tb_station_info limit 1
        from tb_station_info limit 1
    </select>
    <select id="selectIdByName" resultType="java.lang.Integer">
        select ifnull(station_id,0) from db_res_meter.tb_station_info where station_name=#{stationName} limit 1
        select ifnull(station_id,0) from tb_station_info where station_name=#{stationName} limit 1
    </select>
    <select id="selectIdByName2" resultType="StationInfo">
        select distinct station_id,station_name from db_res_meter.tb_station_info where station_name1=#{stationName1} and station_name2=#{stationName2}
        select distinct station_id,station_name from tb_station_info where station_name1=#{stationName1} and station_name2=#{stationName2}
    </select>
    <select id="selectIdByName3" resultType="StationInfo">
        select distinct station_id,station_name from db_res_meter.tb_station_info where station_name1=#{stationName1} and station_name2=#{stationName2} and station_name3=#{stationName3}
        select distinct station_id,station_name from tb_station_info where station_name1=#{stationName1} and station_name2=#{stationName2} and station_name3=#{stationName3}
    </select>
    <select id="selectIdByName1" resultType="StationInfo">
        select distinct station_id,station_name from db_res_meter.tb_station_info where station_name1=#{stationName1}
        select distinct station_id,station_name from tb_station_info where station_name1=#{stationName1}
    </select>
    <select id="getByFileId" resultType="com.whyc.pojo.StationInfo">
        SELECT si.* FROM db_res_meter.tb_battgroup_info bi,tb_station_info si where bi.station_id = si.station_id and bi.file_id = #{fileId} limit 1
        SELECT si.* FROM tb_battgroup_info bi,tb_station_info si where bi.station_id = si.station_id and bi.file_id = #{fileId} limit 1
    </select>
</mapper>
src/main/resources/mapper/StationMapper.xml
@@ -7,7 +7,7 @@
        </collection>
    </resultMap>
    <select id="getStation" resultMap="stationList">
        SELECT distinct station_name1 from db_res_meter.tb_station_info
        SELECT distinct station_name1 from tb_station_info
    </select>
    <resultMap id="name2List" type="StationName2">
@@ -17,7 +17,7 @@
        </collection>
    </resultMap>
    <select id="selectSName2" resultMap="name2List">
        SELECT distinct #{station1} as station1,station_name2 from db_res_meter.tb_station_info
        SELECT distinct #{station1} as station1,station_name2 from tb_station_info
        where station_name1=#{station1}
    </select>
@@ -30,12 +30,12 @@
        </collection>
    </resultMap>
    <select id="selectSName3" resultMap="name3List">
        SELECT distinct #{station1} as station1, #{station2} as station2,station_name3,station_id from db_res_meter.tb_station_info
        SELECT distinct #{station1} as station1, #{station2} as station2,station_name3,station_id from tb_station_info
        where station_name1=#{station1} and station_name2=#{station2}
    </select>
    <select id="selectFileName" resultType="fileName">
        SELECT distinct file_id,file_name,file_url from db_res_meter.tb_file_info
        SELECT distinct file_id,file_name,file_url from tb_file_info
        where station_id=#{stationId}
    </select>
</mapper>