diff --git a/pjcloud-common/pjcloud-common-core/src/main/java/com/bsd/pjcloud/common/core/constant/CommonRoleConstant.java b/pjcloud-common/pjcloud-common-core/src/main/java/com/bsd/pjcloud/common/core/constant/CommonRoleConstant.java index 0fdb41a12..8f7ea0f25 100644 --- a/pjcloud-common/pjcloud-common-core/src/main/java/com/bsd/pjcloud/common/core/constant/CommonRoleConstant.java +++ b/pjcloud-common/pjcloud-common-core/src/main/java/com/bsd/pjcloud/common/core/constant/CommonRoleConstant.java @@ -6,6 +6,7 @@ public interface CommonRoleConstant { String DEPT_ADMIN = "DEPT_ADMIN"; + // 自动创建钱包 String AUTO_CREATE_WALLET = "WALLET_AUTO_CREATE"; } diff --git a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/WalletManageServiceImpl.java b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/WalletManageServiceImpl.java index 8026aa505..9fe16db13 100644 --- a/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/WalletManageServiceImpl.java +++ b/pjcloud-wallet/pjcloud-wallet-biz/src/main/java/com/bsd/pjcloud/wallet/service/impl/WalletManageServiceImpl.java @@ -22,6 +22,7 @@ import com.bsd.pjcloud.admin.api.feign.RemoteDeptService; import com.bsd.pjcloud.admin.api.feign.RemoteUserService; import com.bsd.pjcloud.admin.api.utils.DataUtil; import com.bsd.pjcloud.common.core.constant.CacheConstants; +import com.bsd.pjcloud.common.core.constant.CommonRoleConstant; import com.bsd.pjcloud.common.core.constant.enums.YesNoEnum; import com.bsd.pjcloud.common.core.util.BeanUtils; import com.bsd.pjcloud.common.core.util.CollectionUtils; @@ -102,7 +103,7 @@ public class WalletManageServiceImpl extends ServiceImpl syncList = new ArrayList<>(); String syncAllMchVersion = getSyncAllMchVersion(); for (UserVO v : userVOList) { + if (ObjectUtil.isEmpty(v) || ObjectUtil.isEmpty(v.getUserId())) { + log.error("|{}|syncAllUserGroup用户不存在WalletManageVo|{}|", TAG, JSONUtil.toJsonStr(v)); + continue; + } + if (ObjectUtil.isEmpty(v.getRoleList()) || !v.getRoleList().contains(CommonRoleConstant.AUTO_CREATE_WALLET)) { + log.error("|{}|syncAllUserGroup用户没有自动创建钱包权限|{}|", TAG, JSONUtil.toJsonStr(v)); + continue; + } MchManageVo mch = mchManageService.getFirstMchByDeptId(v.getDeptId()); // 查询是在商户下 if (ObjectUtil.isEmpty(mch)) {