用户ID自增问题

master
anthonyywj2 3 years ago
parent 18b37613e5
commit 2cd57b6cb4

@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
import com.glxp.api.admin.req.auth.AuthAdminQueryRequest;
import com.glxp.api.admin.req.auth.AuthAdminSaveRequest;
import com.glxp.api.admin.res.PageSimpleResponse;
import com.glxp.api.admin.util.GennerOrderUtils;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
@ -40,6 +41,8 @@ public class AuthAdminController {
@Resource
private AuthRoleAdminService authRoleAdminService;
@Resource
GennerOrderUtils gennerOrderUtils;
/**
*
@ -145,6 +148,7 @@ public class AuthAdminController {
authAdmin.setPassWord(PasswordUtils.authAdminPwd(authAdmin.getPassWord()));
}
authAdmin.setLastModifyTime(new Date());
authAdmin.setId(gennerOrderUtils.getRelId());
boolean b = authAdminService.insertAuthAdmin(authAdmin);
authAdmin = authAdminService.findByUserName(authAdmin.getUserName());
if (!b) {

@ -56,10 +56,10 @@
</select>
<insert id="insertAuthAdmin" keyProperty="id" parameterType="com.glxp.api.admin.entity.auth.AuthAdmin">
INSERT INTO auth_user(userName,passWord,lastLoginIp,
INSERT INTO auth_user(id,userName,passWord,lastLoginIp,
lastLoginTime,createTime,userFlag,lastModifyTime,employeeName)
values
(#{userName},
(#{id},#{userName},
<choose>
<when test="passWord != null">
#{passWord},

Loading…
Cancel
Save