SQL:INSERT操作返回主键
<insert id="insert" parameterType="com.cattsoft.qqt.pub.entity.SubstituteOper" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="substituteOperId">
SELECT SEQ_SUBSTITUTE_OPER_ID.nextVal FROM DUAL
</selectKey>
insert into SUBSTITUTE_OPER (SUBSTITUTE_OPER_ID, CUST_ID, TEL_NUM,
TERM_TYPE, CITY_ID, OBJ_TYPE,
ACCESS_ID, ACCESS_OBJ_ID, STAFF_ID,
OPER_DATE, CALL_TELNUM, TEMPLATE_ID,
MSG_CONTENT, SEND_STS)
values (#{substituteOperId,jdbcType=DECIMAL}, #{custId,jdbcType=DECIMAL}, #{telNum,jdbcType=DECIMAL},
#{termType,jdbcType=CHAR}, #{cityId,jdbcType=VARCHAR}, #{objType,jdbcType=CHAR},
#{accessId,jdbcType=CHAR}, #{accessObjId,jdbcType=DECIMAL}, #{staffId,jdbcType=DECIMAL},
#{operDate,jdbcType=DATE}, #{callTelnum,jdbcType=VARCHAR}, #{templateId,jdbcType=DECIMAL},
#{msgContent,jdbcType=VARCHAR}, #{sendSts,jdbcType=CHAR})
</insert>
关键点自己找吧,很明显吧
相关新闻>>
- 发表评论
-
- 最新评论 更多>>