forked from kidgrow-microservices-platform

zhaoxiaohao
2020-07-01 03f4f6946461026ed63580556c17664d37833c75
kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/java/com/kidgrow/usercenter/service/impl/SysUserServiceImpl.java
@@ -113,6 +113,7 @@
    @Override
    public LoginAppUser getLoginAppUser(SysUser sysUser) {
        LoginAppUser loginAppUser = new LoginAppUser();
        SysUser sysUserNew = this.baseMapper.selectById(sysUser);
        if (sysUser != null) {
            //返回的数据为什么要把密码也返回?清空!!
            loginAppUser.setPassword("");
@@ -121,6 +122,7 @@
            BeanUtils.copyProperties(sysUser, loginAppUser);
            //获取用户所属组织机构列表
            loginAppUser.setDefaultAuth(sysUserNew.getDefaultAuth());
            List<SysOrganization> sysOrganizations = organizationService.findListByUserId(sysUser.getId());
            //设置组织机构集合
            loginAppUser.setOrganizations(sysOrganizations);
@@ -938,6 +940,7 @@
    public boolean phoneIsUsed(String phone) {
        Map<String, Object> selectMap = new HashMap<>();
        selectMap.put("mobile", phone);
        selectMap.put("is_del", 0);
        List<SysUser> sysUsers = baseMapper.selectByMap(selectMap);
        return (sysUsers.size() > 0);
    }
@@ -948,7 +951,7 @@
     * @param depatmentId
     * @return
     */
    private Integer departmetAccountsCount(Long depatmentId) {
    public Integer departmetAccountsCount(Long depatmentId) {
        SysDepartment sysDepartment = departmentService.getById(depatmentId);
        if (sysDepartment == null) {
            return 0;