Commit 4abb01da by Suvalue

丰城后台

parent 31ce77ca
......@@ -22,4 +22,6 @@ public interface SysUserMapper {
List<SysUserList> selectUserList();
SysUserList selectUserById(@Param("id") Integer id);
Integer selectId();
}
\ No newline at end of file
......@@ -34,7 +34,7 @@ public class UserServiceImpl implements UserService {
}
@Override
@Transactional(rollbackFor = Exception.class)
// @Transactional(rollbackFor = Exception.class)
public boolean addUser(Long userId, AddUserReq user) {
if (user != null) {
//添加用户信息
......@@ -48,6 +48,7 @@ public class UserServiceImpl implements UserService {
sysUser.setCreateDate(new Date());
sysUser.setCreateUserid(userId);
sysUser.setState((short) StateType.ON.getValue());
sysUser.setId(sysUserMapper.selectId());
sysUserMapper.insert(sysUser);
//添加角色信息
......
......@@ -30,7 +30,7 @@
where "ID" = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.hs.admin.model.SysUser">
<!-- <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">-->
<!-- <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">-->
<!-- SELECT SEQ_SYS_USER_ID.nextval-->
<!-- </selectKey>-->
insert into sys_user ("ID",CREATE_DATE, CREATE_USERID, "STATE",
......@@ -139,4 +139,8 @@
(s.PARENT_ID = 0 and r.ROLE_CODE = 1))
where u.id = #{id}
</select>
<select id="selectId" resultType="java.lang.Integer">
SELECT SEQ_SYS_USER_ID.nextval
from dual
</select>
</mapper>
\ No newline at end of file
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