Commit e1558dff by huangjy

fix:平台端子女端列表显示问题

parent 2f9c11b2
...@@ -167,10 +167,12 @@ public class PlatElderChildrenInfoServiceImpl extends ServiceImpl<PlatElderChild ...@@ -167,10 +167,12 @@ public class PlatElderChildrenInfoServiceImpl extends ServiceImpl<PlatElderChild
public void edit(PlatElderChildrenInfoDTOVO dto) { public void edit(PlatElderChildrenInfoDTOVO dto) {
check(BeanDtoVoUtils.convert(dto, PlatElderChildrenInfoDTOVO.class)); check(BeanDtoVoUtils.convert(dto, PlatElderChildrenInfoDTOVO.class));
String tenantId = RequestUtil.getTenantIdHeader();
PlatElderChildrenInfo db = getById(dto.getId()); PlatElderChildrenInfo db = getById(dto.getId());
List<PlatElderChildrenInfo> platElderChildrenInfoList = list(new QueryWrapper<PlatElderChildrenInfo>().lambda()
.eq(PlatElderChildrenInfo::getOpenid, db.getOpenid()) List<PlatElderChildrenInfo> platElderChildrenInfoList = listInfoByOpenid(db.getOpenid(),tenantId);
.isNotNull(PlatElderChildrenInfo::getElderId));
List<String> idList = StreamUtil.map(platElderChildrenInfoList, BaseEntity::getId); List<String> idList = StreamUtil.map(platElderChildrenInfoList, BaseEntity::getId);
removeByIds(idList); removeByIds(idList);
CommonUserVO commonUserVO = CommonUserUtil.getUser(); CommonUserVO commonUserVO = CommonUserUtil.getUser();
...@@ -198,6 +200,13 @@ public class PlatElderChildrenInfoServiceImpl extends ServiceImpl<PlatElderChild ...@@ -198,6 +200,13 @@ public class PlatElderChildrenInfoServiceImpl extends ServiceImpl<PlatElderChild
} }
} }
private List<PlatElderChildrenInfo> listInfoByOpenid(String openid, String tenantId) {
return list(new QueryWrapper<PlatElderChildrenInfo>().lambda()
.eq(PlatElderChildrenInfo::getOpenid, openid)
.eq(BaseBusEntity::getTenantId,tenantId)
.isNotNull(PlatElderChildrenInfo::getElderId));
}
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public void wechatEdit(PlatElderChildrenInfoWechatDTOVO dto) { public void wechatEdit(PlatElderChildrenInfoWechatDTOVO dto) {
...@@ -230,9 +239,8 @@ public class PlatElderChildrenInfoServiceImpl extends ServiceImpl<PlatElderChild ...@@ -230,9 +239,8 @@ public class PlatElderChildrenInfoServiceImpl extends ServiceImpl<PlatElderChild
@Override @Override
public void del(String id) { public void del(String id) {
PlatElderChildrenInfo db = getById(id); PlatElderChildrenInfo db = getById(id);
List<PlatElderChildrenInfo> platElderChildrenInfoList = list(new QueryWrapper<PlatElderChildrenInfo>().lambda() String tenantId = RequestUtil.getTenantIdHeader();
.eq(PlatElderChildrenInfo::getOpenid, db.getOpenid()) List<PlatElderChildrenInfo> platElderChildrenInfoList = listInfoByOpenid(db.getOpenid(),tenantId);
.isNotNull(PlatElderChildrenInfo::getElderId));
List<String> idList = StreamUtil.map(platElderChildrenInfoList, BaseEntity::getId); List<String> idList = StreamUtil.map(platElderChildrenInfoList, BaseEntity::getId);
removeByIds(idList); removeByIds(idList);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment