com.didiglobal.logi.security.dao.impl.UserProjectDaoImpl Maven / Gradle / Ivy
package com.didiglobal.logi.security.dao.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.didiglobal.logi.security.common.entity.UserProject;
import com.didiglobal.logi.security.common.po.UserProjectPO;
import com.didiglobal.logi.security.dao.UserProjectDao;
import com.didiglobal.logi.security.dao.mapper.UserProjectMapper;
import com.didiglobal.logi.security.util.CopyBeanUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author cjm
*/
@Component
public class UserProjectDaoImpl extends BaseDaoImpl implements UserProjectDao {
@Autowired
private UserProjectMapper userProjectMapper;
@Override
public List selectUserIdListByProjectId(Integer projectId) {
if(projectId == null) {
return new ArrayList<>();
}
QueryWrapper queryWrapper = getQueryWrapper();
queryWrapper.select(FieldConstant.USER_ID).eq(FieldConstant.PROJECT_ID, projectId);
List