Commit 262d7cd9 by zhiwj

返回id

parent 82cc05e8
......@@ -16,7 +16,8 @@ public class AuthCodeServiceImpl implements AuthCodeService {
private TabSysAuthCodeMapper tabSysAuthCodeMapper;
@Override
public int saveAuthCode(TabSysAuthCode tabSysAuthCode) {
return this.tabSysAuthCodeMapper.insert(tabSysAuthCode);
this.tabSysAuthCodeMapper.insert(tabSysAuthCode);
return tabSysAuthCode.getAuthCodeId();
}
@Override
......
......@@ -26,6 +26,9 @@
where auth_code_id = #{authCodeId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.auth.entity.TabSysAuthCode">
<selectKey keyProperty="authCodeId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_sys_auth_code (auth_code_id, auth_code, enterprise_id,
relation_id, status, create_time,
expiration_time, update_time)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment