| | |
| | | * @param memberId |
| | | */ |
| | | public static void wholePriceDataOperation(Long memberId) { |
| | | Map<String, WholePriceDataModel> dataModelMap = WholeDataQueue.MAP; |
| | | RedisUtils redisUtils = SpringContextHolder.getBean(RedisUtils.class); |
| | | |
| | | ContractHoldOrderDao contractHoldOrderDao = SpringContextHolder.getBean(ContractHoldOrderDao.class); |
| | |
| | | |
| | | List<ContractHoldOrderEntity> holdOrders = contractHoldOrderDao.selectHoldOrderListByMemberId(memberId); |
| | | if (CollUtil.isEmpty(holdOrders)) { |
| | | if (dataModelMap.get(memberId.toString()) != null) { |
| | | dataModelMap.remove(memberId.toString()); |
| | | |
| | | redisUtils.set(AppContants.WHOLE_BOMB_MAP, JSONObject.toJSONString(dataModelMap)); |
| | | } |
| | | return; |
| | | } |
| | | |
| | |
| | | wholePriceData.setBalance(wallet.getTotalBalance().subtract(totalAmount)); |
| | | wholePriceData.setMemberId(memberId); |
| | | |
| | | Map<String, WholePriceDataModel> dataModelMap = WholeDataQueue.MAP; |
| | | dataModelMap.put(wholePriceData.getMemberId().toString(), wholePriceData); |
| | | |
| | | redisUtils.set(AppContants.WHOLE_BOMB_MAP, JSONObject.toJSONString(dataModelMap)); |
| | | } |
| | | |
| | | } |