From 97893c2cb239c226ec91a1b75e3f1a680ac1c1b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Tue, 12 Mar 2024 17:00:59 +0800 Subject: [PATCH] bug --- .../impl/ActiveNewlywedsServiceImpl.java | 45 ++++++++++++++----- .../ActiveRecommendRecordsServiceImpl.java | 1 - .../impl/ActiveRecommendServiceImpl.java | 42 ++++++++++++----- 3 files changed, 66 insertions(+), 22 deletions(-) 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; }