mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 12:05:05 +08:00
新增 第三方平台sn对应关系表
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
<?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.jsowell.pile.mapper.ThirdpartySnRelationMapper">
|
||||
|
||||
<resultMap type="com.jsowell.pile.domain.ThirdpartySnRelation" id="ThirdpartySnRelationResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="stationId" column="station_id" />
|
||||
<result property="pileSn" column="pile_sn" />
|
||||
<result property="thirdpartyType" column="thirdparty_type" />
|
||||
<result property="thirdpartyPileSn" column="thirdparty_pile_sn" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectThirdpartySnRelationVo">
|
||||
select id, station_id, pile_sn, thirdparty_type, thirdparty_pile_sn, create_time, create_by, update_time, update_by, del_flag from thirdparty_sn_relation
|
||||
</sql>
|
||||
|
||||
<select id="selectThirdpartySnRelationList" parameterType="com.jsowell.pile.domain.ThirdpartySnRelation" resultMap="ThirdpartySnRelationResult">
|
||||
<include refid="selectThirdpartySnRelationVo"/>
|
||||
<where>
|
||||
<if test="pileSn != null and pileSn != ''"> and pile_sn = #{pileSn}</if>
|
||||
<if test="thirdpartyType != null and thirdpartyType != ''"> and thirdparty_type = #{thirdpartyType}</if>
|
||||
<if test="thirdpartyPileSn != null and thirdpartyPileSn != ''"> and thirdparty_pile_sn = #{thirdpartyPileSn}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectThirdpartySnRelationById" parameterType="Long" resultMap="ThirdpartySnRelationResult">
|
||||
<include refid="selectThirdpartySnRelationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertThirdpartySnRelation" parameterType="com.jsowell.pile.domain.ThirdpartySnRelation" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into thirdparty_sn_relation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stationId != null">station_id,</if>
|
||||
<if test="pileSn != null">pile_sn,</if>
|
||||
<if test="thirdpartyType != null">thirdparty_type,</if>
|
||||
<if test="thirdpartyPileSn != null">thirdparty_pile_sn,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stationId != null">#{stationId},</if>
|
||||
<if test="pileSn != null">#{pileSn},</if>
|
||||
<if test="thirdpartyType != null">#{thirdpartyType},</if>
|
||||
<if test="thirdpartyPileSn != null">#{thirdpartyPileSn},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateThirdpartySnRelation" parameterType="com.jsowell.pile.domain.ThirdpartySnRelation">
|
||||
update thirdparty_sn_relation
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stationId != null">station_id = #{stationId},</if>
|
||||
<if test="pileSn != null">pile_sn = #{pileSn},</if>
|
||||
<if test="thirdpartyType != null">thirdparty_type = #{thirdpartyType},</if>
|
||||
<if test="thirdpartyPileSn != null">thirdparty_pile_sn = #{thirdpartyPileSn},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteThirdpartySnRelationById" parameterType="Long">
|
||||
delete from thirdparty_sn_relation where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteThirdpartySnRelationByIds" parameterType="String">
|
||||
delete from thirdparty_sn_relation where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user