|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 |
<insert id="insertSelective" parameterType="com.jxxx.p2pp.model.UUserInfo"> <selectKey resultType="java.math.BigDecimal" order="BEFORE" keyProperty="id"> SELECT U_USER_INFO_SEQ.Nextval as ID from DUAL </selectKey> insert into U_USER_INFO <trim prefix="(" suffix=")" suffixOverrides="," > <if test="id != null" > ID, </if> <if test="userName != null" > USER_NAME, </if> <if test="realName != null" > REAL_NAME, </if> .....</insert> |
|
1
2
3
4
5
6 |
<insert id="insert" parameterType="Spares" useGeneratedKeys="true" keyProperty="id"> insert into spares(spares_id,spares_name, spares_type_id,spares_spec) values(#{id},#{name},#{typeId},#{spec}) </insert> |