|
|
@@ -23,6 +23,7 @@ import com.fs.common.core.domain.entity.SysDictData;
|
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
|
import com.fs.common.core.redis.RedisCache;
|
|
|
import com.fs.common.enums.ImTypeEnum;
|
|
|
+import com.fs.common.exception.ServiceException;
|
|
|
import com.fs.common.param.LoginMaWxParam;
|
|
|
import com.fs.common.utils.DateUtils;
|
|
|
import com.fs.common.utils.DictUtils;
|
|
|
@@ -1314,4 +1315,63 @@ public class FsUserServiceImpl implements IFsUserService {
|
|
|
return R.ok();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public PageInfo<FsUserPageListVO> selectFsUserCompanyPageList(FsUserPageListParam param) {
|
|
|
+ CompanyUser companyUser = companyUserMapper.selectCompanyUserById(param.getUserId());
|
|
|
+
|
|
|
+ if(companyUser == null){
|
|
|
+ throw new ServiceException("操作失败,用户不存在!");
|
|
|
+ }
|
|
|
+
|
|
|
+ param.setUserId(0L);
|
|
|
+ param.setCompanyId(companyUser.getCompanyId());
|
|
|
+ //筛选问题
|
|
|
+ if (StringUtils.isNotBlank(param.getCompanyUserId())) {
|
|
|
+ param.setUserId(Long.valueOf(param.getCompanyUserId()));
|
|
|
+ }
|
|
|
+
|
|
|
+ PageHelper.startPage(param.getPageNum(), param.getPageSize());
|
|
|
+ if (param.getTagIds() != null && param.getTagIds().length > 0) {
|
|
|
+ boolean containsZero = Arrays.asList(param.getTagIds()).contains("0");
|
|
|
+ // 如果包含 "0",则设置 isNullTag 为 true
|
|
|
+ System.out.println("是否包含 0:" + containsZero + ",参数:" + Arrays.toString(param.getTagIds()));
|
|
|
+ if (containsZero) {
|
|
|
+ param.setIsNullTag(true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<FsUserPageListVO> fsUserPageListVOS = fsUserMapper.selectFsUserPageList(param);
|
|
|
+
|
|
|
+
|
|
|
+ List<SysDictData> courseProject = dictDataMapper.selectDictDataByType("sys_course_project");
|
|
|
+ for (FsUserPageListVO fsUserPageListVO : fsUserPageListVOS) {
|
|
|
+ if (courseProject != null && !courseProject.isEmpty()) {
|
|
|
+ if (fsUserPageListVO.getProjectId() != null) {
|
|
|
+ // 项目
|
|
|
+ courseProject.stream()
|
|
|
+ .filter(c -> c.getDictValue().equals(fsUserPageListVO.getProjectId().toString()))
|
|
|
+ .findFirst()
|
|
|
+ .ifPresent(c -> fsUserPageListVO.setProjectName(c.getDictLabel()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (StringUtils.isEmpty(fsUserPageListVO.getNickname())) {
|
|
|
+ fsUserPageListVO.setNickname("用户暂未授权昵称");
|
|
|
+ }
|
|
|
+
|
|
|
+ //解密
|
|
|
+ if(fsUserPageListVO.getPhone() != null && fsUserPageListVO.getPhone() != ""){
|
|
|
+ if(param.getIsHidePhoneMiddle()){
|
|
|
+ if (fsUserPageListVO.getPhone().length()>11){
|
|
|
+ fsUserPageListVO.setPhone(decryptPhoneMk(fsUserPageListVO.getPhone()));
|
|
|
+ }else {
|
|
|
+ fsUserPageListVO.setPhone(fsUserPageListVO.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ fsUserPageListVO.setPhone(decryptPhone(fsUserPageListVO.getPhone()));
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return new PageInfo<>(fsUserPageListVOS);
|
|
|
+ }
|
|
|
}
|