个人桩启动充电

This commit is contained in:
Guoqs
2024-06-20 16:36:25 +08:00
parent c6aa654052
commit 58710aedf3
16 changed files with 213 additions and 83 deletions

View File

@@ -9,7 +9,7 @@
<result column="pile_sn" jdbcType="VARCHAR" property="pileSn" />
<result column="pile_connector_code" jdbcType="VARCHAR" property="pileConnectorCode" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="reserved_type" jdbcType="VARCHAR" property="reservedType" />
<result column="reservation_type" jdbcType="VARCHAR" property="reservationType" />
<result column="start_time" jdbcType="TIME" property="startTime" />
<result column="end_time" jdbcType="TIME" property="endTime" />
<result column="freq" jdbcType="VARCHAR" property="freq" />
@@ -21,7 +21,7 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, member_id, pile_sn, pile_connector_code, `status`, reserved_type, start_time,
id, member_id, pile_sn, pile_connector_code, `status`, reservation_type, start_time,
end_time, freq, create_by, create_time, update_by, update_time, del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
@@ -38,16 +38,16 @@
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.PileReservationInfo" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into pile_reservation_info (member_id, pile_sn, pile_connector_code,
`status`, reserved_type, start_time,
end_time, freq, create_by,
create_time, update_by, update_time,
del_flag)
values (#{memberId,jdbcType=VARCHAR}, #{pileSn,jdbcType=VARCHAR}, #{pileConnectorCode,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{reservedType,jdbcType=VARCHAR}, #{startTime,jdbcType=TIME},
#{endTime,jdbcType=TIME}, #{freq,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{delFlag,jdbcType=CHAR})
insert into pile_reservation_info (member_id, pile_sn, pile_connector_code,
`status`, reservation_type, start_time,
end_time, freq, create_by,
create_time, update_by, update_time,
del_flag)
values (#{memberId,jdbcType=VARCHAR}, #{pileSn,jdbcType=VARCHAR}, #{pileConnectorCode,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{reservationType,jdbcType=VARCHAR}, #{startTime,jdbcType=TIME},
#{endTime,jdbcType=TIME}, #{freq,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{delFlag,jdbcType=CHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.PileReservationInfo" useGeneratedKeys="true">
<!--@mbg.generated-->
@@ -65,8 +65,8 @@
<if test="status != null">
`status`,
</if>
<if test="reservedType != null">
reserved_type,
<if test="reservationType != null">
reservation_type,
</if>
<if test="startTime != null">
start_time,
@@ -106,8 +106,8 @@
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="reservedType != null">
#{reservedType,jdbcType=VARCHAR},
<if test="reservationType != null">
#{reservationType,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
#{startTime,jdbcType=TIME},
@@ -151,8 +151,8 @@
<if test="status != null">
`status` = #{status,jdbcType=VARCHAR},
</if>
<if test="reservedType != null">
reserved_type = #{reservedType,jdbcType=VARCHAR},
<if test="reservationType != null">
reservation_type = #{reservationType,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=TIME},
@@ -185,18 +185,18 @@
<!--@mbg.generated-->
update pile_reservation_info
set member_id = #{memberId,jdbcType=VARCHAR},
pile_sn = #{pileSn,jdbcType=VARCHAR},
pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
reserved_type = #{reservedType,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=TIME},
end_time = #{endTime,jdbcType=TIME},
freq = #{freq,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
del_flag = #{delFlag,jdbcType=CHAR}
pile_sn = #{pileSn,jdbcType=VARCHAR},
pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
reservation_type = #{reservationType,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=TIME},
end_time = #{endTime,jdbcType=TIME},
freq = #{freq,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
del_flag = #{delFlag,jdbcType=CHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateBatch" parameterType="java.util.List">
@@ -223,9 +223,9 @@
when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="reserved_type = case" suffix="end,">
<trim prefix="reservation_type = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.reservedType,jdbcType=VARCHAR}
when id = #{item.id,jdbcType=INTEGER} then #{item.reservationType,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="start_time = case" suffix="end,">
@@ -306,10 +306,10 @@
</if>
</foreach>
</trim>
<trim prefix="reserved_type = case" suffix="end,">
<trim prefix="reservation_type = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.reservedType != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.reservedType,jdbcType=VARCHAR}
<if test="item.reservationType != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.reservationType,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
@@ -378,15 +378,15 @@
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into pile_reservation_info
(member_id, pile_sn, pile_connector_code, `status`, reserved_type, start_time, end_time,
(member_id, pile_sn, pile_connector_code, `status`, reservation_type, start_time, end_time,
freq, create_by, create_time, update_by, update_time, del_flag)
values
<foreach collection="list" item="item" separator=",">
(#{item.memberId,jdbcType=VARCHAR}, #{item.pileSn,jdbcType=VARCHAR}, #{item.pileConnectorCode,jdbcType=VARCHAR},
#{item.status,jdbcType=VARCHAR}, #{item.reservedType,jdbcType=VARCHAR}, #{item.startTime,jdbcType=TIME},
#{item.endTime,jdbcType=TIME}, #{item.freq,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
#{item.delFlag,jdbcType=CHAR})
(#{item.memberId,jdbcType=VARCHAR}, #{item.pileSn,jdbcType=VARCHAR}, #{item.pileConnectorCode,jdbcType=VARCHAR},
#{item.status,jdbcType=VARCHAR}, #{item.reservationType,jdbcType=VARCHAR}, #{item.startTime,jdbcType=TIME},
#{item.endTime,jdbcType=TIME}, #{item.freq,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
#{item.delFlag,jdbcType=CHAR})
</foreach>
</insert>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.PileReservationInfo" useGeneratedKeys="true">
@@ -400,7 +400,7 @@
pile_sn,
pile_connector_code,
`status`,
reserved_type,
reservation_type,
start_time,
end_time,
freq,
@@ -419,7 +419,7 @@
#{pileSn,jdbcType=VARCHAR},
#{pileConnectorCode,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR},
#{reservedType,jdbcType=VARCHAR},
#{reservationType,jdbcType=VARCHAR},
#{startTime,jdbcType=TIME},
#{endTime,jdbcType=TIME},
#{freq,jdbcType=VARCHAR},
@@ -438,7 +438,7 @@
pile_sn = #{pileSn,jdbcType=VARCHAR},
pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
reserved_type = #{reservedType,jdbcType=VARCHAR},
reservation_type = #{reservationType,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=TIME},
end_time = #{endTime,jdbcType=TIME},
freq = #{freq,jdbcType=VARCHAR},
@@ -468,8 +468,8 @@
<if test="status != null">
`status`,
</if>
<if test="reservedType != null">
reserved_type,
<if test="reservationType != null">
reservation_type,
</if>
<if test="startTime != null">
start_time,
@@ -513,8 +513,8 @@
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="reservedType != null">
#{reservedType,jdbcType=VARCHAR},
<if test="reservationType != null">
#{reservationType,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
#{startTime,jdbcType=TIME},
@@ -558,8 +558,8 @@
<if test="status != null">
`status` = #{status,jdbcType=VARCHAR},
</if>
<if test="reservedType != null">
reserved_type = #{reservedType,jdbcType=VARCHAR},
<if test="reservationType != null">
reservation_type = #{reservationType,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=TIME},
@@ -606,4 +606,14 @@
and member_id = #{memberId,jdbcType=VARCHAR}
and pile_sn = #{pileSn,jdbcType=VARCHAR}
</select>
<select id="selectActiveReservationByPileConnectorCode" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from pile_reservation_info
where del_flag = '0'
and reservation_type = 'single'
and status = '1'
and pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR}
</select>
</mapper>