Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv-springboot
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bsoft
sv-springboot
Commits
4abb01da
Commit
4abb01da
authored
Aug 28, 2020
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
丰城后台
parent
31ce77ca
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
hs-admin/src/main/java/com/hs/admin/mapper/SysUserMapper.java
+3
-0
hs-admin/src/main/java/com/hs/admin/service/impl/UserServiceImpl.java
+2
-1
hs-admin/src/main/resources/mapper/SysUserMapper.xml
+6
-1
No files found.
hs-admin/src/main/java/com/hs/admin/mapper/SysUserMapper.java
View file @
4abb01da
...
...
@@ -22,4 +22,6 @@ public interface SysUserMapper {
List
<
SysUserList
>
selectUserList
();
SysUserList
selectUserById
(
@Param
(
"id"
)
Integer
id
);
Integer
selectId
();
}
\ No newline at end of file
hs-admin/src/main/java/com/hs/admin/service/impl/UserServiceImpl.java
View file @
4abb01da
...
...
@@ -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
);
//添加角色信息
...
...
hs-admin/src/main/resources/mapper/SysUserMapper.xml
View file @
4abb01da
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment