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

添加角色菜单权限新实现

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