liujie
2026-03-09 bbdd5f4f286fc593c5c30bd1bccd1f39af135dfa
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpUserFeedbackServiceImpl.java
@@ -4,11 +4,10 @@
import cn.hutool.core.collection.CollUtil;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaopeng.api.dto.account.UserResourcesDto;
import com.xiaopeng.api.dto.account.UcUserInfo;
import com.xiaopeng.api.feignClient.account.UserResourcesClient;
import com.xiaopeng.api.model.operation.XpFeedbackType;
import com.xiaopeng.api.model.operation.XpUserFeedback;
import com.xiaopeng.api.vo.account.GetUserListByUidsVo;
import com.xiaopeng.common.core.web.page.PageInfo;
import com.xiaopeng.operation.mapper.XpUserFeedbackMapper;
import com.xiaopeng.operation.query.UserFeedBackQuery;
@@ -19,7 +18,6 @@
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import java.util.Collections;
@@ -52,18 +50,14 @@
        //获取小鹏用户信息
        List<Long> xpUid = xpUserFeedbackVOS.stream().map(XpUserFeedback::getFeedbackUserId).distinct().collect(Collectors.toList());
        if (CollUtil.isNotEmpty(xpUid)) {
            GetUserListByUidsVo getUserListByUidsVo = new GetUserListByUidsVo();
            getUserListByUidsVo.setUids(xpUid);
            getUserListByUidsVo.setGetPreCarOwner(Boolean.TRUE);
            UserResourcesDto resultData = userResourcesClient.getUserListByUids(getUserListByUidsVo);
            if (resultData.getCode().equals(HttpStatus.OK.value())) {
                JSONObject jsonObject = JSONObject.parseObject(resultData.getData().toString());
            Map<String, UcUserInfo> userInfoMap = userResourcesClient.getUserListByUids(xpUid, false);
            if (userInfoMap != null && !userInfoMap.isEmpty()) {
                for (XpUserFeedbackVO xpUserFeedbackVO : xpUserFeedbackVOS) {
                    JSONObject userInfo = jsonObject.getJSONObject(xpUserFeedbackVO.getFeedbackUserId().toString());
                    UcUserInfo userInfo = userInfoMap.get(xpUserFeedbackVO.getFeedbackUserId().toString());
                    if (Objects.nonNull(userInfo)) {
                        xpUserFeedbackVO.setNickname(userInfo.getString("nickName"));
                        xpUserFeedbackVO.setAvatar(userInfo.getString("headImg"));
                        xpUserFeedbackVO.setPhone(userInfo.getString("mobile"));
                        xpUserFeedbackVO.setNickname(userInfo.getNickName());
                        xpUserFeedbackVO.setAvatar(userInfo.getHeadImg());
                        xpUserFeedbackVO.setPhone(userInfo.getMobile());
                    }
                }
            }