wuweihao 3 vuotta sitten
vanhempi
commit
d3c148d2da

+ 5 - 3
720yun_fd_manage/gis_mapper/src/main/resources/mapper/WorkMapper.xml

@@ -4,12 +4,14 @@
 
 
     <insert id="insertWork" parameterType="com.gis.domain.entity.WorkEntity">
-        <selectKey resultType="java.lang.Long"   order="AFTER"  keyProperty="id">
-            SELECT LAST_INSERT_ID()
-        </selectKey>
+
       insert into tb_work (id, create_time, update_time, user_id, status)
         values
         (#{id}, #{createTime}, #{updateTime}, #{userId}, #{status})
 
+        <selectKey resultType="java.lang.Long"   order="AFTER"  keyProperty="id">
+            SELECT LAST_INSERT_ID()
+        </selectKey>
+
     </insert>
 </mapper>