mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-01 08:30:05 +08:00
订单实时数据保存到数据库
This commit is contained in:
@@ -6,12 +6,13 @@
|
||||
<!--@Table order_monitor_data-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="order_code" jdbcType="VARCHAR" property="orderCode" />
|
||||
<result column="transaction_code" jdbcType="VARCHAR" property="transactionCode" />
|
||||
<result column="monitor_data" jdbcType="VARCHAR" property="monitorData" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, order_code, monitor_data, create_time
|
||||
id, order_code, transaction_code, monitor_data, create_time
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
@@ -27,9 +28,9 @@
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.jsowell.pile.domain.OrderMonitorData">
|
||||
<!--@mbg.generated-->
|
||||
insert into order_monitor_data (id, order_code, monitor_data,
|
||||
insert into order_monitor_data (id, order_code, transaction_code, monitor_data,
|
||||
create_time)
|
||||
values (#{id,jdbcType=INTEGER}, #{orderCode,jdbcType=VARCHAR}, #{monitorData,jdbcType=VARCHAR},
|
||||
values (#{id,jdbcType=INTEGER}, #{orderCode,jdbcType=VARCHAR}, #{transactionCode,jdbcType=VARCHAR}, #{monitorData,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsowell.pile.domain.OrderMonitorData">
|
||||
@@ -42,6 +43,9 @@
|
||||
<if test="orderCode != null and orderCode != ''">
|
||||
order_code,
|
||||
</if>
|
||||
<if test="transactionCode != null and transactionCode != ''">
|
||||
transaction_code,
|
||||
</if>
|
||||
<if test="monitorData != null and monitorData != ''">
|
||||
monitor_data,
|
||||
</if>
|
||||
@@ -56,6 +60,9 @@
|
||||
<if test="orderCode != null and orderCode != ''">
|
||||
#{orderCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="transactionCode != null and transactionCode != ''">
|
||||
#{transactionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="monitorData != null and monitorData != ''">
|
||||
#{monitorData,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -64,28 +71,18 @@
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.OrderMonitorData">
|
||||
<!--@mbg.generated-->
|
||||
update order_monitor_data
|
||||
<set>
|
||||
<if test="orderCode != null and orderCode != ''">
|
||||
order_code = #{orderCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="monitorData != null and monitorData != ''">
|
||||
monitor_data = #{monitorData,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.OrderMonitorData">
|
||||
<!--@mbg.generated-->
|
||||
update order_monitor_data
|
||||
set order_code = #{orderCode,jdbcType=VARCHAR},
|
||||
monitor_data = #{monitorData,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<select id="selectByOrderCode" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from order_monitor_data
|
||||
where order_code = #{orderCode,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<select id="selectByTransactionCode" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from order_monitor_data
|
||||
where transaction_code = #{transactionCode,jdbcType=VARCHAR}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user