Преглед на файлове

modify:

1. 增加是否区县用户;
tags/24083001^0
WendyYang преди 2 месеца
родител
ревизия
3fc4e643ae
променени са 6 файла, в които са добавени 17 реда и са изтрити 7 реда
  1. +5
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/common/helper/impl/UserInfoHelperImpl.java
  2. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/req/SubmitPurchaseNoticeReq.java
  3. +1
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/user/convert/UserInfoConvertor.java
  4. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/user/manage/UserInfoManage.java
  5. +4
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/user/security/model/UserFullInfoDTO.java
  6. +5
    -4
      hz-pm-api/src/main/java/com/hz/pm/api/user/security/model/UserInfoDetails.java

+ 5
- 1
hz-pm-api/src/main/java/com/hz/pm/api/common/helper/impl/UserInfoHelperImpl.java Целия файл

@@ -6,11 +6,13 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hz.pm.api.common.helper.UserInfoHelper;
import com.hz.pm.api.common.model.constant.BizConst;
import com.hz.pm.api.common.model.constant.MhUnitConst;
import com.hz.pm.api.common.util.StrUtils;
import com.hz.pm.api.sys.mapper.RoleMapper;
import com.hz.pm.api.sys.model.entity.Role;
import com.hz.pm.api.sys.model.entity.UserRole;
import com.hz.pm.api.sys.service.IUserRoleService;
import com.hz.pm.api.user.helper.MhUnitCache;
import com.hz.pm.api.user.model.entity.UserInfo;
import com.hz.pm.api.user.model.enumeration.RoleEnum;
import com.hz.pm.api.user.model.enumeration.UserAvailableEnum;
@@ -38,6 +40,7 @@ public class UserInfoHelperImpl implements UserInfoHelper {
private final IUserInfoService userInfoService;
private final IUserRoleService iUserRoleService;
private final RoleMapper roleMapper;
private final MhUnitCache mhUnitCache;

@Override
public UserFullInfoDTO getUserFullInfoByMhUserIdOrOpenId(String mhUserId) {
@@ -73,7 +76,8 @@ public class UserInfoHelperImpl implements UserInfoHelper {
.collect(Collectors.toList());
userFullInfo.setUserRoleList(roleMapper.selectBatchIds(roleIdList));
}

List<Long> viewUnitIds = mhUnitCache.getViewChildIdsRecursion(MhUnitConst.COUNTY_PARENT_UNIT_ID);
userFullInfo.setIsCountyUser(viewUnitIds.contains(userInfo.getMhUnitId()));
// 装配返回
userFullInfo.setUserId(userInfo.getId());
userFullInfo.setMhUserId(userInfo.getMhUserId());


+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/req/SubmitPurchaseNoticeReq.java Целия файл

@@ -69,7 +69,7 @@ public class SubmitPurchaseNoticeReq {
private String purchaseMethod;

@ApiModelProperty("是否发布信创云图")
public Boolean publishMhNotice;
private Boolean publishMhNotice;

@ApiModelProperty("采购范围:1 公开采购、2 非公开采购")
private Integer purchaseScope;


+ 1
- 0
hz-pm-api/src/main/java/com/hz/pm/api/user/convert/UserInfoConvertor.java Целия файл

@@ -29,6 +29,7 @@ public class UserInfoConvertor {
userInfoDetails.setMhUnitName(userFullInfo.getMhUnitName());
userInfoDetails.setMobile(userFullInfo.getMobile());
userInfoDetails.setMhUserId(userFullInfo.getMhUserId());
userInfoDetails.setIsCountyUser(userFullInfo.getIsCountyUser());
return userInfoDetails;
}



+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/user/manage/UserInfoManage.java Целия файл

@@ -300,7 +300,7 @@ public class UserInfoManage {
}).collect(Collectors.toList());
resUserDetail.setUserRoleInfoList(userRoles);
}
resUserDetail.setIsCountyUser(userDetail.isCountyUser());
resUserDetail.setIsCountyUser(userDetail.getIsCountyUser());
return resUserDetail;
}



+ 4
- 0
hz-pm-api/src/main/java/com/hz/pm/api/user/security/model/UserFullInfoDTO.java Целия файл

@@ -51,6 +51,10 @@ public class UserFullInfoDTO {
*/
private UserAvailableEnum available;

/**
* 是否是区县用户
*/
private Boolean isCountyUser;

/**
* 取最高的权限


+ 5
- 4
hz-pm-api/src/main/java/com/hz/pm/api/user/security/model/UserInfoDetails.java Целия файл

@@ -57,6 +57,11 @@ public class UserInfoDetails extends AbstractLoginUser implements UserDetails {

private String mobile;

/**
* 是否是区县用户
*/
private Boolean isCountyUser;

public String getUserIdStr() {
return String.valueOf(getUserId());
}
@@ -163,8 +168,4 @@ public class UserInfoDetails extends AbstractLoginUser implements UserDetails {
return Collections.emptyList();
}

public boolean isCountyUser() {
return getMhUnitId().equals(MhUnitConst.COUNTY_PARENT_UNIT_ID);
}

}

Loading…
Отказ
Запис