Commit 29918b74 by huangjy

fix:子女端登陆问题

parent d1394866
......@@ -8,6 +8,8 @@ import com.makeit.common.response.ApiResponseEntity;
import com.makeit.common.response.ApiResponseUtils;
import com.makeit.dto.platform.elder.children.PlatElderChildrenInfoDTOVO;
import com.makeit.dto.platform.elder.children.PlatElderChildrenInfoQueryDTO;
import com.makeit.global.annotation.AuthIgnore;
import com.makeit.global.aspect.tenant.TenantIdIgnore;
import com.makeit.service.platform.elder.PlatElderChildrenInfoService;
import com.makeit.vo.platform.elder.PlatElderChildrenInfoListVO;
import io.swagger.annotations.Api;
......@@ -39,6 +41,8 @@ public class PlatElderChildrenInfoController {
@ApiOperation("分页列表")
@PostMapping("page")
@TenantIdIgnore
@AuthIgnore
public ApiResponseEntity<PageVO<PlatElderChildrenInfoListVO>> page(@RequestBody PageReqDTO<PlatElderChildrenInfoQueryDTO> page) {
return ApiResponseUtils.success(platElderChildrenInfoService.page(page));
}
......
......@@ -102,7 +102,9 @@ public class PlatElderChildrenInfoServiceImpl extends ServiceImpl<PlatElderChild
return new PageVO<>();
}
List<String> openIdList = voList.stream().map(PlatElderChildrenInfoListVO::getOpenid).collect(Collectors.toList());
List<PlatElderChildrenInfo> platElderChildrenInfos = list(new QueryWrapper<PlatElderChildrenInfo>().lambda().in(PlatElderChildrenInfo::getOpenid, openIdList));
List<PlatElderChildrenInfo> platElderChildrenInfos = list(new QueryWrapper<PlatElderChildrenInfo>().lambda()
.in(PlatElderChildrenInfo::getOpenid, openIdList)
.isNotNull(PlatElderChildrenInfo::getElderId));
Map<String, List<PlatElderChildrenInfo>> map = StreamUtil.groupBy(platElderChildrenInfos, PlatElderChildrenInfo::getOpenid);
for (PlatElderChildrenInfoListVO platElderChildrenInfoListVO : voList) {
List<PlatElderChildrenInfo> platElderChildrenInfoList = map.get(platElderChildrenInfoListVO.getOpenid());
......
......@@ -1082,7 +1082,7 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
PlatElder platElder = getById(id);
if (StringUtils.isBlank(platElder.getBedId())) {
if (platElder == null || StringUtils.isBlank(platElder.getBedId())) {
return null;
}
......
......@@ -68,7 +68,7 @@ public class PlatElderChildrenInfoUserLoginWechatServiceImpl implements PlatElde
for (PlatElderChildrenInfo platElderChildrenInfo : childrenInfoList) {
platElderChildrenInfo.setPhone(userInfo.getPhoneNumber());
platElderChildrenInfo.setAvatar(userInfo.getAvatarUrl());
platElderChildrenInfo.setName(userInfo.getNickName());
//RequestUtil.setHeader(HeaderConst.WECHAT_TOKEN, token);
platElderChildrenInfo.setUpdateBy(userInfo.getNickName());
......
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