Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
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
chenjunxiong
guns-vip
Commits
e2c45528
Commit
e2c45528
authored
Oct 15, 2018
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新注释和注解
parent
bc7b1346
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
4 deletions
+27
-4
src/main/java/cn/stylefeng/guns/modular/system/service/impl/DeptServiceImpl.java
+7
-1
src/main/java/cn/stylefeng/guns/modular/system/service/impl/DictServiceImpl.java
+9
-1
src/main/java/cn/stylefeng/guns/modular/system/service/impl/MenuServiceImpl.java
+3
-0
src/main/java/cn/stylefeng/guns/modular/system/service/impl/RoleServiceImpl.java
+8
-2
No files found.
src/main/java/cn/stylefeng/guns/modular/system/service/impl/DeptServiceImpl.java
View file @
e2c45528
...
@@ -29,14 +29,20 @@ import javax.annotation.Resource;
...
@@ -29,14 +29,20 @@ import javax.annotation.Resource;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
* 部门服务
*
* @author fengshuonan
* @Date 2018/10/15 下午11:39
*/
@Service
@Service
@Transactional
public
class
DeptServiceImpl
extends
ServiceImpl
<
DeptMapper
,
Dept
>
implements
IDeptService
{
public
class
DeptServiceImpl
extends
ServiceImpl
<
DeptMapper
,
Dept
>
implements
IDeptService
{
@Resource
@Resource
private
DeptMapper
deptMapper
;
private
DeptMapper
deptMapper
;
@Override
@Override
@Transactional
public
void
deleteDept
(
Integer
deptId
)
{
public
void
deleteDept
(
Integer
deptId
)
{
Dept
dept
=
deptMapper
.
selectById
(
deptId
);
Dept
dept
=
deptMapper
.
selectById
(
deptId
);
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/impl/DictServiceImpl.java
View file @
e2c45528
...
@@ -32,14 +32,20 @@ import java.util.Map;
...
@@ -32,14 +32,20 @@ import java.util.Map;
import
static
cn
.
stylefeng
.
guns
.
core
.
common
.
constant
.
factory
.
MutiStrFactory
.*;
import
static
cn
.
stylefeng
.
guns
.
core
.
common
.
constant
.
factory
.
MutiStrFactory
.*;
/**
* 字典服务
*
* @author fengshuonan
* @Date 2018/10/15 下午11:39
*/
@Service
@Service
@Transactional
public
class
DictServiceImpl
extends
ServiceImpl
<
DictMapper
,
Dict
>
implements
IDictService
{
public
class
DictServiceImpl
extends
ServiceImpl
<
DictMapper
,
Dict
>
implements
IDictService
{
@Resource
@Resource
private
DictMapper
dictMapper
;
private
DictMapper
dictMapper
;
@Override
@Override
@Transactional
public
void
addDict
(
String
dictCode
,
String
dictName
,
String
dictTips
,
String
dictValues
)
{
public
void
addDict
(
String
dictCode
,
String
dictName
,
String
dictTips
,
String
dictValues
)
{
//判断有没有该字典
//判断有没有该字典
List
<
Dict
>
dicts
=
dictMapper
.
selectList
(
new
EntityWrapper
<
Dict
>().
eq
(
"code"
,
dictCode
).
and
().
eq
(
"pid"
,
0
));
List
<
Dict
>
dicts
=
dictMapper
.
selectList
(
new
EntityWrapper
<
Dict
>().
eq
(
"code"
,
dictCode
).
and
().
eq
(
"pid"
,
0
));
...
@@ -79,6 +85,7 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements ID
...
@@ -79,6 +85,7 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements ID
}
}
@Override
@Override
@Transactional
public
void
editDict
(
Integer
dictId
,
String
dictCode
,
String
dictName
,
String
dictTips
,
String
dicts
)
{
public
void
editDict
(
Integer
dictId
,
String
dictCode
,
String
dictName
,
String
dictTips
,
String
dicts
)
{
//删除之前的字典
//删除之前的字典
this
.
delteDict
(
dictId
);
this
.
delteDict
(
dictId
);
...
@@ -88,6 +95,7 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements ID
...
@@ -88,6 +95,7 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements ID
}
}
@Override
@Override
@Transactional
public
void
delteDict
(
Integer
dictId
)
{
public
void
delteDict
(
Integer
dictId
)
{
//删除这个字典的子词典
//删除这个字典的子词典
Wrapper
<
Dict
>
dictEntityWrapper
=
new
EntityWrapper
<>();
Wrapper
<
Dict
>
dictEntityWrapper
=
new
EntityWrapper
<>();
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/impl/MenuServiceImpl.java
View file @
e2c45528
...
@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.mapper.EntityWrapper;
...
@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.mapper.EntityWrapper;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.List
;
...
@@ -42,6 +43,7 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IM
...
@@ -42,6 +43,7 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IM
private
MenuMapper
menuMapper
;
private
MenuMapper
menuMapper
;
@Override
@Override
@Transactional
public
void
delMenu
(
Long
menuId
)
{
public
void
delMenu
(
Long
menuId
)
{
//删除菜单
//删除菜单
...
@@ -52,6 +54,7 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IM
...
@@ -52,6 +54,7 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IM
}
}
@Override
@Override
@Transactional
public
void
delMenuContainSubMenus
(
Long
menuId
)
{
public
void
delMenuContainSubMenus
(
Long
menuId
)
{
Menu
menu
=
menuMapper
.
selectById
(
menuId
);
Menu
menu
=
menuMapper
.
selectById
(
menuId
);
...
...
src/main/java/cn/stylefeng/guns/modular/system/service/impl/RoleServiceImpl.java
View file @
e2c45528
...
@@ -30,6 +30,12 @@ import javax.annotation.Resource;
...
@@ -30,6 +30,12 @@ import javax.annotation.Resource;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
* 角色服务
*
* @author fengshuonan
* @Date 2018/10/15 下午11:40
*/
@Service
@Service
public
class
RoleServiceImpl
extends
ServiceImpl
<
RoleMapper
,
Role
>
implements
IRoleService
{
public
class
RoleServiceImpl
extends
ServiceImpl
<
RoleMapper
,
Role
>
implements
IRoleService
{
...
@@ -40,7 +46,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
...
@@ -40,7 +46,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
private
RelationMapper
relationMapper
;
private
RelationMapper
relationMapper
;
@Override
@Override
@Transactional
(
readOnly
=
false
)
@Transactional
public
void
setAuthority
(
Integer
roleId
,
String
ids
)
{
public
void
setAuthority
(
Integer
roleId
,
String
ids
)
{
// 删除该角色所有的权限
// 删除该角色所有的权限
...
@@ -56,7 +62,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
...
@@ -56,7 +62,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
}
}
@Override
@Override
@Transactional
(
readOnly
=
false
)
@Transactional
public
void
delRoleById
(
Integer
roleId
)
{
public
void
delRoleById
(
Integer
roleId
)
{
//删除角色
//删除角色
this
.
roleMapper
.
deleteById
(
roleId
);
this
.
roleMapper
.
deleteById
(
roleId
);
...
...
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