| | |
| | | UserMoney userMoney = userMoneyService.selectUserIdDecrypt(userMoneyUnclaimed.getUserId()); |
| | | switch (userMoneyUnclaimed.getFundType()) { |
| | | case UserMoneyUnclaimed.FUND_TYPE_STORED_VALUE_FUND: |
| | | info.append(",储值金"); |
| | | info.append(", 储值金"); |
| | | before = new BigDecimal(userMoney.getStoredValueFund()); |
| | | after = before.add(userMoneyUnclaimed.getOpNumber()); |
| | | break; |
| | | case UserMoneyUnclaimed.FUND_TYPE_VALUE_ADDED_FUND: |
| | | info.append(",增值金"); |
| | | info.append(", 增值金"); |
| | | before = new BigDecimal(userMoney.getValueAddedFund()); |
| | | after = before.add(userMoneyUnclaimed.getOpNumber()); |
| | | break; |
| | | case UserMoneyUnclaimed.FUND_TYPE_INTEGRAL: |
| | | info.append(",积分"); |
| | | info.append(", 积分"); |
| | | before = new BigDecimal(userMoney.getIntegral()); |
| | | after = before.add(userMoneyUnclaimed.getOpNumber()); |
| | | break; |
| | | case UserMoneyUnclaimed.FUND_TYPE_DEPOSIT: |
| | | info.append(",预定金"); |
| | | info.append(", 预定金"); |
| | | before = new BigDecimal(userMoney.getDeposit()); |
| | | after = before.add(userMoneyUnclaimed.getOpNumber()); |
| | | break; |
| | | } |
| | | info.append(",操作数量:").append(userMoneyUnclaimed.getOpNumber()); |
| | | info.append(", 操作数量:").append(userMoneyUnclaimed.getOpNumber()); |
| | | if (UserMoneyUnclaimed.FUND_TYPE_VALUE_ADDED_FUND == userMoneyUnclaimed.getFundType()) { |
| | | // 增值金添加是否需要领取 |
| | | int opType = userMoneyUnclaimed.getOpType() == null ? BaseEntity.YES : userMoneyUnclaimed.getOpType(); |
| | | info.append(",是否需要领取:").append(BaseEntity.YES.equals(opType) ? "是" : "否"); |
| | | info.append(", 是否需要领取:").append(BaseEntity.YES.equals(opType) ? "是" : "否"); |
| | | if (BaseEntity.YES.equals(opType)){ |
| | | before = null; |
| | | after = null; |
| | | } |
| | | } |
| | | if (BaseEntity.YES.equals(type)){ |
| | | info.append(",领取资金"); |
| | | info.append(", 领取资金: ").append(userMoneyUnclaimed.getOpNumber()); |
| | | } |
| | | if (3 == type){ |
| | | info.append(", 作废待领取资金: ").append(userMoneyUnclaimed.getOpNumber()); |
| | | before = null; |
| | | after = null; |
| | | } |
| | | jsonObject.put("key", info.toString()); |
| | | jsonObject.put("before", before); |
| | |
| | | */ |
| | | @Override |
| | | public void updateAll(UserMoneyUnclaimed userMoneyUnclaimed) { |
| | | if(BaseEntity.YES.equals(userMoneyUnclaimed.getIsDel())){ |
| | | // 添加用户日志 |
| | | addUserLog(userMoneyUnclaimed, 3); |
| | | } |
| | | int count = userMoneyUnclaimedMapper.updateAll(userMoneyUnclaimed); |
| | | if (count != 1) { |
| | | throw new TipsException("保存失败!"); |