mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-03 01:20:15 +08:00
新增 车辆绑定优惠券记录表、实体类、Service、controller
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
<?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.CarCouponRecordMapper">
|
||||
|
||||
<resultMap type="com.jsowell.pile.domain.CarCouponRecord" id="CarCouponRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderCode" column="order_code" />
|
||||
<result property="stationId" column="station_id" />
|
||||
<result property="plateNumber" column="plate_number" />
|
||||
<result property="returnCode" column="return_code" />
|
||||
<result property="returnMsg" column="return_msg" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCarCouponRecordVo">
|
||||
select id, order_code, station_id, plate_number, return_code, return_msg, create_time, del_flag from car_coupon_record
|
||||
</sql>
|
||||
|
||||
<select id="selectCarCouponRecordList" parameterType="com.jsowell.pile.domain.CarCouponRecord" resultMap="CarCouponRecordResult">
|
||||
<include refid="selectCarCouponRecordVo"/>
|
||||
<where>
|
||||
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
||||
<if test="stationId != null "> and station_id = #{stationId}</if>
|
||||
<if test="plateNumber != null and plateNumber != ''"> and plate_number = #{plateNumber}</if>
|
||||
<if test="returnCode != null and returnCode != ''"> and return_code = #{returnCode}</if>
|
||||
<if test="returnMsg != null and returnMsg != ''"> and return_msg = #{returnMsg}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCarCouponRecordById" parameterType="Long" resultMap="CarCouponRecordResult">
|
||||
<include refid="selectCarCouponRecordVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCarCouponRecord" parameterType="com.jsowell.pile.domain.CarCouponRecord" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into car_coupon_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderCode != null">order_code,</if>
|
||||
<if test="stationId != null">station_id,</if>
|
||||
<if test="plateNumber != null">plate_number,</if>
|
||||
<if test="returnCode != null and returnCode != ''">return_code,</if>
|
||||
<if test="returnMsg != null">return_msg,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderCode != null">#{orderCode},</if>
|
||||
<if test="stationId != null">#{stationId},</if>
|
||||
<if test="plateNumber != null">#{plateNumber},</if>
|
||||
<if test="returnCode != null and returnCode != ''">#{returnCode},</if>
|
||||
<if test="returnMsg != null">#{returnMsg},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCarCouponRecord" parameterType="com.jsowell.pile.domain.CarCouponRecord">
|
||||
update car_coupon_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderCode != null">order_code = #{orderCode},</if>
|
||||
<if test="stationId != null">station_id = #{stationId},</if>
|
||||
<if test="plateNumber != null">plate_number = #{plateNumber},</if>
|
||||
<if test="returnCode != null and returnCode != ''">return_code = #{returnCode},</if>
|
||||
<if test="returnMsg != null">return_msg = #{returnMsg},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCarCouponRecordById" parameterType="Long">
|
||||
delete from car_coupon_record where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCarCouponRecordByIds" parameterType="String">
|
||||
delete from car_coupon_record where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -2846,6 +2846,7 @@
|
||||
t1.order_status AS orderStatus,
|
||||
t1.station_id AS stationId,
|
||||
t1.pile_sn AS pileSn,
|
||||
t1.member_id as memberId,
|
||||
t1.connector_code AS connectorCode,
|
||||
t1.pile_connector_code AS pileConnectorCode,
|
||||
t1.pay_mode AS payMode,
|
||||
|
||||
Reference in New Issue
Block a user