|
@@ -1,6 +1,7 @@
|
|
|
package org.dromara.external.handler.impl;
|
|
package org.dromara.external.handler.impl;
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
@@ -73,6 +74,7 @@ public class ZhongChePushStrategy implements ProductPushStrategy {
|
|
|
item.setProductStatus(externalProductVo.getProductStatus());
|
|
item.setProductStatus(externalProductVo.getProductStatus());
|
|
|
item.setMemberPrice(productDetail.getMemberPrice());
|
|
item.setMemberPrice(productDetail.getMemberPrice());
|
|
|
item.setProductImage(productDetail.getImageUrl());
|
|
item.setProductImage(productDetail.getImageUrl());
|
|
|
|
|
+ item.setTaxRate(productDetail.getTaxRate());
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
// 收集所有 externalCategoryId
|
|
// 收集所有 externalCategoryId
|
|
@@ -190,9 +192,19 @@ public class ZhongChePushStrategy implements ProductPushStrategy {
|
|
|
//TODO 是否自营
|
|
//TODO 是否自营
|
|
|
goodsImportItem.setIsSelfOperated(1);
|
|
goodsImportItem.setIsSelfOperated(1);
|
|
|
//税率
|
|
//税率
|
|
|
- goodsImportItem.setTax( new BigDecimal("0.13"));
|
|
|
|
|
|
|
+ if(ObjectUtil.isNotEmpty(item.getTaxRate())){
|
|
|
|
|
+ goodsImportItem.setTax( item.getTaxRate());
|
|
|
|
|
+ }else {
|
|
|
|
|
+ goodsImportItem.setTax( new BigDecimal("0.13"));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
//TODO 税收编码 默认填 1
|
|
//TODO 税收编码 默认填 1
|
|
|
- goodsImportItem.setTaxCode("107022301");
|
|
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(item.getTaxCode())){
|
|
|
|
|
+ goodsImportItem.setTaxCode( item.getTaxCode());
|
|
|
|
|
+ }else{
|
|
|
|
|
+ goodsImportItem.setTaxCode(item.getTaxCode());
|
|
|
|
|
+ }
|
|
|
batchGoods.add(goodsImportItem);
|
|
batchGoods.add(goodsImportItem);
|
|
|
});
|
|
});
|
|
|
GoodsImportBo bo = new GoodsImportBo();
|
|
GoodsImportBo bo = new GoodsImportBo();
|