| | |
| | | if (oldHongBao == null) |
| | | throw new HongBaoException(10, "红包对象不存在"); |
| | | // 已经失效,已经领取,领取中,新老状态一致的红包不做处理 |
| | | if (oldHongBao.getState() == HongBaoV2.STATE_SHIXIAO || oldHongBao.getState() == HongBaoV2.STATE_YILINGQU|| oldHongBao.getState() == HongBaoV2.STATE_LINGQUING) |
| | | if (oldHongBao.getState() == HongBaoV2.STATE_SHIXIAO || oldHongBao.getState() == HongBaoV2.STATE_YILINGQU || oldHongBao.getState() == HongBaoV2.STATE_LINGQUING) |
| | | return false; |
| | | |
| | | SystemEnum system = userInfoService.getUserSystem(commonOrder.getUserInfo().getId()); |
| | |
| | | List<HongBaoV2> children = hongBaoV2Mapper.listChildrenById(hongBao.getId()); |
| | | if (children != null && children.size() > 0) |
| | | for (HongBaoV2 child : children) { |
| | | if (child.getState() == HongBaoV2.STATE_YILINGQU||child.getState() == HongBaoV2.STATE_LINGQUING) |
| | | if (child.getState() == HongBaoV2.STATE_YILINGQU || child.getState() == HongBaoV2.STATE_LINGQUING) |
| | | continue; |
| | | |
| | | HongBaoV2 childUpdate = new HongBaoV2(child.getId()); |
| | |
| | | List<HongBaoV2> children = hongBaoV2Mapper.listChildrenById(hongBao.getId()); |
| | | if (children != null) |
| | | for (HongBaoV2 child : children) { |
| | | if (child.getState() == HongBaoV2.STATE_YILINGQU||child.getState() == HongBaoV2.STATE_LINGQUING) |
| | | if (child.getState() == HongBaoV2.STATE_YILINGQU || child.getState() == HongBaoV2.STATE_LINGQUING) |
| | | continue; |
| | | |
| | | HongBaoV2 childUpdate = new HongBaoV2(child.getId()); |
| | |
| | | @Transactional |
| | | @Override |
| | | public void setHongBaoRecieved(Long uid, List<Integer> typeList, Date preGetTime) { |
| | | hongBaoV2Mapper.setHongBaoRecieved(uid, typeList, preGetTime); |
| | | |
| | | String getMonth = TimeUtil.getGernalTime(preGetTime.getTime(), "yyyy-MM"); |
| | | //前面几个月的可能有未结算的,统一加入到本月结算 |
| | | hongBaoV2Mapper.setHongBaoRecieved(uid, typeList, preGetTime, getMonth); |
| | | } |
| | | |
| | | |