liujie
2026-04-03 0d78540be462dab087bbdce8dc0775872c939d72
修改bug
1个文件已修改
60 ■■■■■ 已修改文件
xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/controller/XpOperationsUserController.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
    }