|
|
@@ -217,20 +217,12 @@ public class RestrictProjectServiceImpl extends BaseMybatisDao<RestrictProjectMa
|
|
|
String aid=TokenManager.getAdminId();
|
|
|
Admin my = adminMapper.selectByPrimaryKey(aid);
|
|
|
boolean flag= my.getPublicPurview() == 1;
|
|
|
- List<Role> roles = adminMapper.selectRolesByPrimaryKey(aid);
|
|
|
- boolean flag2=false;
|
|
|
- for (Role role : roles) {
|
|
|
- if (AFTConstants.SALESMAN.equals(role.getRoleType().toString())){
|
|
|
- flag2=true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
if (ids!=null&& !ids.isEmpty()){
|
|
|
String[] split = ids.split(",");
|
|
|
for (String s : split) {
|
|
|
UserRestrictProjectBo bo = new UserRestrictProjectBo();
|
|
|
bo.setUid(s);
|
|
|
- bo.setAdminSalesman(flag2?1:0);
|
|
|
+ bo.setAdminSalesman(0);
|
|
|
User user = userMapper.selectByPrimaryKey(s);
|
|
|
bo.setUserName(user.getNickname());
|
|
|
if (!flag){
|
|
|
@@ -244,8 +236,11 @@ public class RestrictProjectServiceImpl extends BaseMybatisDao<RestrictProjectMa
|
|
|
List<RestrictProject> restrictProjects = restrictProjectMapper.selectListByParam(new InputRestrictProject(s, aid));
|
|
|
if (!restrictProjects.isEmpty()){
|
|
|
// 有限定项目
|
|
|
- bo.setType(1);
|
|
|
-
|
|
|
+ if(TokenManager.hasRole(AFTConstants.SALESMAN)){
|
|
|
+ bo.setType(1);
|
|
|
+ }else {
|
|
|
+ bo.setType(5);
|
|
|
+ }
|
|
|
}else{
|
|
|
//没有限定
|
|
|
bo.setType(2);
|