I2代码遥信修改

master
liuguijing 2 years ago
parent 9cc4881bd3
commit 0c5533b137

@ -0,0 +1,17 @@
package com.shxy.i2.dao;
import com.shxy.i2.dto.Data_YxlDto;
import com.shxy.i2.entity.Data_Yx;
import org.apache.ibatis.annotations.Param;
import java.math.BigInteger;
import java.util.List;
public interface Data_YxDao {
List<Data_YxlDto> selectByPrimaryKey(@Param("maxid") BigInteger maxid);
int updateByPrimaryKey(Data_Yx record);
}

@ -0,0 +1,17 @@
package com.shxy.i2.dao;
import com.shxy.i2.entity.Upload_check;
public interface Upload_checkDao {
int deleteByPrimaryKey(String checkType);
int insert(Upload_check record);
int insertSelective(Upload_check record);
Upload_check selectByPrimaryKey(String checkType);
int updateByPrimaryKeySelective(Upload_check record);
int updateByPrimaryKey(Upload_check record);
}

@ -0,0 +1,20 @@
package com.shxy.i2.entity;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class Data_Yx implements Serializable {
private Long id;
private Integer sadr;
private Date dTime;
private Integer ival;
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,19 @@
package com.shxy.i2.entity;
import lombok.Data;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
@Data
public class Upload_check implements Serializable {
private String checkType;
private BigInteger value;
private Date updateTime;
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,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.shxy.i2.dao.Data_YxDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.dto.Data_YxlDto">
<result column="sadr" jdbcType="INTEGER" property="sadr"/>
<result column="d_time" jdbcType="TIMESTAMP" property="dTime"/>
<result column="ival" jdbcType="INTEGER" property="ival"/>
<result column="field" jdbcType="VARCHAR" property="field"/>
<result column="sensor_code" jdbcType="VARCHAR" property="sensorCode"/>
<result column="equipment_id" jdbcType="VARCHAR" property="equipmentId"/>
<result column="table_name" jdbcType="VARCHAR" property="tableName"/>
</resultMap>
<sql id="Base_Column_List">
sadr, d_time, ival,field,sensor_code,equipment_id,table_name,phase
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap">
select
a.sadr as sadr,
a.d_time as d_time,
a.ival as ival,
b.field as field,
c.sensor_code as sensor_code,
c.equipment_id as equipment_id,
c.table_name as table_name,
c.phase as phase
from data_yx a left join niec_points b on a.sadr = b.sadr left join niec_sensors c on b.sensor_id = c.id
where id <![CDATA[>]]> #{maxid}
</select>
</mapper>

@ -0,0 +1,24 @@
<?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.shxy.i2.dao.Upload_checkDao">
<resultMap id="BaseResultMap" type="com.shxy.i2.entity.Upload_check">
<id column="check_type" jdbcType="VARCHAR" property="checkType"/>
<result column="value" jdbcType="BIGINT" property="value"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap>
<sql id="Base_Column_List">
check_type, value, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from upload_check
where check_type = #{checkType,jdbcType=VARCHAR}
</select>
<update id="updateByPrimaryKey" >
update upload_check
set value = #{value,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where check_type = #{checkType,jdbcType=VARCHAR}
</update>
</mapper>
Loading…
Cancel
Save