希晓余额充值

This commit is contained in:
2023-11-27 10:45:46 +08:00
parent d61f88ff65
commit 0e36550c4c
3 changed files with 15 additions and 7 deletions

View File

@@ -215,12 +215,14 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
String targetMerchantId = dto.getTargetMerchantId(); // 目标运营商id
log.info("修改用户余额 memberId:{}, updatePrincipalBalance:{}, targetMerchantId:{}", memberId, updatePrincipalBalance, targetMerchantId);
// 校验权限
LoginUserDetailVO loginUserDetail = UserUtils.getLoginUserDetail();
List<MerchantInfoVO> merchantInfoVOList = loginUserDetail.getMerchantInfoVOList();
List<String> collect = merchantInfoVOList.stream().map(MerchantInfoVO::getMerchantId).collect(Collectors.toList());
if (!collect.contains(targetMerchantId)) {
throw new BusinessException(ReturnCodeEnum.CODE_PERMISSION_DENIED);
// 来自后管的充值,校验权限
if (StringUtils.equals(dto.getFromWeb(), Constants.ONE)) {
LoginUserDetailVO loginUserDetail = UserUtils.getLoginUserDetail();
List<MerchantInfoVO> merchantInfoVOList = loginUserDetail.getMerchantInfoVOList();
List<String> collect = merchantInfoVOList.stream().map(MerchantInfoVO::getMerchantId).collect(Collectors.toList());
if (!collect.contains(targetMerchantId)) {
throw new BusinessException(ReturnCodeEnum.CODE_PERMISSION_DENIED);
}
}
// 查询用户余额