Commit e2c45528 by fengshuonan

更新注释和注解

parent bc7b1346
......@@ -29,14 +29,20 @@ import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* 部门服务
*
* @author fengshuonan
* @Date 2018/10/15 下午11:39
*/
@Service
@Transactional
public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements IDeptService {
@Resource
private DeptMapper deptMapper;
@Override
@Transactional
public void deleteDept(Integer deptId) {
Dept dept = deptMapper.selectById(deptId);
......
......@@ -32,14 +32,20 @@ import java.util.Map;
import static cn.stylefeng.guns.core.common.constant.factory.MutiStrFactory.*;
/**
* 字典服务
*
* @author fengshuonan
* @Date 2018/10/15 下午11:39
*/
@Service
@Transactional
public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements IDictService {
@Resource
private DictMapper dictMapper;
@Override
@Transactional
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));
......@@ -79,6 +85,7 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements ID
}
@Override
@Transactional
public void editDict(Integer dictId, String dictCode, String dictName, String dictTips, String dicts) {
//删除之前的字典
this.delteDict(dictId);
......@@ -88,6 +95,7 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements ID
}
@Override
@Transactional
public void delteDict(Integer dictId) {
//删除这个字典的子词典
Wrapper<Dict> dictEntityWrapper = new EntityWrapper<>();
......
......@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
......@@ -42,6 +43,7 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IM
private MenuMapper menuMapper;
@Override
@Transactional
public void delMenu(Long menuId) {
//删除菜单
......@@ -52,6 +54,7 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IM
}
@Override
@Transactional
public void delMenuContainSubMenus(Long menuId) {
Menu menu = menuMapper.selectById(menuId);
......
......@@ -30,6 +30,12 @@ import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* 角色服务
*
* @author fengshuonan
* @Date 2018/10/15 下午11:40
*/
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IRoleService {
......@@ -40,7 +46,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
private RelationMapper relationMapper;
@Override
@Transactional(readOnly = false)
@Transactional
public void setAuthority(Integer roleId, String ids) {
// 删除该角色所有的权限
......@@ -56,7 +62,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
}
@Override
@Transactional(readOnly = false)
@Transactional
public void delRoleById(Integer roleId) {
//删除角色
this.roleMapper.deleteById(roleId);
......
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