|
|
@@ -352,20 +352,23 @@ public class NewAdminServiceImpl extends BaseMybatisDao<AdminMapper> implements
|
|
|
|
|
|
@Override
|
|
|
public boolean checkAdminRole(List<String> roles,String mobile) {
|
|
|
- if (StringUtils.isNotBlank(mobile)) {
|
|
|
- Admin a=adminMapper.selectByMobile(mobile);
|
|
|
- if (null==a||StringUtils.isBlank(a.getId())) {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
+ Admin a=null;
|
|
|
+ if (StringUtils.isNotBlank(mobile)) a=adminMapper.selectByMobile(mobile);
|
|
|
List<UserRole> list=userRoleMapper. selectAdminRole(AFTConstants.CONSULTANT_MANAGER);
|
|
|
|
|
|
if (!roles.isEmpty()) {
|
|
|
for (String s : roles) {
|
|
|
if (list.size()>0) {
|
|
|
- if (list.get(0).getRid().equals(s)) {
|
|
|
- return true;
|
|
|
+ if (null==a) {
|
|
|
+ if (list.get(0).getRid().equals(s)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ if (list.get(0).getRid().equals(s)&&!list.get(0).getUid().equals((a.getId()))) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|