1
This commit is contained in:
@@ -576,14 +576,26 @@ public class TencentDocController extends BaseController {
|
||||
|
||||
log.info("找到单号 {} 在第 {} 行", thirdPartyOrderNo, targetRow);
|
||||
|
||||
// 8. 写入物流链接
|
||||
// 8. 获取用户信息(获取 openId)
|
||||
JSONObject userInfo = com.ruoyi.jarvis.util.TencentDocApiUtil.getUserInfo(accessToken);
|
||||
JSONObject userData = userInfo.getJSONObject("data");
|
||||
if (userData == null) {
|
||||
return AjaxResult.error("无法获取用户数据");
|
||||
}
|
||||
String openId = userData.getString("openID");
|
||||
if (openId == null || openId.isEmpty()) {
|
||||
return AjaxResult.error("无法获取Open-Id");
|
||||
}
|
||||
|
||||
// 9. 写入物流链接
|
||||
com.ruoyi.jarvis.util.TencentDocApiUtil.writeSheetData(
|
||||
accessToken,
|
||||
tencentDocConfig.getAppId(),
|
||||
openId,
|
||||
fileId,
|
||||
sheetId,
|
||||
String.format("%s%d", getColumnLetter(logisticsColumn), targetRow),
|
||||
logisticsLink,
|
||||
tencentDocConfig.getAppId(),
|
||||
tencentDocConfig.getApiBaseUrl()
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user