更新sdk

This commit is contained in:
Richie 2025-04-20 10:21:56 +08:00
parent 192c352ec2
commit 625250dd9c
7 changed files with 34 additions and 64 deletions

Binary file not shown.

Binary file not shown.

View File

@ -75,42 +75,6 @@
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
<version>3.5.5</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>cn.qihangerp.open.tao</groupId>-->
<!-- <artifactId>tao-api2</artifactId>-->
<!-- <version>1.6.16</version>-->
<!-- <scope>system</scope>-->
<!-- <systemPath>${project.basedir}/libs/tao-api2-1.6.16.jar</systemPath>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>cn.qihangerp.open.jd</groupId>-->
<!-- <artifactId>jd-api</artifactId>-->
<!-- <version>1.5.4</version>-->
<!-- <scope>system</scope>-->
<!-- <systemPath>${project.basedir}/libs/jd-api-1.6.17.jar</systemPath>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.codehaus.jackson</groupId>-->
<!-- <artifactId>jackson-mapper-asl</artifactId>-->
<!-- <version>1.9.13</version> &lt;!&ndash; jd-sdk依赖 &ndash;&gt;-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>pdd</groupId>-->
<!-- <artifactId>pop-api</artifactId>-->
<!-- <version>0.6.17</version>-->
<!-- <scope>system</scope>-->
<!-- <systemPath>${project.basedir}/libs/pdd-api-0.6.17.jar</systemPath>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>doudian</groupId>-->
<!-- <artifactId>dou-api</artifactId>-->
<!-- <version>0.6.18</version>-->
<!-- <scope>system</scope>-->
<!-- <systemPath>${project.basedir}/libs/dou-api-0.6.18.jar</systemPath>-->
<!-- </dependency>-->
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
@ -120,33 +84,12 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>wei-api</groupId>-->
<!-- <artifactId>wei-api</artifactId>-->
<!-- <version>1.6.20</version>-->
<!-- <scope>system</scope>-->
<!-- <systemPath>${project.basedir}/libs/wei-api-1.6.20.jar</systemPath>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>kuaishou</groupId>-->
<!-- <artifactId>kuaishou-merchant-open-sdk-</artifactId>-->
<!-- <version>1.0.10</version>-->
<!-- <scope>system</scope>-->
<!-- <systemPath>${project.basedir}/libs/kuaishou-merchant-open-sdk-1.0.10.jar</systemPath>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>cn.qihangerp.open</groupId>-->
<!-- <artifactId>open-sdk</artifactId>-->
<!-- <version>1.0</version>-->
<!-- <scope>system</scope>-->
<!-- <systemPath>${project.basedir}/libs/open-sdk-1.0.jar</systemPath>-->
<!-- </dependency>-->
<dependency>
<groupId>cn.qihangerp.open</groupId>
<artifactId>open-sdk</artifactId>
<version>1.0.2</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/open-sdk-1.0.2.jar</systemPath>
<systemPath>${project.basedir}/libs/open-sdk-1.4.20.jar</systemPath>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>

View File

@ -6,6 +6,7 @@ import cn.qihangerp.common.ResultVoEnum;
import cn.qihangerp.common.api.ShopApiParams;
import cn.qihangerp.common.enums.EnumShopType;
import cn.qihangerp.common.enums.HttpStatus;
import cn.qihangerp.common.utils.DateUtils;
import cn.qihangerp.common.utils.StringUtils;
import cn.qihangerp.domain.OShopPullLasttime;
import cn.qihangerp.domain.OShopPullLogs;
@ -15,7 +16,6 @@ import cn.qihangerp.module.open.tao.service.TaoGoodsService;
import cn.qihangerp.module.service.OShopPullLasttimeService;
import cn.qihangerp.module.service.OShopPullLogsService;
import cn.qihangerp.open.common.ApiResultVo;
import cn.qihangerp.open.common.DateUtil;
import cn.qihangerp.open.tao.TaoApiCommon;
import cn.qihangerp.open.tao.TaoGoodsApiHelper;
import cn.qihangerp.open.tao.TaoRequest;
@ -113,11 +113,11 @@ public class TaoGoodsApiController {
taoGoods.setHasInvoice(g.isHas_invoice() + "");
taoGoods.setHasWarranty(g.isHas_warranty() + "");
taoGoods.setHasShowcase(g.isHas_showcase() + "");
taoGoods.setModified(DateUtil.stringtoDate(g.getModified()));
taoGoods.setDelistTime(StringUtils.isEmpty(g.getDelist_time()) ? null : DateUtil.stringtoDate(g.getDelist_time()));
taoGoods.setModified(DateUtils.stringtoDate(g.getModified()));
taoGoods.setDelistTime(StringUtils.isEmpty(g.getDelist_time()) ? null : DateUtils.stringtoDate(g.getDelist_time()));
taoGoods.setPostageId(g.getPostage_id());
taoGoods.setOuterId(g.getOuter_id());
taoGoods.setListTime(StringUtils.isEmpty(g.getList_time()) ? null : DateUtil.stringtoDate(g.getList_time()));
taoGoods.setListTime(StringUtils.isEmpty(g.getList_time()) ? null : DateUtils.stringtoDate(g.getList_time()));
taoGoods.setPrice(g.getPrice());
taoGoods.setSoldQuantity(g.getSold_quantity());
taoGoods.setShopId(req.getShopId());

View File

@ -8,7 +8,7 @@ import cn.qihangerp.common.enums.HttpStatus;
import cn.qihangerp.domain.OShop;
import cn.qihangerp.module.service.OShopService;
import cn.qihangerp.open.common.ApiResultVo;
import cn.qihangerp.open.wei.response.WeiTokenResponse;
import cn.qihangerp.open.wei.WeiTokenResponse;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;

View File

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

View File

@ -93,7 +93,34 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
throw new RuntimeException(e);
}
}
/**
* 把符合日期格式的字符串转换为日期类型
*/
public static Date stringtoDate(String dateStr, String format) {
Date d = null;
SimpleDateFormat formater = new SimpleDateFormat(format);
try {
formater.setLenient(false);
d = formater.parse(dateStr);
} catch (Exception e) {
// log.error(e);
d = null;
}
return d;
}
public static Date stringtoDate(String dateStr) {
Date d = null;
SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
formater.setLenient(false);
d = formater.parse(dateStr);
} catch (Exception e) {
// log.error(e);
d = null;
}
return d;
}
/**
* 时间字符串转时间戳
* @param format