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