1
This commit is contained in:
@@ -576,14 +576,26 @@ public class TencentDocController extends BaseController {
|
|||||||
|
|
||||||
log.info("找到单号 {} 在第 {} 行", thirdPartyOrderNo, targetRow);
|
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(
|
com.ruoyi.jarvis.util.TencentDocApiUtil.writeSheetData(
|
||||||
accessToken,
|
accessToken,
|
||||||
|
tencentDocConfig.getAppId(),
|
||||||
|
openId,
|
||||||
fileId,
|
fileId,
|
||||||
sheetId,
|
sheetId,
|
||||||
String.format("%s%d", getColumnLetter(logisticsColumn), targetRow),
|
String.format("%s%d", getColumnLetter(logisticsColumn), targetRow),
|
||||||
logisticsLink,
|
logisticsLink,
|
||||||
tencentDocConfig.getAppId(),
|
|
||||||
tencentDocConfig.getApiBaseUrl()
|
tencentDocConfig.getApiBaseUrl()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user