|
@@ -0,0 +1,157 @@
|
|
|
+<?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.jpsoft.smart.modules.base.dao.ParkingRecordDAO">
|
|
|
+
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id_,
|
|
|
+ create_by,
|
|
|
+ create_time,
|
|
|
+ update_by,
|
|
|
+ update_time,
|
|
|
+ del_flag,
|
|
|
+ serial_number,
|
|
|
+ pay_amount,
|
|
|
+ pay_type,
|
|
|
+ company_id,
|
|
|
+ car_num,
|
|
|
+ parking_device_no,
|
|
|
+ parking_time,
|
|
|
+ in_parking_time,
|
|
|
+ payment_time,
|
|
|
+ pay_status,
|
|
|
+ open_id,
|
|
|
+ transaction_number,
|
|
|
+ product_theme
|
|
|
+</sql>
|
|
|
+ <resultMap id="ParkingRecordMap" type="com.jpsoft.smart.modules.base.entity.ParkingRecord">
|
|
|
+ <id property="id" column="id_" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
+ <result property="serialNumber" column="serial_number" />
|
|
|
+ <result property="payAmount" column="pay_amount" />
|
|
|
+ <result property="payType" column="pay_type" />
|
|
|
+ <result property="companyId" column="company_id" />
|
|
|
+ <result property="carNum" column="car_num" />
|
|
|
+ <result property="parkingDeviceNo" column="parking_device_no" />
|
|
|
+ <result property="parkingTime" column="parking_time" />
|
|
|
+ <result property="inParkingTime" column="in_parking_time" />
|
|
|
+ <result property="paymentTime" column="payment_time" />
|
|
|
+ <result property="payStatus" column="pay_status" />
|
|
|
+ <result property="openId" column="open_id" />
|
|
|
+ <result property="transactionNumber" column="transaction_number" />
|
|
|
+ <result property="productTheme" column="product_theme"/>
|
|
|
+ </resultMap>
|
|
|
+ <insert id="insert" parameterType="com.jpsoft.smart.modules.base.entity.ParkingRecord">
|
|
|
+
|
|
|
+ <![CDATA[
|
|
|
+ insert into base_parking_record
|
|
|
+ (id_,create_by,create_time,update_by,update_time,del_flag,serial_number,pay_amount,pay_type,company_id,car_num,parking_device_no,
|
|
|
+ parking_time,in_parking_time,payment_time,pay_status,open_id,transaction_number,product_theme
|
|
|
+ )
|
|
|
+ values
|
|
|
+ (
|
|
|
+ #{id,jdbcType=VARCHAR}
|
|
|
+ ,#{createBy,jdbcType=VARCHAR}
|
|
|
+ ,#{createTime,jdbcType= TIMESTAMP }
|
|
|
+ ,#{updateBy,jdbcType=VARCHAR}
|
|
|
+ ,#{updateTime,jdbcType= TIMESTAMP }
|
|
|
+ ,#{delFlag,jdbcType= NUMERIC }
|
|
|
+ ,#{serialNumber,jdbcType=VARCHAR}
|
|
|
+ ,#{payAmount,jdbcType= DECIMAL }
|
|
|
+ ,#{payType,jdbcType= VARCHAR }
|
|
|
+ ,#{companyId,jdbcType=VARCHAR}
|
|
|
+ ,#{carNum,jdbcType=VARCHAR}
|
|
|
+ ,#{parkingDeviceNo,jdbcType=VARCHAR}
|
|
|
+ ,#{parkingTime,jdbcType=DECIMAL}
|
|
|
+ ,#{inParkingTime,jdbcType=TIMESTAMP}
|
|
|
+ ,#{paymentTime,jdbcType=TIMESTAMP}
|
|
|
+ ,#{payStatus,jdbcType=VARCHAR}
|
|
|
+ ,#{openId,jdbcType=VARCHAR}
|
|
|
+ ,#{transactionNumber,jdbcType=VARCHAR}
|
|
|
+ ,#{productTheme,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
+ ]]>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+<!--auto generated by MybatisCodeHelper on 2020-04-14-->
|
|
|
+ <select id="findById" resultMap="ParkingRecordMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
+ from base_parking_record
|
|
|
+ where id_=#{id} and del_flag is false
|
|
|
+ </select>
|
|
|
+ <update id="update" parameterType="com.jpsoft.smart.modules.base.entity.ParkingRecord">
|
|
|
+ update base_parking_record
|
|
|
+ <set>
|
|
|
+ <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= NUMERIC },
|
|
|
+ </if>
|
|
|
+ <if test="serialNumber!=null">
|
|
|
+ serial_number=#{serialNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="payAmount !=null">
|
|
|
+ pay_amount=#{payAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="payType !=null">
|
|
|
+ pay_type=#{payType,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="companyId !=null">
|
|
|
+ company_id=#{companyId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="carNum !=null">
|
|
|
+ car_num=#{carNum,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="parkingDeviceNo !=null">
|
|
|
+ parking_device_no=#{parkingDeviceNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="parkingTime !=null">
|
|
|
+ parking_time=#{parkingTime,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="inParkingTime !=null">
|
|
|
+ in_parking_time=#{inParkingTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="paymentTime !=null">
|
|
|
+ payment_time=#{paymentTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="payStatus !=null">
|
|
|
+ pay_status=#{payStatus,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="openId !=null">
|
|
|
+ open_id=#{openId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="transactionNumber !=null">
|
|
|
+ transaction_number=#{transactionNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="productTheme !=null">
|
|
|
+ product_theme=#{productTheme,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id_=#{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+<!--auto generated by MybatisCodeHelper on 2020-04-14-->
|
|
|
+ <select id="findBySerialNumber" resultMap="ParkingRecordMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
+ from base_parking_record
|
|
|
+ where serial_number=#{serialNumber} and del_flag is false
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+</mapper>
|