Commit adbd8440 authored by 赵啸非's avatar 赵啸非

添加角色菜单权限新实现

parent 8de56134
...@@ -64,11 +64,9 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE ...@@ -64,11 +64,9 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
private ResourceService resourceService; private ResourceService resourceService;
@Autowired @Autowired
private RoleUserService roleUserService; private RoleUserService roleUserService;
@Lazy @Lazy
@Autowired @Autowired
private IUserFeign userFeign; private IUserFeign userFeign;
@Override @Override
protected String getExtKey(UserEntity data) { protected String getExtKey(UserEntity data) {
return data.getLoginName(); return data.getLoginName();
...@@ -326,9 +324,7 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE ...@@ -326,9 +324,7 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
List<UserPdu> userPduList = resp.getData().getData(); List<UserPdu> userPduList = resp.getData().getData();
log.info("用户总数量:{}", userPduList.size()); log.info("用户总数量:{}", userPduList.size());
if (!ObjectUtils.isEmpty(userPduList)) { if (!ObjectUtils.isEmpty(userPduList)) {
Map<String, UserPdu> userPduMap = userPduList.stream().collect(Collectors.toMap(x -> x.getLoginName(), y -> y, (x, y) -> x)); Map<String, UserPdu> userPduMap = userPduList.stream().collect(Collectors.toMap(x -> x.getLoginName(), y -> y, (x, y) -> x));
List<UserEntity> newUserList = userPduList.stream().map(newUser -> { List<UserEntity> newUserList = userPduList.stream().map(newUser -> {
UserEntity userEntity = new UserEntity(); UserEntity userEntity = new UserEntity();
userEntity.initAttrValue(); userEntity.initAttrValue();
...@@ -357,7 +353,6 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE ...@@ -357,7 +353,6 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
//需要新增的用户 //需要新增的用户
log.info("需要新增用户数量:{}", saveUpdateCollect.get(true).size()); log.info("需要新增用户数量:{}", saveUpdateCollect.get(true).size());
saveUpdateCollect.get(true).stream().forEach(item -> { saveUpdateCollect.get(true).stream().forEach(item -> {
UserPdu pdu = userPduMap.get(item.getLoginName()); UserPdu pdu = userPduMap.get(item.getLoginName());
if(!ObjectUtils.isEmpty(pdu)){ if(!ObjectUtils.isEmpty(pdu)){
item.setId(pdu.getId()); item.setId(pdu.getId());
......
...@@ -236,11 +236,13 @@ ...@@ -236,11 +236,13 @@
</delete> </delete>
<!-- 根据paramDto删除一批 --> <!-- 根据paramDto删除一批 -->
<delete id="deleteByMap" parameterType="paramDto"> <delete id="deleteByMap" parameterType="paramDto">
delete from mortals_xhx_role_user as a delete from mortals_xhx_role_user
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
<trim prefixOverrides="and" prefix=""> <trim prefixOverrides="and" prefix="">
<trim prefixOverrides="a." prefix="">
<include refid="_condition_"/> <include refid="_condition_"/>
</trim>
</trim> </trim>
</trim> </trim>
</delete> </delete>
......
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