From eb78e9183005efa02064956cc9ef2299dc2d2bdd Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 15 八月 2019 16:01:58 +0800 Subject: [PATCH] Merge branch 'mater-1.6.0' into div --- fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java index 7ef9acd..1e6c77d 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java @@ -1047,4 +1047,30 @@ public List<Long> getUidByNear30DayShareSucceed() { return hongBaoV2Mapper.getUidByNear30DayShareSucceed(); } + + @Override + public void invalidInviteHongBaoByParentUid(Long parentUid, String beiZhu) { + List<Integer> typeList = new ArrayList<>(); + typeList.add(HongBaoV2.TYPE_YIJI); + typeList.add(HongBaoV2.TYPE_ERJI); + typeList.add(HongBaoV2.TYPE_SHARE_YIJI); + typeList.add(HongBaoV2.TYPE_SHARE_ERJI); + List<Integer> stateList = new ArrayList<>(); + stateList.add(HongBaoV2.STATE_KELINGQU); + stateList.add(HongBaoV2.STATE_BUKELINGQU); + long count = hongBaoV2Mapper.countByParentUidAndTypeAndState(parentUid, typeList, stateList); + int page = (int) (count % 100 == 0 ? count / 100 : count / 100 + 1); + for (int i = 1; i <= page; i++) { + List<HongBaoV2> list = hongBaoV2Mapper.listByParentUidAndTypeAndState(parentUid, typeList, stateList, + 0, 100); + if (list != null) + for (HongBaoV2 v2 : list) { + HongBaoV2 update = new HongBaoV2(v2.getId()); + update.setUpdateTime(new Date()); + update.setState(HongBaoV2.STATE_SHIXIAO); + update.setBeizhu(beiZhu); + hongBaoV2Mapper.updateByPrimaryKeySelective(update); + } + } + } } -- Gitblit v1.8.0