Commit 585de63e by yinyong

Merge remote-tracking branch 'origin/master'

parents f06f9115 c03c982c
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
#COMPANY_ACCOUNT_URL=http://pams.bailuntec.com/Api/GetAccountToken #COMPANY_ACCOUNT_URL=http://pams.bailuntec.com/Api/GetAccountToken
COMPANY_INFO_URL=http://172.31.255.10/GetCompanys COMPANY_INFO_URL=http://172.31.255.10/GetCompanys
COMPANY_STAFF_URL=http://172.31.255.10/GetUserByCompany 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 ...@@ -16,8 +16,8 @@ COPY data-base /usr/app/data-base
COPY data-mid /usr/app/data-mid COPY data-mid /usr/app/data-mid
COPY data-show /usr/app/data-show 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>" #指定容器启动程序及参数 <ENTRYPOINT> "<CMD>"
EXPOSE 8080 EXPOSE 8080
ENTRYPOINT ["java","-Xms30m","-Xmx80m","-jar","/usr/app/data-base/base_sync_finance_amazon/target/base_sync_finance_amazon-1.0-SNAPSHOT.jar"] 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 \ No newline at end of file
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <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 --> <!-- FIXME change it to the project's website -->
<url>http://www.example.com</url> <url>http://www.example.com</url>
......
...@@ -14,7 +14,6 @@ public class BailunSkuCumulative { ...@@ -14,7 +14,6 @@ public class BailunSkuCumulative {
private BigDecimal maxSkuWidth;//最大SKU宽 private BigDecimal maxSkuWidth;//最大SKU宽
private BigDecimal maxSkuHight;//最大SKU高 private BigDecimal maxSkuHight;//最大SKU高
private Integer totalQuantity;//累计销售数量 private Integer totalQuantity;//累计销售数量
private Integer countSelfProducrSku;//自产美容SKU销售数量
private Boolean domesticOrOverseas;//国内仓或海外仓, true是国内仓 private Boolean domesticOrOverseas;//国内仓或海外仓, true是国内仓
} }
...@@ -601,7 +601,7 @@ public class OrderSyncJob extends PointJob { ...@@ -601,7 +601,7 @@ public class OrderSyncJob extends PointJob {
private void caculateBailunHandleFee(DcBaseOmsOrder dcBaseOmsOrder, BailunSkuCumulative bailunSkuCumulative) { private void caculateBailunHandleFee(DcBaseOmsOrder dcBaseOmsOrder, BailunSkuCumulative bailunSkuCumulative) {
BigDecimal costBailunHandle = BigDecimal.ONE;//海外仓和FBA 的,都是直接1元一个单 BigDecimal costBailunHandle = BigDecimal.ONE;//海外仓和FBA 的,都是直接1元一个单
if(bailunSkuCumulative.getDomesticOrOverseas()) { if(bailunSkuCumulative.getDomesticOrOverseas()) {
switch (bailunSkuCumulative.getCountSelfProducrSku()) { switch (bailunSkuCumulative.getTotalQuantity()) {
case 0: case 0:
costBailunHandle = BigDecimal.ZERO; costBailunHandle = BigDecimal.ZERO;
break; break;
...@@ -615,7 +615,7 @@ public class OrderSyncJob extends PointJob { ...@@ -615,7 +615,7 @@ public class OrderSyncJob extends PointJob {
case 8: case 8:
case 9: case 9:
case 10: 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; break;
default: default:
costBailunHandle = BigDecimal.valueOf(3.7);//超过10个只取10个的费用 costBailunHandle = BigDecimal.valueOf(3.7);//超过10个只取10个的费用
...@@ -632,7 +632,6 @@ public class OrderSyncJob extends PointJob { ...@@ -632,7 +632,6 @@ public class OrderSyncJob extends PointJob {
bailunSkuCumulative.setMaxSkuHight(BigDecimal.ZERO); bailunSkuCumulative.setMaxSkuHight(BigDecimal.ZERO);
bailunSkuCumulative.setTotalWeight(BigDecimal.ZERO); bailunSkuCumulative.setTotalWeight(BigDecimal.ZERO);
bailunSkuCumulative.setTotalQuantity(0); bailunSkuCumulative.setTotalQuantity(0);
Integer countSelfProducrSku = 0;
for (BailunSku bailunSku : omsResult.getBailunSku()) { for (BailunSku bailunSku : omsResult.getBailunSku()) {
if (bailunSku.getBailunSkuWeight() == null) { if (bailunSku.getBailunSkuWeight() == null) {
bailunSku.setBailunSkuWeight(BigDecimal.ZERO); bailunSku.setBailunSkuWeight(BigDecimal.ZERO);
...@@ -667,20 +666,7 @@ public class OrderSyncJob extends PointJob { ...@@ -667,20 +666,7 @@ public class OrderSyncJob extends PointJob {
bailunSkuCumulative.setMaxSkuLong(skuHeight); 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; return bailunSkuCumulative;
} }
......
...@@ -9,7 +9,7 @@ EVENT_RDB_STORAGE_USERNAME=root ...@@ -9,7 +9,7 @@ EVENT_RDB_STORAGE_USERNAME=root
EVENT_RDB_STORAGE_PASSWORD=#7kfnymAM$Y9-Ntf EVENT_RDB_STORAGE_PASSWORD=#7kfnymAM$Y9-Ntf
ZOOKEEPER_SERVER=172.31.255.120:2181 ZOOKEEPER_SERVER=172.31.255.120:2181
NAME_SPACE=data-center NAME_SPACE=data-center
JOB_NAME=base-sync-oms-order-coroutine #JOB_NAME=base-sync-oms-order-coroutine
#JOB_NAME=base-sync-oms-order JOB_NAME=base-sync-oms-order
JOB_CRON=0/1 * * * * ? * JOB_CRON=0/1 * * * * ? *
SHARDING_TOTAL_COUNT=1 SHARDING_TOTAL_COUNT=1
\ No newline at end of file
...@@ -73,7 +73,7 @@ public class OmsOrderTest { ...@@ -73,7 +73,7 @@ public class OmsOrderTest {
LinkedHashMap<String, String> map = new LinkedHashMap<>(4); LinkedHashMap<String, String> map = new LinkedHashMap<>(4);
map.put("pageIndex", "1"); map.put("pageIndex", "1");
map.put("pageCount", "100"); map.put("pageCount", "100");
map.put("OriginOrderNo", "263709100694-2446617013016"); map.put("OriginOrderNo", "293081293723-1685480773019");
Request request = new Request.Builder() Request request = new Request.Builder()
.get() .get()
.url(OkHttpUtil.attachHttpGetParams("http://oms.bailuntec.com/apiV2/bailunOrder/getBailunOrders", map)) .url(OkHttpUtil.attachHttpGetParams("http://oms.bailuntec.com/apiV2/bailunOrder/getBailunOrders", map))
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<module>base-sync-company</module> <module>base-sync-company</module>
<module>base-sync-finance-ebay</module> <module>base-sync-finance-ebay</module>
<module>base-sync-paypal</module> <module>base-sync-paypal</module>
<module>base_sync_finance_amazon</module> <module>base-sync-finance-amazon</module>
</modules> </modules>
<packaging>pom</packaging> <packaging>pom</packaging>
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
"http://mybatis.org/dtd/mybatis-3-config.dtd"> "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration> <configuration>
<!--<properties resource="db-tj.properties"/>--> <!--<properties resource="db-tj.properties"/>-->
<!-- <properties resource="db-dev.properties"/>--> <properties resource="db-dev.properties"/>
<properties resource="db-prod.properties"/> <!-- <properties resource="db-prod.properties"/>-->
<settings> <settings>
<setting name="mapUnderscoreToCamelCase" value="true"/> <setting name="mapUnderscoreToCamelCase" value="true"/>
</settings> </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