Commit d3b33914 authored by shiyu's avatar shiyu

调用玩物得志社区接口获取用户签名,优化为空的情况

parent 1ca5fbed
......@@ -9,6 +9,7 @@ import com.wwdz.ch.admin.service.ItemService;
import com.wwdz.ch.core.consts.ConsignSaleEnum;
import com.wwdz.ch.core.consts.ItemStateEnum;
import com.wwdz.ch.core.entity.ConsignSaleVo;
import com.wwdz.ch.core.type.PageSearchResult;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.core.util.MediaUtil;
import com.wwdz.ch.db.dao.ConsignSaleDao;
......@@ -87,7 +88,8 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
}
consignSaleVoList.add(consignSaleVo);
});
return Result.success(consignSaleVoList);
PageSearchResult pageSearchResult = PageSearchResult.of(pageInfo, consignSaleVoList);
return Result.success(pageSearchResult);
} catch (Exception e) {
logger.error("查询寄售单列表 error:{}", e);
}
......
......@@ -183,7 +183,7 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
try {
CloudServerResponse<CommunityUserAttributeDO> response = communityAttributeReadService.getCommunityUserAttributeByUserId(f.getFollowerId());
if (response.isSuccess()) {
followFansRecordVo.setFollowerProfile(response.getResult().getSignature());
followFansRecordVo.setFollowerProfile(response.getResult() == null ? null : response.getResult().getSignature());
}
} catch (Exception e) {
logger.error(">>>>>>>>> 调用社区用户查询接口获取用户签名出错:{}", e);
......@@ -231,7 +231,7 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
try {
CloudServerResponse<CommunityUserAttributeDO> response = communityAttributeReadService.getCommunityUserAttributeByUserId(f.getFansId());
if (response.isSuccess()) {
followFansRecordVo.setFansProfile(response.getResult().getSignature());
followFansRecordVo.setFansProfile(response.getResult() == null ? null : response.getResult().getSignature());
}
} catch (Exception e) {
logger.error(">>>>>>>>> 调用社区用户查询接口获取用户签名出错:{}", e);
......
......@@ -797,7 +797,7 @@ public class ItemServiceImpl implements ItemService {
try {
CloudServerResponse<CommunityUserAttributeDO> response = communityAttributeReadService.getCommunityUserAttributeByUserId(itemResponseVo.getItemUserId());
if (response.isSuccess()) {
itemResponseVo.setProfile(response.getResult().getSignature());
itemResponseVo.setProfile(response.getResult() == null ? null : response.getResult().getSignature());
}
} catch (Exception e) {
logger.error(">>>>>>>>> 调用社区用户查询接口获取用户签名出错:{}", e);
......
......@@ -499,7 +499,7 @@ public class UserServiceImpl implements UserService {
try {
CloudServerResponse<CommunityUserAttributeDO> response = communityAttributeReadService.getCommunityUserAttributeByUserId(userId);
if (response.isSuccess()) {
user.setProfile(response.getResult().getSignature());
user.setProfile(response.getResult() == null ? null : response.getResult().getSignature());
}
} catch (Exception e) {
logger.error(">>>>>>>>> 调用社区用户查询接口获取用户签名出错:{}", e);
......@@ -585,7 +585,7 @@ public class UserServiceImpl implements UserService {
try {
CloudServerResponse<CommunityUserAttributeDO> response = communityAttributeReadService.getCommunityUserAttributeByUserId(dto.getUserId());
if (response.isSuccess()) {
userInfo.setProfile(response.getResult().getSignature());
userInfo.setProfile(response.getResult() == null ? null : response.getResult().getSignature());
}
} catch (Exception e) {
logger.error(">>>>>>>>> 调用社区用户查询接口获取用户签名出错:{}", e);
......
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