优化dou商品拉取
This commit is contained in:
parent
5c976edee6
commit
ed64917ad6
Binary file not shown.
|
|
@ -93,7 +93,7 @@
|
|||
<artifactId>open-sdk</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/open-sdk-1.10.9.3.jar</systemPath>
|
||||
<systemPath>${project.basedir}/libs/open-sdk-2.1.1.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@ public class DouGoodsSku implements Serializable {
|
|||
/**
|
||||
* 商品ID;抖店系统生成。
|
||||
*/
|
||||
private Long productId;
|
||||
private String productId;
|
||||
|
||||
/**
|
||||
* 规格ID
|
||||
*/
|
||||
private Long specId;
|
||||
private String specId;
|
||||
|
||||
/**
|
||||
* sku外部编码
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -23,7 +23,7 @@
|
|||
<artifactId>open-sdk</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/open-sdk-1.10.1.jar</systemPath>
|
||||
<systemPath>${project.basedir}/libs/open-sdk-2.1.1.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.qihangerp.service</groupId>
|
||||
|
|
|
|||
|
|
@ -84,11 +84,14 @@ public class DouApiCommon {
|
|||
}
|
||||
}else{
|
||||
if(StringUtils.hasText(shop.getRefreshToken())) {
|
||||
ApiResultVo<Token> token1 = DouTokenApiHelper.refreshToken(appKey, appSecret, accessToken, shop.getRefreshToken());
|
||||
ApiResultVo<Token> token1 = DouTokenApiHelper.getToken(appKey, appSecret, shop.getSellerId());
|
||||
// ApiResultVo<Token> token1 = DouTokenApiHelper.refreshToken(appKey, appSecret, accessToken, shop.getRefreshToken());
|
||||
if (token1.getCode() == 0) {
|
||||
shopService.updateSessionKey(shopId, token1.getData().getAccessToken(), token1.getData().getRefreshToken());
|
||||
params.setAccessToken(token1.getData().getAccessToken());
|
||||
accessToken = token1.getData().getAccessToken();
|
||||
}else{
|
||||
return ResultVo.error(ResultVoEnum.API_FAIL.getIndex(), token1.getMsg(), params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ public class DouGoodsApiController {
|
|||
for (var goods: resultVo.getData().getGoodsList()){
|
||||
DouGoods douGoods = new DouGoods();
|
||||
BeanUtils.copyProperties(goods,douGoods);
|
||||
|
||||
douGoods.setProductId(goods.getProductId().toString());
|
||||
// TODO:转换goods
|
||||
douGoods.setShopId(params.getShopId());
|
||||
douGoods.setPullTime(new Date());
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -23,7 +23,7 @@
|
|||
<artifactId>open-sdk</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/open-sdk-1.10.1.jar</systemPath>
|
||||
<systemPath>${project.basedir}/libs/open-sdk-2.1.1.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -23,7 +23,7 @@
|
|||
<artifactId>open-sdk</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/open-sdk-1.10.9.3.jar</systemPath>
|
||||
<systemPath>${project.basedir}/libs/open-sdk-2.1.1.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.qihangerp.service</groupId>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -23,7 +23,7 @@
|
|||
<artifactId>open-sdk</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/open-sdk-1.10.2.jar</systemPath>
|
||||
<systemPath>${project.basedir}/libs/open-sdk-2.1.1.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -23,7 +23,7 @@
|
|||
<artifactId>open-sdk</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/open-sdk-1.10.9.3.jar</systemPath>
|
||||
<systemPath>${project.basedir}/libs/open-sdk-2.1.1.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.qihangerp.service</groupId>
|
||||
|
|
|
|||
|
|
@ -284,6 +284,7 @@ export default {
|
|||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.pullLoading = false
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="108px">
|
||||
<el-form-item label="平台SkuId" prop="skuId">
|
||||
<el-form-item label="平台SkuId" prop="id">
|
||||
<el-input
|
||||
v-model="queryParams.skuId"
|
||||
v-model="queryParams.id"
|
||||
placeholder="请输入平台SkuId"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
|
|
@ -66,9 +66,9 @@
|
|||
|
||||
<el-table v-loading="loading" :data="goodsList" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<!-- <el-table-column label="ID" align="center" prop="id" />-->
|
||||
<el-table-column label="SkuId" align="center" prop="id" />
|
||||
<el-table-column label="商品ID" align="center" prop="productId" />
|
||||
<el-table-column label="规格Id" align="center" prop="specId" />
|
||||
<!-- <el-table-column label="规格Id" align="center" prop="specId" />-->
|
||||
<el-table-column label="商品名称" align="center" prop="name" />
|
||||
<el-table-column label="图片" align="center" prop="logo" width="100">
|
||||
<template slot-scope="scope">
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@ import {listGoods,pullGoodsList,getGoodsSku,linkErpGoodsSkuId,pushToOms} from "@
|
|||
|
||||
import {MessageBox} from "element-ui";
|
||||
import {isRelogin} from "@/utils/request";
|
||||
import { amountFormatter } from '@/utils/zhijian'
|
||||
|
||||
|
||||
export default {
|
||||
|
|
@ -248,6 +249,7 @@ export default {
|
|||
this.loading = false;
|
||||
},
|
||||
methods: {
|
||||
amountFormatter,
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
|||
import {listShop} from "@/api/shop/shop";
|
||||
import {pullGoodsList,listGoods,getGoodsSku,linkErpGoodsSkuId} from "@/api/wei/goods";
|
||||
import {MessageBox} from "element-ui";
|
||||
import { amountFormatter } from '@/utils/zhijian'
|
||||
|
||||
export default {
|
||||
name: "GoodsListWei",
|
||||
|
|
@ -228,6 +229,7 @@ export default {
|
|||
this.loading = false;
|
||||
},
|
||||
methods: {
|
||||
amountFormatter,
|
||||
/** 查看SKU List*/
|
||||
handleViewSkuList(row){
|
||||
this.skuList = row.skuList
|
||||
|
|
@ -266,6 +268,12 @@ export default {
|
|||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handleLink(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
|
|
|
|||
Loading…
Reference in New Issue