|
|
@ -1,20 +1,16 @@
|
|
|
|
package com.zh.project0512.serviceImpl;
|
|
|
|
package com.zh.project0512.serviceImpl;
|
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.zh.project0512.mapper.UserJurisdictionMapper;
|
|
|
|
import com.zh.project0512.mapper.*;
|
|
|
|
import com.zh.project0512.mapper.UserMenusMapper;
|
|
|
|
import com.zh.project0512.model.*;
|
|
|
|
import com.zh.project0512.mapper.UserOperationMapper;
|
|
|
|
|
|
|
|
import com.zh.project0512.mapper.UserRoleJurisdictionMapper;
|
|
|
|
|
|
|
|
import com.zh.project0512.model.UserJurisdiction;
|
|
|
|
|
|
|
|
import com.zh.project0512.model.UserMenus;
|
|
|
|
|
|
|
|
import com.zh.project0512.model.UserOperation;
|
|
|
|
|
|
|
|
import com.zh.project0512.model.UserRoleJurisdiction;
|
|
|
|
|
|
|
|
import com.zh.project0512.model.dto.OperationRoleJurisdictionDTO;
|
|
|
|
import com.zh.project0512.model.dto.OperationRoleJurisdictionDTO;
|
|
|
|
import com.zh.project0512.model.dto.UserJurisdictionFBIDTO;
|
|
|
|
import com.zh.project0512.model.dto.UserJurisdictionFBIDTO;
|
|
|
|
import com.zh.project0512.model.vo.UserJurisdictionFBRIOperationVo;
|
|
|
|
import com.zh.project0512.model.vo.UserJurisdictionFBRIOperationVo;
|
|
|
|
import com.zh.project0512.model.vo.UserJurisdictionFBRIVo;
|
|
|
|
import com.zh.project0512.model.vo.UserJurisdictionFBRIVo;
|
|
|
|
import com.zh.project0512.service.IUserJurisdictionService;
|
|
|
|
import com.zh.project0512.service.IUserJurisdictionService;
|
|
|
|
|
|
|
|
import com.zh.project0512.utils.BizException;
|
|
|
|
import com.zh.project0512.utils.PropertyUtils;
|
|
|
|
import com.zh.project0512.utils.PropertyUtils;
|
|
|
|
|
|
|
|
import com.zh.project0512.utils.result.HttpStatusEnum;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
|
@ -32,6 +28,8 @@ public class UserJurisdictionServiceImpl implements IUserJurisdictionService {
|
|
|
|
UserOperationMapper userOperationMapper;
|
|
|
|
UserOperationMapper userOperationMapper;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
UserJurisdictionMapper userJurisdictionMapper;
|
|
|
|
UserJurisdictionMapper userJurisdictionMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
UserRoleMapper userRoleMapper;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
@Transactional
|
|
|
|
@Transactional
|
|
|
@ -57,6 +55,11 @@ public class UserJurisdictionServiceImpl implements IUserJurisdictionService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<UserJurisdictionFBRIVo> findByRoleId(UserJurisdictionFBIDTO userJurisdictionFBIDTO) {
|
|
|
|
public List<UserJurisdictionFBRIVo> findByRoleId(UserJurisdictionFBIDTO userJurisdictionFBIDTO) {
|
|
|
|
|
|
|
|
UserRole userRole = userRoleMapper.selectById(userJurisdictionFBIDTO.getRoleId());
|
|
|
|
|
|
|
|
if (userRole == null){
|
|
|
|
|
|
|
|
throw new BizException(HttpStatusEnum.CUSTOM_EXCEPTION,"记录不存在");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ArrayList<UserJurisdictionFBRIVo> userJurisdictionFBRIVos = new ArrayList<>();
|
|
|
|
ArrayList<UserJurisdictionFBRIVo> userJurisdictionFBRIVos = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
//查询所有菜单
|
|
|
|
//查询所有菜单
|
|
|
@ -78,7 +81,7 @@ public class UserJurisdictionServiceImpl implements IUserJurisdictionService {
|
|
|
|
UserOperation userOperation = userOperationMapper.selectById(userJurisdiction.getOperationId());
|
|
|
|
UserOperation userOperation = userOperationMapper.selectById(userJurisdiction.getOperationId());
|
|
|
|
if (userOperation != null){
|
|
|
|
if (userOperation != null){
|
|
|
|
UserJurisdictionFBRIOperationVo operationVo = new UserJurisdictionFBRIOperationVo();
|
|
|
|
UserJurisdictionFBRIOperationVo operationVo = new UserJurisdictionFBRIOperationVo();
|
|
|
|
PropertyUtils.copyProperties(userJurisdiction,operationVo);
|
|
|
|
PropertyUtils.copyProperties(userOperation,operationVo);
|
|
|
|
operationVo.setCheck(false);//默认为未选中
|
|
|
|
operationVo.setCheck(false);//默认为未选中
|
|
|
|
//查询该操作是否选中,如果选中则菜单也被选中
|
|
|
|
//查询该操作是否选中,如果选中则菜单也被选中
|
|
|
|
QueryWrapper<UserRoleJurisdiction> queryWrapper5 = new QueryWrapper<>();
|
|
|
|
QueryWrapper<UserRoleJurisdiction> queryWrapper5 = new QueryWrapper<>();
|
|
|
|