| | |
| | | import com.core.common.R; |
| | | import com.core.domain.KeyValueVo; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.crm.common.model.enums.RoleType; |
| | | import com.zy.crm.common.web.BaseController; |
| | | import com.zy.crm.manager.controller.result.FollowerTableVo; |
| | | import com.zy.crm.manager.entity.Cstmr; |
| | |
| | | Role role = getRole(); assert role != null; |
| | | Page<Cstmr> page = cstmrService.getPage(new Page<>(1, 30) |
| | | , getHostId() |
| | | , (role.getCode().equals(RoleType.boss.toString()) || role.getCode().equals(RoleType.manager.toString())) ? String.valueOf(user.getDeptId()) : null |
| | | , role.judgeLeader() ? String.valueOf(user.getDeptId()) : null |
| | | , user.getId() |
| | | , condition); |
| | | List<KeyValueVo> vos = new ArrayList<>(); |
| | |
| | | import com.core.common.R; |
| | | import com.core.domain.KeyValueVo; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.crm.common.model.enums.RoleType; |
| | | import com.zy.crm.common.web.BaseController; |
| | | import com.zy.crm.manager.controller.result.FollowerTableVo; |
| | | import com.zy.crm.manager.entity.Order; |
| | |
| | | Role role = getRole(); assert role != null; |
| | | Page<Order> page = orderService.getPage(new Page<>(1, 30) |
| | | , getHostId() |
| | | , (role.getCode().equals(RoleType.boss.toString()) || role.getCode().equals(RoleType.manager.toString())) ? String.valueOf(user.getDeptId()) : null |
| | | , role.judgeLeader() ? String.valueOf(user.getDeptId()) : null |
| | | , user.getId() |
| | | , condition); |
| | | List<KeyValueVo> vos = new ArrayList<>(); |
| | |
| | | private Long leader; |
| | | |
| | | /** |
| | | * 角色等级 1: 一级 2: 二级 3: 三级 4: 四级 5: 五级 |
| | | * 角色等级 1: 一级 2: 二级 3: 三级 4: 四级 5: 五级 |
| | | */ |
| | | @ApiModelProperty(value= "角色等级 1: 一级 2: 二级 3: 三级 4: 四级 5: 五级 ") |
| | | private Short level; |
| | |
| | | this.level = level; |
| | | } |
| | | |
| | | |
| | | public boolean judgeLeader() { |
| | | RoleService service = SpringUtils.getBean(RoleService.class); |
| | | return service.judgeLeader(this.id); |
| | | } |
| | | } |
| | |
| | | |
| | | List<User> getUserByRoleCode(Long hostId, Long deptId, Long userId); |
| | | |
| | | Boolean judgeLeader(Long roleId); |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.zy.crm.common.model.enums.RoleType; |
| | | import com.zy.crm.system.entity.Role; |
| | | import com.zy.crm.system.entity.User; |
| | | import com.zy.crm.system.mapper.RoleMapper; |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Boolean judgeLeader(Long roleId) { |
| | | Role role = this.selectById(roleId); |
| | | return (role.getCode().equals(RoleType.boss.toString()) || role.getCode().equals(RoleType.manager.toString())); |
| | | } |
| | | |
| | | } |