|
@@ -44,6 +44,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertCompanyInfo" parameterType="CompanyInfo" useGeneratedKeys="true" keyProperty="companyId">
|
|
|
+ <selectKey keyProperty="companyId" order="BEFORE" resultType="java.lang.Long" >
|
|
|
+ SELECT LAST_INSERT_ID();
|
|
|
+ </selectKey>
|
|
|
insert into t_company_info
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="companyNm != null">company_nm,</if>
|
|
@@ -58,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
+ company_id
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="companyNm != null">#{companyNm},</if>
|
|
@@ -72,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
+ #{companyId}
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|