Commit d185576e by huangjy

fix:长者头像问题

parent d33f3d04
......@@ -11,6 +11,7 @@ import com.makeit.common.entity.BaseEntity;
import com.makeit.common.page.PageReqDTO;
import com.makeit.common.page.PageVO;
import com.makeit.dto.platform.auth.PlatOrgSplitDTO;
import com.makeit.dto.platform.elder.add.PlatElderDTOVO;
import com.makeit.dto.platform.elder.children.PlatElderChildrenInfoDTOVO;
import com.makeit.dto.platform.elder.children.PlatElderChildrenInfoQueryDTO;
import com.makeit.dto.platform.elder.children.PlatElderChildrenInfoWechatDTOVO;
......@@ -30,6 +31,7 @@ import com.makeit.utils.data.convert.StreamUtil;
import com.makeit.utils.old.StringUtils;
import com.makeit.utils.request.RequestUtil;
import com.makeit.utils.sql.join.JoinUtil;
import com.makeit.utils.sys.FileUtil;
import com.makeit.utils.user.common.CommonUserUtil;
import com.makeit.utils.user.common.CommonUserVO;
import com.makeit.utils.user.wechat.WechatUserUtil;
......@@ -271,6 +273,10 @@ public class PlatElderChildrenInfoServiceImpl extends ServiceImpl<PlatElderChild
List<PlatElderListVO> list = BeanDtoVoUtils.listVo(platElders, PlatElderListVO.class);
platElderService.fill(list);
FileUtil.convert(list, PlatElderListVO::getAvatar, (e, f) -> {
e.setAvatar(f.getFullUrl());
});
Map<String, PlatElderListVO> elderListVOMap = StreamUtil.toMap(list, BaseIdDTO::getId);
List<PlatElderChildrenInfoWechatVO> voList = Lists.newArrayList();
for (PlatElderChildrenInfo platElderChildrenInfo : platElderChildrenInfoList) {
......
......@@ -71,18 +71,20 @@ public class PlatRegionSettingServiceImpl extends ServiceImpl<PlatRegionSettingM
platDeviceOthers = platDeviceOthers.stream().filter(platDeviceOther -> StringUtils.isNotEmpty(platDeviceOther.getAttribute())).collect(Collectors.toList());
Map<String,String> map = platDeviceOthers.stream().collect(Collectors.toMap(PlatDeviceOther::getDeviceId,PlatDeviceOther::getAttribute));
List<PlatRegionSetting> list = new ArrayList<>();
listDeviceId.forEach(item->{
for (String item : listDeviceId) {
PlatRegionSetting platRegionSetting = new PlatRegionSetting();
platRegionSetting.setDeviceId(item);
platRegionSetting.setRoomId(roomId);
if(map.get(item)!=null){
String attribute = map.get(item);
PlatDeviceAttrWechatDTO deviceAttrWechatDTO = JsonUtil.toObj(attribute,PlatDeviceAttrWechatDTO.class);
platRegionSetting.setInstallType(deviceAttrWechatDTO.getRadarMount()+"");
if (deviceAttrWechatDTO == null || deviceAttrWechatDTO.getRadarMount() == null) {
continue;
}
platRegionSetting.setInstallType(deviceAttrWechatDTO.getRadarMount().toString());
}
list.add(platRegionSetting);
});
}
if(!list.isEmpty()){
saveBatch(list);
......
......@@ -135,6 +135,7 @@ public class PlatElderListVO extends BaseTenantDTO {
@ApiModelProperty(value = "更新人名称")
private String updateBy;
@ApiModelProperty(value = "头像文件id")
private String avatar;
}
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