mybatis 动态添加数据

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/anguea/article/details/66968380

<insert id="insert" parameterType="models.Transaction">
		insert into transaction
		<trim prefix="(" suffix=")" suffixOverrides=",">
			id,
			
			player_number,
			expense_type,
			expense_count,
			operation_type,
			operation_person,
			
			
			
			
			
			caption,
			type,
			player_id,
			money,
			points,
			remain_points,
			coin,
			remain_coin,
			app_id,
			desk_id,
			position_id,
			biz_id,
			channel,
			status,
			finished,
			create_time,
			note,
			detail_json,
			merchant_id,
			room_num
		</trim>
		<trim prefix="values (" suffix=")" suffixOverrides=",">
			#{id},
			
			
			#{playerNumber},
			#{expenseType},
			#{expenseCount},
			#{operationType},
			#{operationPerson},
			
			
			
			#{caption},
			#{type},
			#{playerId},
			#{money},
			#{points},
			#{remainPoints},
			#{coin},
			#{remainCoin},
			#{appId},
			#{deskId},
			#{positionId},
			#{bizId},
			#{channel},
			#{status},
			#{finished},
			#{createTime},
			#{note},
			#{detailJson},
			#{merchantId},
			#{roomNum}
		</trim>
	</insert>

展开阅读全文

没有更多推荐了,返回首页