1
This commit is contained in:
@@ -325,6 +325,8 @@ public class TencentDocController extends BaseController {
|
|||||||
String fileId = (String) params.get("fileId");
|
String fileId = (String) params.get("fileId");
|
||||||
String sheetId = (String) params.get("sheetId");
|
String sheetId = (String) params.get("sheetId");
|
||||||
Long orderId = params.get("orderId") != null ? Long.valueOf(params.get("orderId").toString()) : null;
|
Long orderId = params.get("orderId") != null ? Long.valueOf(params.get("orderId").toString()) : null;
|
||||||
|
// 起始行号,默认为3
|
||||||
|
Integer startRow = params.get("startRow") != null ? Integer.valueOf(params.get("startRow").toString()) : 3;
|
||||||
|
|
||||||
if (accessToken == null || fileId == null || sheetId == null || orderId == null) {
|
if (accessToken == null || fileId == null || sheetId == null || orderId == null) {
|
||||||
return AjaxResult.error("accessToken、fileId、sheetId和orderId不能为空");
|
return AjaxResult.error("accessToken、fileId、sheetId和orderId不能为空");
|
||||||
@@ -336,7 +338,7 @@ public class TencentDocController extends BaseController {
|
|||||||
return AjaxResult.error("未找到订单信息");
|
return AjaxResult.error("未找到订单信息");
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject result = tencentDocService.appendLogisticsToSheet(accessToken, fileId, sheetId, order);
|
JSONObject result = tencentDocService.appendLogisticsToSheet(accessToken, fileId, sheetId, startRow, order);
|
||||||
return AjaxResult.success("追加物流信息成功", result);
|
return AjaxResult.success("追加物流信息成功", result);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("追加物流信息失败", e);
|
log.error("追加物流信息失败", e);
|
||||||
@@ -401,6 +403,8 @@ public class TencentDocController extends BaseController {
|
|||||||
String fileId = (String) params.get("fileId");
|
String fileId = (String) params.get("fileId");
|
||||||
String sheetId = (String) params.get("sheetId");
|
String sheetId = (String) params.get("sheetId");
|
||||||
Long orderId = params.get("orderId") != null ? Long.valueOf(params.get("orderId").toString()) : null;
|
Long orderId = params.get("orderId") != null ? Long.valueOf(params.get("orderId").toString()) : null;
|
||||||
|
// 起始行号,默认为3
|
||||||
|
Integer startRow = params.get("startRow") != null ? Integer.valueOf(params.get("startRow").toString()) : 3;
|
||||||
|
|
||||||
if (accessToken == null || fileId == null || sheetId == null || orderId == null) {
|
if (accessToken == null || fileId == null || sheetId == null || orderId == null) {
|
||||||
return AjaxResult.error("accessToken、fileId、sheetId和orderId不能为空");
|
return AjaxResult.error("accessToken、fileId、sheetId和orderId不能为空");
|
||||||
@@ -418,7 +422,7 @@ public class TencentDocController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 上传物流信息到腾讯文档
|
// 上传物流信息到腾讯文档
|
||||||
JSONObject uploadResult = tencentDocService.appendLogisticsToSheet(accessToken, fileId, sheetId, order);
|
JSONObject uploadResult = tencentDocService.appendLogisticsToSheet(accessToken, fileId, sheetId, startRow, order);
|
||||||
|
|
||||||
// 更新订单状态为已发货(可选)
|
// 更新订单状态为已发货(可选)
|
||||||
// order.setStatus("已发货");
|
// order.setStatus("已发货");
|
||||||
|
|||||||
Reference in New Issue
Block a user