| | |
| | | if (UserMoneyUnclaimed.OP_TYPE_SYSTEM != userMoneyUnclaimed.getOpType() && UserMoneyUnclaimed.OP_TYPE_RECEIVE != userMoneyUnclaimed.getOpType()) { |
| | | throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL, "操作类型错误"); |
| | | } |
| | | // 有规则,且规则不需要校验用户勾选 |
| | | if (moneyRule != null && moneyRule.getIsUserReceive().equals(BaseEntity.NO)){ |
| | | // 校验基础规则中是否需要领取 |
| | | if (moneyRule.getIsNeedReceive().equals(BaseEntity.YES)){ |
| | | logger.info("操作用户资金(待领取记录)-不校验用户设置是否需要领取状态-但是需要用户领取"); |
| | | //需要领取 |
| | | userMoneyUnclaimed.setOpType(UserMoneyUnclaimed.OP_TYPE_RECEIVE); |
| | | }else if (moneyRule.getIsNeedReceive().equals(BaseEntity.NO)){ |
| | | logger.info("操作用户资金(待领取记录)-不校验用户设置是否需要领取状态-并且不需要用户领取"); |
| | | //不需要领取 |
| | | userMoneyUnclaimed.setOpType(UserMoneyUnclaimed.OP_TYPE_SYSTEM); |
| | | } |
| | | }else { |
| | | //增值金需要判断用户是否勾选 |
| | | if (UserMoneyUnclaimed.FUND_TYPE_VALUE_ADDED_FUND == userMoneyUnclaimed.getFundType()){ |
| | | // 没有规则,或者需要用户勾选校验 查询用户设置是否领取状态 |
| | | UserInfo userInfo = userInfoMapper.selectOneByUserId(userMoneyUnclaimed.getUserId()); |
| | | if (userInfo != null && userInfo.getIsReceiveValueAddedFund() != null |
| | | && BaseEntity.NO.equals(userInfo.getIsReceiveValueAddedFund())){ |
| | | logger.info("操作用户资金(待领取记录)-用户设置增值金是否需要领取状态:{}", userInfo.getIsReceiveValueAddedFund()); |
| | | // 用户设置了不用再领取 |
| | | //非系统处理走判断 |
| | | if (UserMoneyUnclaimed.OP_TYPE_SYSTEM != userMoneyUnclaimed.getOpType()){ |
| | | // 有规则,且规则不需要校验用户勾选 |
| | | if (moneyRule != null && moneyRule.getIsUserReceive().equals(BaseEntity.NO)){ |
| | | // 校验基础规则中是否需要领取 |
| | | if (moneyRule.getIsNeedReceive().equals(BaseEntity.YES)){ |
| | | logger.info("操作用户资金(待领取记录)-不校验用户设置是否需要领取状态-但是需要用户领取"); |
| | | //需要领取 |
| | | userMoneyUnclaimed.setOpType(UserMoneyUnclaimed.OP_TYPE_RECEIVE); |
| | | }else if (moneyRule.getIsNeedReceive().equals(BaseEntity.NO)){ |
| | | logger.info("操作用户资金(待领取记录)-不校验用户设置是否需要领取状态-并且不需要用户领取"); |
| | | //不需要领取,设置为系统处理 |
| | | userMoneyUnclaimed.setOpType(UserMoneyUnclaimed.OP_TYPE_SYSTEM); |
| | | } |
| | | }else { |
| | | //非增值金默认系统处理 |
| | | // 无规则或者需要判断用户是否勾选 |
| | | // 默认系统处理 |
| | | userMoneyUnclaimed.setOpType(UserMoneyUnclaimed.OP_TYPE_SYSTEM); |
| | | // 暂时只有增值金需要判断用户是否勾选 |
| | | if (UserMoneyUnclaimed.FUND_TYPE_VALUE_ADDED_FUND == userMoneyUnclaimed.getFundType()){ |
| | | // 没有规则,或者需要用户勾选校验 查询用户设置是否领取状态 |
| | | UserInfo userInfo = userInfoMapper.selectOneByUserId(userMoneyUnclaimed.getUserId()); |
| | | if (userInfo != null && userInfo.getIsReceiveValueAddedFund() != null |
| | | && BaseEntity.NO.equals(userInfo.getIsReceiveValueAddedFund())){ |
| | | logger.info("操作用户资金(待领取记录)-用户设置增值金是否需要领取状态:{}", userInfo.getIsReceiveValueAddedFund()); |
| | | // 用户设置了不用再领取 |
| | | userMoneyUnclaimed.setOpType(UserMoneyUnclaimed.OP_TYPE_SYSTEM); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | // 判断操作数量或金额 |
| | | if (userMoneyUnclaimed.getOpNumber() == null) { |