Selaa lähdekoodia

修复同步水厂组织表的时候 因为ID没有写入xml里,导致同步数据的时候采用了自增策略

王苗苗 3 viikkoa sitten
vanhempi
commit
04e44776e5

+ 2 - 0
ruoyi-system/src/main/resources/mapper/business/TOrganizationMapper.xml

@@ -66,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insertTOrganization" parameterType="TOrganization" useGeneratedKeys="true" keyProperty="id">
         insert into t_organization
         <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
             <if test="name != null">name,</if>
             <if test="code != null">code,</if>
             <if test="type != null">type,</if>
@@ -90,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remark != null">remark,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
             <if test="name != null">#{name},</if>
             <if test="code != null">#{code},</if>
             <if test="type != null">#{type},</if>