mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
深圳停车平台
This commit is contained in:
@@ -0,0 +1,495 @@
|
||||
<?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.ChargeParkingDiscountMapper">
|
||||
<resultMap id="BaseResultMap" type="com.jsowell.pile.domain.ChargeParkingDiscount">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table charge_parking_discount-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="station_id" jdbcType="VARCHAR" property="stationId" />
|
||||
<result column="parking_platform_id" jdbcType="INTEGER" property="parkingPlatformId" />
|
||||
<result column="condition_type" jdbcType="VARCHAR" property="conditionType" />
|
||||
<result column="condition_value" jdbcType="VARCHAR" property="conditionValue" />
|
||||
<result column="discount_type" jdbcType="VARCHAR" property="discountType" />
|
||||
<result column="discount_value" jdbcType="VARCHAR" property="discountValue" />
|
||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="del_flag" jdbcType="CHAR" property="delFlag" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, station_id, parking_platform_id, condition_type, condition_value, discount_type,
|
||||
discount_value, start_time, end_time, create_by, create_time, update_by, update_time,
|
||||
del_flag
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from charge_parking_discount
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<!--@mbg.generated-->
|
||||
delete from charge_parking_discount
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.ChargeParkingDiscount" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into charge_parking_discount
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stationId != null">
|
||||
station_id,
|
||||
</if>
|
||||
<if test="parkingPlatformId != null">
|
||||
parking_platform_id,
|
||||
</if>
|
||||
<if test="conditionType != null">
|
||||
condition_type,
|
||||
</if>
|
||||
<if test="conditionValue != null">
|
||||
condition_value,
|
||||
</if>
|
||||
<if test="discountType != null">
|
||||
discount_type,
|
||||
</if>
|
||||
<if test="discountValue != null">
|
||||
discount_value,
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time,
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time,
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
update_by,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
del_flag,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stationId != null">
|
||||
#{stationId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parkingPlatformId != null">
|
||||
#{parkingPlatformId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="conditionType != null">
|
||||
#{conditionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="conditionValue != null">
|
||||
#{conditionValue,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="discountType != null">
|
||||
#{discountType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="discountValue != null">
|
||||
#{discountValue,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
#{startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
#{endTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
#{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
#{updateBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
#{delFlag,jdbcType=CHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.ChargeParkingDiscount">
|
||||
<!--@mbg.generated-->
|
||||
update charge_parking_discount
|
||||
<set>
|
||||
<if test="stationId != null">
|
||||
station_id = #{stationId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parkingPlatformId != null">
|
||||
parking_platform_id = #{parkingPlatformId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="conditionType != null">
|
||||
condition_type = #{conditionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="conditionValue != null">
|
||||
condition_value = #{conditionValue,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="discountType != null">
|
||||
discount_type = #{discountType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="discountValue != null">
|
||||
discount_value = #{discountValue,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
update_by = #{updateBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
del_flag = #{delFlag,jdbcType=CHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateBatchSelective" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update charge_parking_discount
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="station_id = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.stationId != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.stationId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="parking_platform_id = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.parkingPlatformId != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.parkingPlatformId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="condition_type = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.conditionType != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.conditionType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="condition_value = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.conditionValue != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.conditionValue,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="discount_type = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.discountType != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.discountType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="discount_value = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.discountValue != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.discountValue,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="start_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.startTime != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.startTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="end_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.endTime != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.endTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="create_by = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.createBy != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="create_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.createTime != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="update_by = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.updateBy != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.updateBy,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="update_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.updateTime != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="del_flag = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.delFlag != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.delFlag,jdbcType=CHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||
#{item.id,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</update>
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into charge_parking_discount
|
||||
(station_id, parking_platform_id, condition_type, condition_value, discount_type,
|
||||
discount_value, start_time, end_time, create_by, create_time, update_by, update_time,
|
||||
del_flag)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.stationId,jdbcType=VARCHAR}, #{item.parkingPlatformId,jdbcType=INTEGER},
|
||||
#{item.conditionType,jdbcType=VARCHAR}, #{item.conditionValue,jdbcType=VARCHAR},
|
||||
#{item.discountType,jdbcType=VARCHAR}, #{item.discountValue,jdbcType=VARCHAR},
|
||||
#{item.startTime,jdbcType=TIMESTAMP}, #{item.endTime,jdbcType=TIMESTAMP}, #{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.ChargeParkingDiscount" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into charge_parking_discount
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
station_id,
|
||||
parking_platform_id,
|
||||
condition_type,
|
||||
condition_value,
|
||||
discount_type,
|
||||
discount_value,
|
||||
start_time,
|
||||
end_time,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
del_flag,
|
||||
</trim>
|
||||
values
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
#{stationId,jdbcType=VARCHAR},
|
||||
#{parkingPlatformId,jdbcType=INTEGER},
|
||||
#{conditionType,jdbcType=VARCHAR},
|
||||
#{conditionValue,jdbcType=VARCHAR},
|
||||
#{discountType,jdbcType=VARCHAR},
|
||||
#{discountValue,jdbcType=VARCHAR},
|
||||
#{startTime,jdbcType=TIMESTAMP},
|
||||
#{endTime,jdbcType=TIMESTAMP},
|
||||
#{createBy,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{updateBy,jdbcType=VARCHAR},
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
#{delFlag,jdbcType=CHAR},
|
||||
</trim>
|
||||
on duplicate key update
|
||||
<trim suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id = #{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
station_id = #{stationId,jdbcType=VARCHAR},
|
||||
parking_platform_id = #{parkingPlatformId,jdbcType=INTEGER},
|
||||
condition_type = #{conditionType,jdbcType=VARCHAR},
|
||||
condition_value = #{conditionValue,jdbcType=VARCHAR},
|
||||
discount_type = #{discountType,jdbcType=VARCHAR},
|
||||
discount_value = #{discountValue,jdbcType=VARCHAR},
|
||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||
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},
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.ChargeParkingDiscount" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into charge_parking_discount
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="stationId != null">
|
||||
station_id,
|
||||
</if>
|
||||
<if test="parkingPlatformId != null">
|
||||
parking_platform_id,
|
||||
</if>
|
||||
<if test="conditionType != null">
|
||||
condition_type,
|
||||
</if>
|
||||
<if test="conditionValue != null">
|
||||
condition_value,
|
||||
</if>
|
||||
<if test="discountType != null">
|
||||
discount_type,
|
||||
</if>
|
||||
<if test="discountValue != null">
|
||||
discount_value,
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time,
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time,
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
update_by,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
del_flag,
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="stationId != null">
|
||||
#{stationId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parkingPlatformId != null">
|
||||
#{parkingPlatformId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="conditionType != null">
|
||||
#{conditionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="conditionValue != null">
|
||||
#{conditionValue,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="discountType != null">
|
||||
#{discountType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="discountValue != null">
|
||||
#{discountValue,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
#{startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
#{endTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
#{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
#{updateBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
#{delFlag,jdbcType=CHAR},
|
||||
</if>
|
||||
</trim>
|
||||
on duplicate key update
|
||||
<trim suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id = #{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="stationId != null">
|
||||
station_id = #{stationId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parkingPlatformId != null">
|
||||
parking_platform_id = #{parkingPlatformId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="conditionType != null">
|
||||
condition_type = #{conditionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="conditionValue != null">
|
||||
condition_value = #{conditionValue,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="discountType != null">
|
||||
discount_type = #{discountType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="discountValue != null">
|
||||
discount_value = #{discountValue,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
update_by = #{updateBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
del_flag = #{delFlag,jdbcType=CHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<select id="selectByStationId" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from charge_parking_discount
|
||||
where del_flag = '0'
|
||||
and station_id = #{stationId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user