diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsServiceImpl.java index 9e1f32d12..2fed93937 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsServiceImpl.java @@ -543,21 +543,44 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ActiveNewlyweds::getStoreId, TokenUtil.getNowAccountInfo().getStoreId()); + List activeNewlywedsList = list(queryWrapper); + for (ActiveNewlyweds newlyweds : activeNewlywedsList) { + if (newlyweds.getId().equals(id)){ + ActiveNewlyweds activeNewlyweds = baseMapper.selectById(id); + activeNewlyweds.setStatus("2"); + activeNewlyweds.setIsonline(isonline); + row = baseMapper.updateById(activeNewlyweds); + + LambdaQueryWrapper queryWrapper1 = new LambdaQueryWrapper<>(); + queryWrapper1.eq(ActiveApplet::getStoreId, TokenUtil.getNowAccountInfo().getStoreId()); + queryWrapper1.eq(ActiveApplet::getActiveId,id); + queryWrapper1.eq(ActiveApplet::getType,"6"); + ActiveApplet activeApplet = activeAppletService.getOne(queryWrapper1); + activeApplet.setIsonline(isonline); + activeAppletService.updateById(activeApplet); + }else { + newlyweds.setStatus("1"); + newlyweds.setIsonline("1"); + row = baseMapper.updateById(newlyweds); + + LambdaQueryWrapper queryWrapper1 = new LambdaQueryWrapper<>(); + queryWrapper1.eq(ActiveApplet::getStoreId, TokenUtil.getNowAccountInfo().getStoreId()); + queryWrapper1.eq(ActiveApplet::getActiveId,newlyweds.getId()); + queryWrapper1.eq(ActiveApplet::getType,"6"); + ActiveApplet activeApplet = activeAppletService.getOne(queryWrapper1); + activeApplet.setIsonline(isonline); + activeAppletService.updateById(activeApplet); + } } - - LambdaQueryWrapper queryWrapper1 = new LambdaQueryWrapper<>(); - queryWrapper1.eq(ActiveApplet::getStoreId, TokenUtil.getNowAccountInfo().getStoreId()); - queryWrapper1.eq(ActiveApplet::getActiveId,id); - queryWrapper1.eq(ActiveApplet::getType,"6"); - ActiveApplet activeApplet = activeAppletService.getOne(queryWrapper1); - activeApplet.setIsonline(isonline); - activeAppletService.updateById(activeApplet); - return row == 1; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java index 899eed5dd..dca9058a6 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java @@ -156,7 +156,6 @@ public class ActiveRecommendRecordsServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ActiveRecommend::getStoreId, TokenUtil.getNowAccountInfo().getStoreId()); + List activeRecommendList = list(queryWrapper); + for (ActiveRecommend recommend : activeRecommendList) { + if(recommend.getId().equals(id)){ + ActiveRecommend activeRecommend = baseMapper.selectById(id); + activeRecommend.setStatus("2"); + activeRecommend.setIsonline(isonline); + row = baseMapper.updateById(activeRecommend); + LambdaQueryWrapper queryWrapper1 = new LambdaQueryWrapper<>(); + queryWrapper1.eq(ActiveApplet::getStoreId, TokenUtil.getNowAccountInfo().getStoreId()); + queryWrapper1.eq(ActiveApplet::getActiveId,id); + queryWrapper1.eq(ActiveApplet::getType,"7"); + ActiveApplet activeApplet = activeAppletService.getOne(queryWrapper1); + activeApplet.setIsonline(isonline); + activeAppletService.updateById(activeApplet); + } else { + recommend.setStatus("1"); + recommend.setIsonline("1"); + row = baseMapper.updateById(recommend); + LambdaQueryWrapper queryWrapper1 = new LambdaQueryWrapper<>(); + queryWrapper1.eq(ActiveApplet::getStoreId, TokenUtil.getNowAccountInfo().getStoreId()); + queryWrapper1.eq(ActiveApplet::getActiveId,recommend.getId()); + queryWrapper1.eq(ActiveApplet::getType,"7"); + ActiveApplet activeApplet = activeAppletService.getOne(queryWrapper1); + activeApplet.setIsonline(isonline); + activeAppletService.updateById(activeApplet); + } } - - LambdaQueryWrapper queryWrapper1 = new LambdaQueryWrapper<>(); - queryWrapper1.eq(ActiveApplet::getStoreId, TokenUtil.getNowAccountInfo().getStoreId()); - queryWrapper1.eq(ActiveApplet::getActiveId,id); - queryWrapper1.eq(ActiveApplet::getType,"7"); - ActiveApplet activeApplet = activeAppletService.getOne(queryWrapper1); - activeApplet.setIsonline(isonline); - activeAppletService.updateById(activeApplet); - return row == 1; }