Commit 6560ff65 authored by 廖旭伟's avatar 廖旭伟

测试bug修改

parent 12e03368
......@@ -44,10 +44,26 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe
UserEntity userEntity = userService.get(context.getUser().getId());
if(userEntity!=null){
entity.setFeedbackName(userEntity.getRealName());
entity.setPhotoPath(userEntity.getPhotoPath());
entity.setFeedbackName(userEntity.getRealName());
if(StringUtils.isEmpty(entity.getContactInfo())){
entity.setContactInfo(userEntity.getMobile());
}
if(StringUtils.isEmpty(entity.getEmail())){
entity.setEmail(userEntity.getEmail());
}
}
}
}
@Override
protected void updateBefore(FeedbackEntity entity, Context context) throws AppException {
super.saveBefore(entity,context);
if(StringUtils.isNotEmpty(entity.getReplyContent())){
entity.setReply(1);
}
}
@Override
protected void findAfter(FeedbackEntity params, PageInfo pageInfo, Context context, List<FeedbackEntity> list) throws AppException {
super.findAfter(params, pageInfo, context, list);
......@@ -56,10 +72,19 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe
List<UserEntity> userList = userService.find(new UserQuery().idList(userIdList));
Map<Long,UserEntity> userMap = userList.parallelStream().collect(Collectors.toMap(x -> x.getId(), z -> z, (o, n) -> n));
for(FeedbackEntity item:list){
if(StringUtils.isNotEmpty(item.getReplyContent())){
item.setReply(1);
}
UserEntity userEntity = userMap.get(item.getCreateUserId());
if(userEntity!=null) {
item.setPhotoPath(userEntity.getPhotoPath());
item.setFeedbackName(userEntity.getRealName());
if(StringUtils.isEmpty(item.getContactInfo())){
item.setContactInfo(userEntity.getMobile());
}
if(StringUtils.isEmpty(item.getEmail())){
item.setEmail(userEntity.getEmail());
}
}
}
}
......
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 to comment