|
@@ -116,17 +116,20 @@
|
|
|
<include refid="Example_Where_Clause"/>
|
|
|
</if>
|
|
|
</delete>
|
|
|
- <insert id="insert" parameterType="com.tzld.piaoquan.wecom.model.po.User">
|
|
|
+ <insert id="insert" parameterType="com.tzld.piaoquan.wecom.model.po.User" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into we_com_user (id, external_user_id, union_id,
|
|
|
- external_user_id_3rd_party, `type`, `name`,
|
|
|
- avatar, gender,
|
|
|
- created_at, updated_at, deleted_at,
|
|
|
- create_time, update_time)
|
|
|
+ external_user_id_3rd_party, `type`, `name`,
|
|
|
+ avatar, gender,
|
|
|
+ created_at, updated_at, deleted_at,
|
|
|
+ create_time, update_time)
|
|
|
values (#{id,jdbcType=BIGINT}, #{externalUserId,jdbcType=VARCHAR}, #{unionId,jdbcType=VARCHAR},
|
|
|
- #{externalUserId3rdParty,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
|
|
|
- #{avatar,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER},
|
|
|
- #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{deletedAt,jdbcType=BIGINT},
|
|
|
- #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
|
|
|
+ #{externalUserId3rdParty,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
|
|
|
+ #{avatar,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER},
|
|
|
+ #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{deletedAt,jdbcType=BIGINT},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
|
|
|
+ <selectKey resultType="java.lang.Long" order="AFTER" keyProperty="id">
|
|
|
+ select LAST_INSERT_ID()
|
|
|
+ </selectKey>
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.tzld.piaoquan.wecom.model.po.User">
|
|
|
insert into we_com_user
|