From c488d63b58458ea0dee56ffbb4c5b66b2141d4f1 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 30 五月 2025 09:59:30 +0800
Subject: [PATCH] 去除画蛇添足代码

---
 pms-parent/pms-global/src/main/resources/mapper/OthStatisticDeviceMapper.xml |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/pms-parent/pms-global/src/main/resources/mapper/OthStatisticDeviceMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/OthStatisticDeviceMapper.xml
index c25f811..224d4b3 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/OthStatisticDeviceMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/OthStatisticDeviceMapper.xml
@@ -27,17 +27,20 @@
     delete from oth_statistic_device
     where id = #{id,jdbcType=BIGINT}
   </delete>
-  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoOth.OthStatisticDevice" useGeneratedKeys="true">
+  <insert id="insert" parameterType="com.dy.pmsGlobal.pojoOth.OthStatisticDevice">
     <!--@mbg.generated-->
-    insert into oth_statistic_device (statistic_date, plan_id, pro_id, 
+    insert into oth_statistic_device (id,statistic_date, plan_id, pro_id,
       `number`, dt)
-    values (#{statisticDate,jdbcType=VARCHAR}, #{planId,jdbcType=BIGINT}, #{proId,jdbcType=BIGINT}, 
+    values (#{id,jdbcType=BIGINT}, #{statisticDate,jdbcType=VARCHAR}, #{planId,jdbcType=BIGINT}, #{proId,jdbcType=BIGINT},
       #{number,jdbcType=INTEGER}, #{dt,jdbcType=TIMESTAMP})
   </insert>
-  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoOth.OthStatisticDevice" useGeneratedKeys="true">
+  <insert id="insertSelective" parameterType="com.dy.pmsGlobal.pojoOth.OthStatisticDevice">
     <!--@mbg.generated-->
     insert into oth_statistic_device
     <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
       <if test="statisticDate != null">
         statistic_date,
       </if>
@@ -55,6 +58,9 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
       <if test="statisticDate != null">
         #{statisticDate,jdbcType=VARCHAR},
       </if>

--
Gitblit v1.8.0