|
|
<?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.sunyo.energy.location.dao.ElectrifyInfoMapper" >
|
|
|
<resultMap id="BaseResultMap" type="com.sunyo.energy.location.model.ElectrifyInfo" >
|
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
|
<result column="deviceId" property="deviceid" jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
id, deviceId
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from electrify_info
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
|
delete from electrify_info
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.sunyo.energy.location.model.ElectrifyInfo" >
|
|
|
insert into electrify_info (id, deviceId)
|
|
|
values (#{id,jdbcType=INTEGER}, #{deviceid,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.sunyo.energy.location.model.ElectrifyInfo" >
|
|
|
insert into electrify_info
|
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
<if test="id != null" >
|
|
|
id,
|
|
|
</if>
|
|
|
<if test="deviceid != null" >
|
|
|
deviceId,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
<if test="id != null" >
|
|
|
#{id,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="deviceid != null" >
|
|
|
#{deviceid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.sunyo.energy.location.model.ElectrifyInfo" >
|
|
|
update electrify_info
|
|
|
<set >
|
|
|
<if test="deviceid != null" >
|
|
|
deviceId = #{deviceid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.sunyo.energy.location.model.ElectrifyInfo" >
|
|
|
update electrify_info
|
|
|
set deviceId = #{deviceid,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|