You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.1 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.xydl.mapper.OperationDB">
<select id="getAllDevId" parameterType="String" resultType="String">
select distinct eqmid from ${tableName}
</select>
<select id="getEarliestTime4Other" parameterType="String" resultType="String">
select d_time from ${value} where eqmid=#{devId} ORDER BY d_time asc limit 1
</select>
<select id="getEarliestTime4Eaif" parameterType="String" resultType="String">
select capturetime from ${value} where eqmid=#{param2} ORDER BY capturetime asc limit 1
</select>
<select id="getDataEqmids" parameterType="String" resultType="Integer">
select distinct eqmid from ${value}
</select>
<select id="getSyncRecordDevIds" parameterType="String" resultType="Integer">
select devid_val from sync_records where table_name = #{tableName}
</select>
<select id="getFieldMap" parameterType="String" resultType="Map">
select field_name, dest_field_name from sync_fields_info where table_name=#{tableName}
</select>
<select id="getAllTable" resultType="String">
select table_name from sync_tables_info
</select>
<select id="getSQL" parameterType="String" resultType="String">
select `sql` from sync_tables_info where table_name = #{tableName}
</select>
<select id="getDeviceIDAndtime" parameterType="String" resultType="Map">
select devid_val,field_val2 from sync_records where table_name = #{tableName}
</select>
<insert id="addEarliestTime" parameterType="String" >
insert into sync_records (client_id,table_name,devid_val,field_val2) values (#{clientId},#{tableName},#{devId},#{earliestTime})
</insert>
<select id="getData" parameterType="String" resultType="Map">
${sql}
</select>
<update id="updateSyncRecordsTable" parameterType="String" >
update sync_records set field_val2 = #{time} where table_name = #{tableName} and devid_val = #{deviceID}
</update>
</mapper>