更新sdk

This commit is contained in:
启航老齐 2025-10-01 19:59:32 +08:00
parent f95bfdf304
commit 60570f7a96
10 changed files with 10 additions and 9 deletions

Binary file not shown.

View File

@ -23,7 +23,7 @@
<artifactId>open-sdk</artifactId> <artifactId>open-sdk</artifactId>
<version>1.0.2</version> <version>1.0.2</version>
<scope>system</scope> <scope>system</scope>
<systemPath>${project.basedir}/libs/open-sdk-1.5.4.jar</systemPath> <systemPath>${project.basedir}/libs/open-sdk-1.10.1.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.qihangerp.service</groupId> <groupId>cn.qihangerp.service</groupId>

View File

@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.time.Duration; import java.time.Duration;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
@ -56,7 +57,7 @@ public class TaoOrderApiController {
*/ */
@PostMapping("/pull_order_tao") @PostMapping("/pull_order_tao")
@ResponseBody @ResponseBody
public AjaxResult pullIncrementOrder(@RequestBody TaoRequest req) { public AjaxResult pullIncrementOrder(@RequestBody TaoRequest req) throws IOException {
log.info("/**************增量拉取tao订单****************/"); log.info("/**************增量拉取tao订单****************/");
if (req.getShopId() == null || req.getShopId() <= 0) { if (req.getShopId() == null || req.getShopId() <= 0) {
return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误没有店铺Id"); return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误没有店铺Id");
@ -184,7 +185,7 @@ public class TaoOrderApiController {
*/ */
@RequestMapping("/pull_order_detail") @RequestMapping("/pull_order_detail")
@ResponseBody @ResponseBody
public AjaxResult getOrderPullDetail(@RequestBody TaoRequest taoRequest) { public AjaxResult getOrderPullDetail(@RequestBody TaoRequest taoRequest) throws IOException {
log.info("/**************主动更新tao订单by number****************/"); log.info("/**************主动更新tao订单by number****************/");
if (taoRequest.getShopId() == null || taoRequest.getShopId() <= 0) { if (taoRequest.getShopId() == null || taoRequest.getShopId() <= 0) {
return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误没有店铺Id"); return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误没有店铺Id");

View File

@ -30,6 +30,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;
import java.time.Duration; import java.time.Duration;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
@ -52,7 +53,7 @@ public class TaoRefundApiController {
*/ */
@RequestMapping("/pull_refund") @RequestMapping("/pull_refund")
@ResponseBody @ResponseBody
public AjaxResult refundOrderPull(@RequestBody TaoRequest taoRequest) { public AjaxResult refundOrderPull(@RequestBody TaoRequest taoRequest) throws IOException {
log.info("/**************主动更新tao退货订单****************/"); log.info("/**************主动更新tao退货订单****************/");
if (taoRequest.getShopId() == null || taoRequest.getShopId() <= 0) { if (taoRequest.getShopId() == null || taoRequest.getShopId() <= 0) {
// return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "参数错误没有店铺Id"); // return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "参数错误没有店铺Id");
@ -172,7 +173,7 @@ public class TaoRefundApiController {
@RequestMapping("/pull_refund_detail") @RequestMapping("/pull_refund_detail")
@ResponseBody @ResponseBody
public AjaxResult refundDetailPull(@RequestBody TaoRequest taoRequest) { public AjaxResult refundDetailPull(@RequestBody TaoRequest taoRequest) throws IOException {
log.info("/**************主动更新tao退货订单****************/"); log.info("/**************主动更新tao退货订单****************/");
if (taoRequest.getShopId() == null || taoRequest.getShopId() <= 0) { if (taoRequest.getShopId() == null || taoRequest.getShopId() <= 0) {
return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误没有店铺Id"); return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误没有店铺Id");

Binary file not shown.

View File

@ -23,7 +23,7 @@
<artifactId>open-sdk</artifactId> <artifactId>open-sdk</artifactId>
<version>1.0.2</version> <version>1.0.2</version>
<scope>system</scope> <scope>system</scope>
<systemPath>${project.basedir}/libs/open-sdk-1.5.4.jar</systemPath> <systemPath>${project.basedir}/libs/open-sdk-1.10.1.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.qihangerp.service</groupId> <groupId>cn.qihangerp.service</groupId>

View File

@ -1,6 +1,5 @@
package cn.qihangerp.api.wei; package cn.qihangerp.api.wei;
import cn.qihangerp.common.ResultVo; import cn.qihangerp.common.ResultVo;
import cn.qihangerp.common.api.ShopApiParams; import cn.qihangerp.common.api.ShopApiParams;
import cn.qihangerp.common.enums.EnumShopType; import cn.qihangerp.common.enums.EnumShopType;
@ -9,7 +8,7 @@ import cn.qihangerp.model.entity.OShop;
import cn.qihangerp.module.service.OShopService; import cn.qihangerp.module.service.OShopService;
import cn.qihangerp.open.common.ApiResultVo; import cn.qihangerp.open.common.ApiResultVo;
import cn.qihangerp.open.wei.WeiTokenApiHelper; import cn.qihangerp.open.wei.WeiTokenApiHelper;
import cn.qihangerp.open.wei.WeiTokenResponse; import cn.qihangerp.open.wei.response.WeiTokenResponse;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;

View File

@ -56,7 +56,7 @@ public class WeiOrderApiController extends BaseController {
// String appSecret = checkResult.getData().getAppSecret(); // String appSecret = checkResult.getData().getAppSecret();
LocalDateTime endTime = LocalDateTime.now(); LocalDateTime endTime = LocalDateTime.now();
LocalDateTime startTime = endTime.minusHours(1); LocalDateTime startTime = endTime.minusHours(1);
ApiResultVo<Order> orderApiResultVo = WeiOrderApiHelper.pullOrderList(startTime, endTime, accessToken); ApiResultVo<Order> orderApiResultVo = WeiOrderApiHelper.pullOrderList(startTime, endTime, accessToken,1,100);
// ApiResultVo<Order> apiResultVo = OrderApiHelper.pullOrderList(startTime, endTime, accessToken); // ApiResultVo<Order> apiResultVo = OrderApiHelper.pullOrderList(startTime, endTime, accessToken);
int insertSuccess = 0;//新增成功的订单 int insertSuccess = 0;//新增成功的订单