Commit 9c4b48f8 by huluobin

ebay的平台费直接改为读取oms的

parent d6e81269
......@@ -84,8 +84,8 @@ public class EbayFinanceAdSyncJobTest {
public void testThreadPool() {
EbayFinanceAdSyncJob ebayFinanceAdSyncJob = new EbayFinanceAdSyncJob();
LocalDateTime start = LocalDateTime.of(2020, 11, 18, 0, 0);
LocalDateTime end = LocalDateTime.of(2020, 12, 2, 0, 0);
LocalDateTime start = LocalDateTime.of(2020, 12, 1, 0, 0);
LocalDateTime end = LocalDateTime.of(2020, 12, 12, 0, 0);
List<LocalDateTime> localDateTimeList = Stream.iterate(start,
localDateTime -> localDateTime.plusDays(1))
......
......@@ -254,10 +254,13 @@ public class OrderSyncJob extends PointJob {
checkFbaFee(dcBaseOmsSku, dcBaseOmsOrder);
}
if ((dcBaseOmsOrder.getCostPlatformFee().compareTo(BigDecimal.ZERO) == 0) && (initTotalCost.compareTo(BigDecimal.valueOf(0)) == 1) && (amountSales.compareTo(BigDecimal.ZERO) == 1)) {
DcBaseOmsSkuMapper dcBaseOmsSkuMapper = SessionUtil.getSession().getMapper(DcBaseOmsSkuMapper.class);
BigDecimal costPlatformFee = dcBaseOmsSkuMapper.selectCostPlatformFee(dcBaseOmsSku.getBailunSku(), dcBaseOmsSku.getPlatformType(), dcBaseOmsSku.getWebsite());
totalCostPlatformFee = totalCostPlatformFee.add(costPlatformFee == null ? BigDecimal.ZERO : costPlatformFee);
//ebay的平台费直接改为读取oms的
if ((dcBaseOmsOrder.getCostPlatformFee().compareTo(BigDecimal.ZERO) == 0) &&
(initTotalCost.compareTo(BigDecimal.valueOf(0)) == 1) &&
(amountSales.compareTo(BigDecimal.ZERO) == 1)) {
// DcBaseOmsSkuMapper dcBaseOmsSkuMapper = SessionUtil.getSession().getMapper(DcBaseOmsSkuMapper.class);
// BigDecimal costPlatformFee = dcBaseOmsSkuMapper.selectCostPlatformFee(dcBaseOmsSku.getBailunSku(), dcBaseOmsSku.getPlatformType(), dcBaseOmsSku.getWebsite(),dcBaseOmsSku.getOriginOrderId());
// totalCostPlatformFee = totalCostPlatformFee.add(costPlatformFee == null ? BigDecimal.ZERO : costPlatformFee);
hasCostPlatformFee = false;
}
......
......@@ -256,7 +256,7 @@ public class OrderSyncTask extends PointJob {
if ((dcBaseOmsOrder.getCostPlatformFee().compareTo(BigDecimal.ZERO) == 0) && (initTotalCost.compareTo(BigDecimal.valueOf(0)) == 1) && (amountSales.compareTo(BigDecimal.ZERO) == 1)) {
DcBaseOmsSkuMapper dcBaseOmsSkuMapper = SessionUtil.getSession().getMapper(DcBaseOmsSkuMapper.class);
BigDecimal costPlatformFee = dcBaseOmsSkuMapper.selectCostPlatformFee(dcBaseOmsSku.getBailunSku(), dcBaseOmsSku.getPlatformType(), dcBaseOmsSku.getWebsite());
BigDecimal costPlatformFee = dcBaseOmsSkuMapper.selectCostPlatformFee(dcBaseOmsSku.getBailunSku(), dcBaseOmsSku.getPlatformType(), dcBaseOmsSku.getWebsite(),dcBaseOmsSku.getOriginOrderId());
totalCostPlatformFee = totalCostPlatformFee.add(costPlatformFee == null ? BigDecimal.ZERO : costPlatformFee);
hasCostPlatformFee = false;
}
......
......@@ -26,7 +26,7 @@ public class OmsOrderTest {
// map.put("BailunLastUpdateTimeFrom", "2019-04-11 11:45:33");
// map.put("BailunLastUpdateTimeTo", "2019-04-11 16:17:03");
//OriginOrderNo=112-7750508-3145827
map.put("OriginOrderNo", "353296395593-1198797722022");
map.put("OriginOrderNo", "353300877748-1202307414022");
//353295108454-1198385057022
// map.put("OriginOrderNo", "353295108454-1198385057022");
Request request = new Request.Builder()
......
......@@ -132,7 +132,11 @@ public interface DcBaseOmsSkuMapper {
BigDecimal selectFBAFee(@Param("bailunSku") String bailunSku, @Param("webSite") String webSite, @Param("paidTime") LocalDateTime paidTime);
BigDecimal selectCostPlatformFee(@Param("bailunSku") String bailunSku, @Param("platformType") String platformType, @Param("webSite") String webSite);
@Deprecated
BigDecimal selectCostPlatformFee(@Param("bailunSku") String bailunSku,
@Param("platformType") String platformType,
@Param("webSite") String webSite,
@Param("originOrderId") String originOrderId);
DcBaseOmsSku selectOneByCreateTime(@Param("bailunSku") String bailunSku);
......
......@@ -3714,6 +3714,7 @@
AND bailun_sku = #{bailunSku}
AND website = #{webSite}
AND cost_platform_fee &gt; 0
and origin_order_id !=#{originOrderId}
order by order_update_time desc
limit 1
</select>
......
......@@ -5,8 +5,8 @@
<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>
......
......@@ -7,16 +7,11 @@ import com.bailuntec.job.ReplaceLogisticJob;
import com.bailuntec.utils.PropertiesUtil;
import com.dangdang.ddframe.job.config.JobCoreConfiguration;
import com.dangdang.ddframe.job.config.simple.SimpleJobConfiguration;
import com.dangdang.ddframe.job.event.JobEventConfiguration;
import com.dangdang.ddframe.job.event.rdb.JobEventRdbConfiguration;
import com.dangdang.ddframe.job.lite.api.JobScheduler;
import com.dangdang.ddframe.job.lite.config.LiteJobConfiguration;
import com.dangdang.ddframe.job.lite.lifecycle.api.JobAPIFactory;
import com.dangdang.ddframe.job.lite.lifecycle.api.JobOperateAPI;
import com.dangdang.ddframe.job.reg.base.CoordinatorRegistryCenter;
import com.dangdang.ddframe.job.reg.zookeeper.ZookeeperConfiguration;
import com.dangdang.ddframe.job.reg.zookeeper.ZookeeperRegistryCenter;
import com.google.common.base.Optional;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
......@@ -36,24 +31,19 @@ public class Application {
log.info("starting app...");
//
new JobScheduler(createRegistryCenter(),
createJobConfigurationNormal(),
createJobEventConfiguration()).init();
createJobConfigurationNormal()).init();
new JobScheduler(createRegistryCenter(),
createJobConfigurationIncrement(),
createJobEventConfiguration()).init();
createJobConfigurationIncrement()).init();
new JobScheduler(createRegistryCenter(),
createReplaceLogistic(),
createJobEventConfiguration()).init();
createReplaceLogistic()).init();
new JobScheduler(createRegistryCenter(),
createQueueConsumer(),
createJobEventConfiguration()).init();
createQueueConsumer()).init();
new JobScheduler(createRegistryCenter(),
createJobConfigurationNeNormal(),
createJobEventConfiguration()).init();
createJobConfigurationNeNormal()).init();
}
......@@ -122,10 +112,10 @@ public class Application {
return LiteJobConfiguration.newBuilder(simpleJobConfig).build();
}
private static JobEventConfiguration createJobEventConfiguration() {
return new JobEventRdbConfiguration(setUpEventTraceDataSource());
}
//
// private static JobEventConfiguration createJobEventConfiguration() {
// return new JobEventRdbConfiguration(setUpEventTraceDataSource());
// }
private static DataSource setUpEventTraceDataSource() {
DruidDataSource result = new DruidDataSource();
......
......@@ -10,9 +10,9 @@ EVENT_RDB_STORAGE_PASSWORD=#7kfnymAM$Y9-Ntf
ZOOKEEPER_SERVER=172.31.255.120:2181
NAME_SPACE=data-center
JOB_NAME=show-auto-turnover28
JOB_CRON=0 0 3 * * ?
#JOB_CRON=0 0 10 * * ?
JOB_NAME=show-auto-turnover29
#JOB_CRON=0 0 3 * * ?
JOB_CRON=0 35 11 * * ?
SHARDING_TOTAL_COUNT=8
......
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