liukangdong
2024-10-22 39500edd05aced7a2d9debba5a243b756dd2a939
server/system_service/src/main/java/com/doumee/service/system/impl/SystemUserServiceImpl.java
@@ -7,6 +7,7 @@
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Constants;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.model.Company;
import com.doumee.dao.system.SystemUserJoinMapper;
import com.doumee.dao.system.SystemUserMapper;
import com.doumee.dao.system.dto.QuerySystemUserDTO;
@@ -14,6 +15,7 @@
import com.doumee.dao.system.model.SystemUser;
import com.doumee.dao.system.vo.SystemDepartmentListVO;
import com.doumee.dao.system.vo.SystemUserListVO;
import com.doumee.dao.system.vo.UserResponse;
import com.doumee.service.aware.DepartmentDataPermissionAware;
import com.doumee.service.system.SystemDepartmentService;
import com.doumee.service.system.SystemPositionService;
@@ -120,6 +122,13 @@
        Wrapper<SystemUser> wrapper = new QueryWrapper<>(systemUser);
        return systemUserMapper.selectList(wrapper);
    }
    @Override
    public List<UserResponse> getUserList(Integer bookingsId) {
        return systemUserMapper.getUserList(new QueryWrapper<UserResponse>()
                .exists(" select 1 from meeting_user_rel u where u.USER_ID = c.id and u.ISDELETED = 0  and u.OBJ_ID = "+bookingsId+" and u.OBJ_TYPE = 1  ")
        );
    }
  
    @Override
    public PageData<SystemUserListVO> findPage(PageWrap<QuerySystemUserDTO> pageWrap) {
@@ -198,8 +207,6 @@
    @Override
    public List<SystemUser> findAllList(SystemUser pageWrap) {
        MPJLambdaWrapper<SystemUser> queryWrapper = new MPJLambdaWrapper<>();
        Utils.MP.blankToNull(pageWrap);
        queryWrapper.selectAll(SystemUser.class);
@@ -209,11 +216,7 @@
                .or().like(SystemUser::getRealname,pageWrap.getUsername())
        );
        queryWrapper.orderByDesc(SystemUser::getCreateTime);
        List<SystemUser> result = systemUserJoinMapper.selectJoinList( SystemUser.class, queryWrapper);
        return result;
    }
@@ -221,5 +224,17 @@
    @Override
    public List<SystemUser> findInternalList() {
        MPJLambdaWrapper<SystemUser> queryWrapper = new MPJLambdaWrapper<>();
        queryWrapper.selectAll(SystemUser.class);
        queryWrapper.eq(SystemUser::getDeleted, Constants.ZERO);
        queryWrapper.leftJoin(Company.class,Company::getId,SystemUser::getCompanyId);
        queryWrapper.eq(Company::getType,Constants.ONE);
        queryWrapper.orderByDesc(SystemUser::getCreateTime);
        List<SystemUser> result = systemUserJoinMapper.selectJoinList( SystemUser.class, queryWrapper);
        return result;
    }
}