puzhibing
2026-04-07 aefa3f8f1d461cb713d689f1c28f612e0cd56241
xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/controller/XpOperationsUserController.java
@@ -275,6 +275,66 @@
            }
        }
        if (xpOperationsUserVO.getIdCardFront() != null) {
            JSONObject jsonObject = JSONObject.parseObject(xpOperationsUserVO.getIdCardFront());
            if(jsonObject!=null){
                String downloadUrl = null;
                try {
                    // 1
                    downloadUrl= aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                jsonObject.put("url", downloadUrl);
                xpOperationsUserVO.setIdCardFront(jsonObject.toJSONString());
            }
        }
        if (xpOperationsUserVO.getIdCardBack() != null) {
            JSONObject jsonObject = JSONObject.parseObject(xpOperationsUserVO.getIdCardBack());
            if(jsonObject!=null){
                String downloadUrl = null;
                try {
                    // 1
                    downloadUrl= aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                jsonObject.put("url", downloadUrl);
                xpOperationsUserVO.setIdCardBack(jsonObject.toJSONString());
            }
        }
        if (xpOperationsUserVO.getDriverLicense() != null) {
            JSONObject jsonObject = JSONObject.parseObject(xpOperationsUserVO.getDriverLicense());
            if(jsonObject!=null){
                String downloadUrl = null;
                try {
                    // 1
                    downloadUrl= aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                jsonObject.put("url", downloadUrl);
                xpOperationsUserVO.setDriverLicense(jsonObject.toJSONString());
            }
        }
        if (xpOperationsUserVO.getCertificateOfNoCriminalRecord() != null) {
            JSONObject jsonObject = JSONObject.parseObject(xpOperationsUserVO.getCertificateOfNoCriminalRecord());
            if(jsonObject!=null){
                String downloadUrl = null;
                try {
                    // 1
                    downloadUrl= aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                jsonObject.put("url", downloadUrl);
                xpOperationsUserVO.setCertificateOfNoCriminalRecord(jsonObject.toJSONString());
            }
        }
        return R.ok(xpOperationsUserVO);
    }