bug
This commit is contained in:
parent
c22fd9ee3c
commit
97893c2cb2
@ -543,21 +543,44 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
|
||||
@Override
|
||||
public Boolean updateIsonline(Integer id, String isonline) {
|
||||
int row = 0;
|
||||
ActiveNewlyweds activeNewlyweds = baseMapper.selectById(id);
|
||||
if (ObjectUtil.isNotEmpty(activeNewlyweds)){
|
||||
//ActiveNewlyweds activeNewlyweds = baseMapper.selectById(id);
|
||||
/*if (ObjectUtil.isNotEmpty(activeNewlyweds)){
|
||||
activeNewlyweds.setStatus("2");
|
||||
activeNewlyweds.setIsonline(isonline);
|
||||
row = baseMapper.updateById(activeNewlyweds);
|
||||
}*/
|
||||
|
||||
LambdaQueryWrapper<ActiveNewlyweds> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ActiveNewlyweds::getStoreId, TokenUtil.getNowAccountInfo().getStoreId());
|
||||
List<ActiveNewlyweds> 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<ActiveApplet> 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<ActiveApplet> 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<ActiveApplet> 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;
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,6 @@ public class ActiveRecommendRecordsServiceImpl extends ServiceImpl<ActiveRecomme
|
||||
@Override
|
||||
@Transactional
|
||||
public boolean add(ActiveRecommendRecordsDTO activeRecommendRecordsDTO) {
|
||||
log.info("新增邀请记录接口:"+activeRecommendRecordsDTO);
|
||||
if (ObjectUtils.isNotEmpty(activeRecommendRecordsDTO) && activeRecommendRecordsDTO.getType().equals("yaoqingyouli")){
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer userId = nowAccountInfo.getId();
|
||||
|
@ -323,21 +323,43 @@ public class ActiveRecommendServiceImpl extends ServiceImpl<ActiveRecommendMappe
|
||||
@Transactional
|
||||
public Boolean updateIsonline(Integer id, String isonline) {
|
||||
int row = 0;
|
||||
ActiveRecommend activeRecommend = baseMapper.selectById(id);
|
||||
|
||||
/* ActiveRecommend activeRecommend = baseMapper.selectById(id);
|
||||
if (ObjectUtil.isNotEmpty(activeRecommend)){
|
||||
activeRecommend.setStatus("2");
|
||||
activeRecommend.setIsonline(isonline);
|
||||
row = baseMapper.updateById(activeRecommend);
|
||||
}*/
|
||||
|
||||
LambdaQueryWrapper<ActiveRecommend> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ActiveRecommend::getStoreId, TokenUtil.getNowAccountInfo().getStoreId());
|
||||
List<ActiveRecommend> 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<ActiveApplet> 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<ActiveApplet> 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<ActiveApplet> 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user