Commit 2415089c by huluobin

update

parent 19303a6b
......@@ -31,20 +31,26 @@ public class Application {
}
private static CoordinatorRegistryCenter createRegistryCenter() {
CoordinatorRegistryCenter regCenter = new ZookeeperRegistryCenter(new ZookeeperConfiguration(propertiesUtil.getPropertyAsString("ZOOKEEPER_SERVER"), propertiesUtil.getPropertyAsString("NAME_SPACE")));
CoordinatorRegistryCenter regCenter = new ZookeeperRegistryCenter(new ZookeeperConfiguration(
propertiesUtil.getPropertyAsString("ZOOKEEPER_SERVER"), propertiesUtil.getPropertyAsString("NAME_SPACE")));
regCenter.init();
return regCenter;
}
private static LiteJobConfiguration createJobConfiguration() {
JobCoreConfiguration simpleCoreConfig = JobCoreConfiguration.newBuilder(propertiesUtil.getPropertyAsString("JOB_NAME"), propertiesUtil.getPropertyAsString("JOB_CRON"), propertiesUtil.getPropertyAsInt("SHARDING_TOTAL_COUNT")).build();
JobCoreConfiguration simpleCoreConfig = JobCoreConfiguration.newBuilder(
propertiesUtil.getPropertyAsString("JOB_NAME"), propertiesUtil.getPropertyAsString("JOB_CRON"),
propertiesUtil.getPropertyAsInt("SHARDING_TOTAL_COUNT")).build();
SimpleJobConfiguration simpleJobConfig = new SimpleJobConfiguration(simpleCoreConfig, OrderSyncJob.class.getCanonicalName());
LiteJobConfiguration simpleJobRootConfig = LiteJobConfiguration.newBuilder(simpleJobConfig).build();
return simpleJobRootConfig;
}
private static LiteJobConfiguration createJobConfiguration1() {
JobCoreConfiguration simpleCoreConfig = JobCoreConfiguration.newBuilder(propertiesUtil.getPropertyAsString("JOB_NAME30"), propertiesUtil.getPropertyAsString("JOB_CRON30"), propertiesUtil.getPropertyAsInt("SHARDING_TOTAL_COUNT")).build();
JobCoreConfiguration simpleCoreConfig = JobCoreConfiguration.newBuilder(
propertiesUtil.getPropertyAsString("JOB_NAME30"),
propertiesUtil.getPropertyAsString("JOB_CRON30"),
propertiesUtil.getPropertyAsInt("SHARDING_TOTAL_COUNT")).build();
SimpleJobConfiguration simpleJobConfig = new SimpleJobConfiguration(simpleCoreConfig, OrderSyncJob30.class.getCanonicalName());
LiteJobConfiguration simpleJobRootConfig = LiteJobConfiguration.newBuilder(simpleJobConfig).build();
return simpleJobRootConfig;
......
......@@ -30,6 +30,7 @@ import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
......@@ -50,11 +51,11 @@ public class OrderSyncJob extends PointJob {
/*map.put("TimeFrom", DateTimeFormatter.ofPattern(CommonConstant.TIME_FORMAT).format(jobPointLog.getStartTime().minusMinutes(3)));
map.put("TimeTo", DateTimeFormatter.ofPattern(CommonConstant.TIME_FORMAT).format(jobPointLog.getEndTime()));
map.put("DateType", "purchaseTime");*/
// map.put("BailunLastUpdateTimeFrom", DateTimeFormatter.ofPattern(CommonConstant.TIME_FORMAT).format(jobPointLog.getStartTime().minusMinutes(3)));
// map.put("BailunLastUpdateTimeTo", DateTimeFormatter.ofPattern(CommonConstant.TIME_FORMAT).format(jobPointLog.getEndTime()));
map.put("BailunLastUpdateTimeFrom", DateTimeFormatter.ofPattern(CommonConstant.TIME_FORMAT).format(jobPointLog.getStartTime().minusMinutes(3)));
map.put("BailunLastUpdateTimeTo", DateTimeFormatter.ofPattern(CommonConstant.TIME_FORMAT).format(jobPointLog.getEndTime()));
map.put("BailunLastUpdateTimeFrom", "2020-07-24 00:00:00");
map.put("BailunLastUpdateTimeTo", "2020-07-25 00:00:00");
// map.put("BailunLastUpdateTimeFrom", "2020-07-24 00:00:00");
// map.put("BailunLastUpdateTimeTo", "2020-07-25 00:00:00");
do {
map.put("pageIndex", jobPointLog.getPageIndex().equals(0) ? "1" : jobPointLog.getPageIndex().toString());
Response response = null;
......
......@@ -55,14 +55,15 @@ public class OmsOrderTest {
}
}
}
@Test
public void test4() {
OrderSyncJob orderSyncJob = new OrderSyncJob();
JobPointLog jobPointLog = new JobPointLog();
jobPointLog.setPageIndex(0);
jobPointLog.setPageSize(100);
jobPointLog.setStartTime(LocalDateTime.of(2019,04,01,0,0));
jobPointLog.setEndTime(LocalDateTime.of(2019,04,02,0,0));
jobPointLog.setStartTime(LocalDateTime.of(2020, 8, 1, 0, 0));
jobPointLog.setEndTime(LocalDateTime.of(2020, 9, 3, 0, 0));
jobPointLog.setIntervalTime(1);
orderSyncJob.executeJob(null, jobPointLog);
}
......
......@@ -121,5 +121,7 @@ public interface DcDailySalesMapper {
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int upsertSelective(DcDailySales record);
void calculateSales();
}
\ No newline at end of file
}
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