Commit 585de63e by yinyong

Merge remote-tracking branch 'origin/master'

parents f06f9115 c03c982c
......@@ -3,5 +3,5 @@
#COMPANY_ACCOUNT_URL=http://pams.bailuntec.com/Api/GetAccountToken
COMPANY_INFO_URL=http://172.31.255.10/GetCompanys
COMPANY_STAFF_URL=http://172.31.255.10/GetUserByCompany
COMPANY_ACCOUNT_URL=http://10.0.6.17/Api/GetAccountToken
COMPANY_ACCOUNT_URL=http://10.0.6.17:8090/Api/GetAccountToken
......@@ -16,8 +16,8 @@ COPY data-base /usr/app/data-base
COPY data-mid /usr/app/data-mid
COPY data-show /usr/app/data-show
RUN cd /usr/app/data-parent && mvn -T 1C install -pl ../data-base/base_sync_finance_amazon -am
RUN cd /usr/app/data-parent && mvn -T 1C install -pl ../data-base/base-sync-finance-amazon -am
#指定容器启动程序及参数 <ENTRYPOINT> "<CMD>"
EXPOSE 8080
ENTRYPOINT ["java","-Xms30m","-Xmx80m","-jar","/usr/app/data-base/base_sync_finance_amazon/target/base_sync_finance_amazon-1.0-SNAPSHOT.jar"]
\ No newline at end of file
ENTRYPOINT ["java","-Xms30m","-Xmx80m","-jar","/usr/app/data-base/base-sync-finance-amazon/target/base-sync-finance-amazon-1.0-SNAPSHOT.jar"]
\ No newline at end of file
......@@ -9,9 +9,9 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>base_sync_finance_amazon</artifactId>
<artifactId>base-sync-finance-amazon</artifactId>
<name>base_sync_finance_amazon</name>
<name>base-sync-finance-amazon</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
......
......@@ -14,7 +14,6 @@ public class BailunSkuCumulative {
private BigDecimal maxSkuWidth;//最大SKU宽
private BigDecimal maxSkuHight;//最大SKU高
private Integer totalQuantity;//累计销售数量
private Integer countSelfProducrSku;//自产美容SKU销售数量
private Boolean domesticOrOverseas;//国内仓或海外仓, true是国内仓
}
......@@ -601,7 +601,7 @@ public class OrderSyncJob extends PointJob {
private void caculateBailunHandleFee(DcBaseOmsOrder dcBaseOmsOrder, BailunSkuCumulative bailunSkuCumulative) {
BigDecimal costBailunHandle = BigDecimal.ONE;//海外仓和FBA 的,都是直接1元一个单
if(bailunSkuCumulative.getDomesticOrOverseas()) {
switch (bailunSkuCumulative.getCountSelfProducrSku()) {
switch (bailunSkuCumulative.getTotalQuantity()) {
case 0:
costBailunHandle = BigDecimal.ZERO;
break;
......@@ -615,7 +615,7 @@ public class OrderSyncJob extends PointJob {
case 8:
case 9:
case 10:
costBailunHandle = BigDecimal.valueOf(0.3).multiply(BigDecimal.valueOf(bailunSkuCumulative.getCountSelfProducrSku() - 1)).add(BigDecimal.ONE);
costBailunHandle = BigDecimal.valueOf(0.3).multiply(BigDecimal.valueOf(bailunSkuCumulative.getTotalQuantity() - 1)).add(BigDecimal.ONE);
break;
default:
costBailunHandle = BigDecimal.valueOf(3.7);//超过10个只取10个的费用
......@@ -632,7 +632,6 @@ public class OrderSyncJob extends PointJob {
bailunSkuCumulative.setMaxSkuHight(BigDecimal.ZERO);
bailunSkuCumulative.setTotalWeight(BigDecimal.ZERO);
bailunSkuCumulative.setTotalQuantity(0);
Integer countSelfProducrSku = 0;
for (BailunSku bailunSku : omsResult.getBailunSku()) {
if (bailunSku.getBailunSkuWeight() == null) {
bailunSku.setBailunSkuWeight(BigDecimal.ZERO);
......@@ -667,20 +666,7 @@ public class OrderSyncJob extends PointJob {
bailunSkuCumulative.setMaxSkuLong(skuHeight);
}
}
try {
DcBaseOmsHandleMapper mapper = SessionUtil.getSession().getMapper(DcBaseOmsHandleMapper.class);
DcBaseOmsHandle orderBailunCatagory = mapper.getOrderBailunCatagory(omsResult.getBailunSku().get(0).getBailunSku());
if (orderBailunCatagory != null) {//如果没有在这个表, 说明是普货类, 在这个表, 就是美容自产
countSelfProducrSku += bailunSku.getBailunSkuQuantityOrdered();
}
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("MYBATIS操作DB失败", e);
} finally {
SessionUtil.closeSession();
}
}
bailunSkuCumulative.setCountSelfProducrSku(countSelfProducrSku);
return bailunSkuCumulative;
}
......
......@@ -9,7 +9,7 @@ EVENT_RDB_STORAGE_USERNAME=root
EVENT_RDB_STORAGE_PASSWORD=#7kfnymAM$Y9-Ntf
ZOOKEEPER_SERVER=172.31.255.120:2181
NAME_SPACE=data-center
JOB_NAME=base-sync-oms-order-coroutine
#JOB_NAME=base-sync-oms-order
#JOB_NAME=base-sync-oms-order-coroutine
JOB_NAME=base-sync-oms-order
JOB_CRON=0/1 * * * * ? *
SHARDING_TOTAL_COUNT=1
\ No newline at end of file
......@@ -73,7 +73,7 @@ public class OmsOrderTest {
LinkedHashMap<String, String> map = new LinkedHashMap<>(4);
map.put("pageIndex", "1");
map.put("pageCount", "100");
map.put("OriginOrderNo", "263709100694-2446617013016");
map.put("OriginOrderNo", "293081293723-1685480773019");
Request request = new Request.Builder()
.get()
.url(OkHttpUtil.attachHttpGetParams("http://oms.bailuntec.com/apiV2/bailunOrder/getBailunOrders", map))
......
......@@ -29,7 +29,7 @@
<module>base-sync-company</module>
<module>base-sync-finance-ebay</module>
<module>base-sync-paypal</module>
<module>base_sync_finance_amazon</module>
<module>base-sync-finance-amazon</module>
</modules>
<packaging>pom</packaging>
......
......@@ -4,8 +4,8 @@
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<!--<properties resource="db-tj.properties"/>-->
<!-- <properties resource="db-dev.properties"/>-->
<properties resource="db-prod.properties"/>
<properties resource="db-dev.properties"/>
<!-- <properties resource="db-prod.properties"/>-->
<settings>
<setting name="mapUnderscoreToCamelCase" value="true"/>
</settings>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment